FreeRDP
channels/video.h
1 
20 #ifndef FREERDP_CHANNEL_VIDEO_H
21 #define FREERDP_CHANNEL_VIDEO_H
22 
23 #include <winpr/wtypes.h>
24 #include <freerdp/types.h>
25 
30 #define VIDEO_CHANNEL_NAME "video"
31 #define VIDEO_CONTROL_DVC_CHANNEL_NAME "Microsoft::Windows::RDS::Video::Control::v08.01"
32 #define VIDEO_DATA_DVC_CHANNEL_NAME "Microsoft::Windows::RDS::Video::Data::v08.01"
33 
34 #ifdef __cplusplus
35 extern "C"
36 {
37 #endif
38 
40  enum
41  {
42  TSMM_PACKET_TYPE_PRESENTATION_REQUEST = 1,
43  TSMM_PACKET_TYPE_PRESENTATION_RESPONSE = 2,
44  TSMM_PACKET_TYPE_CLIENT_NOTIFICATION = 3,
45  TSMM_PACKET_TYPE_VIDEO_DATA = 4
46  };
47 
49  enum
50  {
51  TSMM_START_PRESENTATION = 1,
52  TSMM_STOP_PRESENTATION = 2
53  };
54 
56  typedef struct
57  {
58  BYTE PresentationId;
59  BYTE Version;
60  BYTE Command;
61  BYTE FrameRate;
62  UINT32 SourceWidth, SourceHeight;
63  UINT32 ScaledWidth, ScaledHeight;
64  UINT64 hnsTimestampOffset;
65  UINT64 GeometryMappingId;
66  BYTE VideoSubtypeId[16];
67  UINT32 cbExtra;
68  BYTE* pExtraData;
70 
72  typedef struct
73  {
74  BYTE PresentationId;
76 
78  enum
79  {
80  TSMM_VIDEO_DATA_FLAG_HAS_TIMESTAMPS = 0x01,
81  TSMM_VIDEO_DATA_FLAG_KEYFRAME = 0x02,
82  TSMM_VIDEO_DATA_FLAG_NEW_FRAMERATE = 0x04
83  };
84 
86  typedef struct
87  {
88  BYTE PresentationId;
89  BYTE Version;
90  BYTE Flags;
91  UINT64 hnsTimestamp;
92  UINT64 hnsDuration;
93  UINT16 CurrentPacketIndex;
94  UINT16 PacketsInSample;
95  UINT32 SampleNumber;
96  UINT32 cbSample;
97  BYTE* pSample;
99 
101  enum
102  {
103  TSMM_CLIENT_NOTIFICATION_TYPE_NETWORK_ERROR = 1,
104  TSMM_CLIENT_NOTIFICATION_TYPE_FRAMERATE_OVERRIDE = 2
105  };
106 
108  typedef struct
109  {
110  UINT32 Flags;
111  UINT32 DesiredFrameRate;
113 
115  typedef struct
116  {
117  BYTE PresentationId;
118  BYTE NotificationType;
121 
122 #ifdef __cplusplus
123 }
124 #endif
125 
126 #endif /* FREERDP_CHANNEL_VIDEO_H */
struct used when NotificationType is FRAMERATE_OVERRIDE
a client to server notification struct
presentation request struct
response to a TSMM_PRESENTATION_REQUEST
a video data packet