Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

229 lines
10 KiB

  1. /****************************************************************************
  2. * @doc INTERNAL RTPPKTD
  3. *
  4. * @module RtpPktD.h | Header file for the RTP packetization descriptor
  5. * structures.
  6. ***************************************************************************/
  7. #ifndef _RTPPKTD_H_
  8. #define _RTPPKTD_H_
  9. /*****************************************************************************
  10. * @doc INTERNAL CRTPPKTDSTRUCTENUM
  11. *
  12. * @struct RTP_PD | The <t RTP_PD> structure is used to specify the details
  13. * of the RTP Pd format.
  14. *
  15. * @field DWORD | dwThisHeaderLength | Specifies the length, in bytes, of
  16. * this structure. This field is the offset to the next <t RTP_PD>
  17. * structure, if there is one, or the start of the payload headers.
  18. *
  19. * @field DWORD | dwPayloadHeaderOffset | Specifies the offset from the start
  20. * of the RTP packetization descriptor data to the first byte of the payload
  21. * header.
  22. *
  23. * @field DWORD | dwPayloadHeaderLength | Specifies the length, in bytes, of
  24. * the payload header.
  25. *
  26. * @field DWORD | dwPayloadStartBitOffset | Specifies the offset from the
  27. * start of the corresponding compressed video buffer to the first bit of
  28. * the payload data associated with this <t RTP_PD> structure.
  29. *
  30. * @field DWORD | dwPayloadEndBitOffset | Specifies the offset from the start
  31. * of the corresponding compressed video buffer to the last bit of the
  32. * payload data associated with this <t RTP_PD> structure.
  33. *
  34. * @field DWORD | fEndMarkerBit | If set to TRUE, this flag signals that
  35. * this structure applies to the last chunk of a video frame. Typically,
  36. * only the last packet descriptor in a series of descriptors would have
  37. * this flag turned on. However, this may not be the case for devices
  38. * that do not respect frame boundaries and fill video capture buffers
  39. * with truncated or multiple video frames.
  40. *
  41. * @field DWORD | dwLayerId | Specifies the ID of the encoding layer this
  42. * descriptor applies to. For standard video encoders, this field is
  43. * always set to 0. In the case of multi-layered encoders, this field
  44. * shall be set to 0 for the base layer, 1 for the first enhancement
  45. * layer, 2 for the next enhancement layer, etc.
  46. *
  47. * @field DWORD | dwTimestamp | Specifies the value of the timestamp field
  48. * to be set by the downstream filter when creating the RTP header for
  49. * this packet. The units and ranges for this field shall adhere to the
  50. * definition of timestamp given in section 5.1 of RFC 1889.
  51. *
  52. * @field DWORD | dwAudioAttributes | Specifies some bitfield attributes
  53. * used to characterize the sample in the audio stream associated to this
  54. * RTP packetization descriptor. This field shall always be set to 0,
  55. * unless the audio sample described by this RTP packetization descriptor
  56. * structure is a silent frame, in which case, this field shall be set
  57. * to AUDIO_SILENT (defined as 1).
  58. *
  59. * @field DWORD | dwVideoAttributes | Specifies some bitfield attributes
  60. * used to characterize the sample in the video stream associated to this
  61. * RTP packetization descriptor. There are no video attributes defined at
  62. * this time. Therefore, this field shall always be set to 0.
  63. *
  64. * @field DWORD | dwReserved | Reserved. Shall all be set to 0.
  65. ***************************************************************************/
  66. typedef struct tagRTP_PD
  67. {
  68. DWORD dwThisHeaderLength;
  69. DWORD dwPayloadHeaderOffset;
  70. DWORD dwPayloadHeaderLength;
  71. DWORD dwPayloadStartBitOffset;
  72. DWORD dwPayloadEndBitOffset;
  73. BOOL fEndMarkerBit;
  74. DWORD dwLayerId;
  75. DWORD dwTimestamp;
  76. union {
  77. DWORD dwAudioAttributes;
  78. DWORD dwVideoAttributes;
  79. };
  80. DWORD dwReserved;
  81. } RTP_PD, *PRTP_PD;
  82. /*****************************************************************************
  83. * @doc INTERNAL CRTPPDSTRUCTENUM
  84. *
  85. * @struct RTP_PD_HEADER | The <t RTP_PD_HEADER> structure is used to specify
  86. * the details of the RTP Pd format.
  87. *
  88. * @field DWORD | dwThisHeaderLength | Specifies the length, in bytes, of
  89. * this structure. This field is the offset to the first <t RTP_PD>
  90. * structure.
  91. *
  92. * @field DWORD | dwTotalByteLength | Specifies the length, in bytes, of the
  93. * entire data. This includes this structure, the <t RTP_PD> structures,
  94. * and the payload information.
  95. *
  96. * @field DWORD | dwNumHeaders | Specifies the number of <t RTP_PD>
  97. * structures.
  98. *
  99. * @field DWORD | dwReserved | Reserved. Shall be set to 0.
  100. ***************************************************************************/
  101. typedef struct tagRTP_PD_HEADER
  102. {
  103. DWORD dwThisHeaderLength;
  104. DWORD dwTotalByteLength;
  105. DWORD dwNumHeaders;
  106. DWORD dwReserved;
  107. } RTP_PD_HEADER, *PRTP_PD_HEADER;
  108. /*****************************************************************************
  109. * @doc INTERNAL CRTPPDSTRUCTENUM
  110. *
  111. * @struct RTP_PD_INFO | The <t RTP_PD_INFO> structure is used to specify the
  112. * details of the RTP Pd format.
  113. *
  114. * @field REFERENCE_TIME | AvgTimePerSample | Specifies the average time per
  115. * list of RTP packet descriptor, in 100ns units. This value shall be
  116. * identical to the value of the <p AvgTimePerFrame> field of the video
  117. * info header of the related compressed video stream format.
  118. *
  119. * @field DWORD | dwMaxRTPPacketizationDescriptorBufferSize | Specifies the
  120. * maximum size in bytes of the entire RTP packetization descriptor buffer.
  121. * The format of this buffer is described in the following section. The
  122. * maximum size of the entire RTP packetization descriptor buffer rarely
  123. * needs to exceed a few hundred bytes.
  124. *
  125. * @field DWORD | dwMaxRTPPayloadHeaderSize | Specifies the maximum size in
  126. * bytes of the payload header data for one RTP packet. For example, the
  127. * maximum size of a payload header for H.263 version 1 is 12 bytes (Mode
  128. * C header).
  129. *
  130. * @field DWORD | dwMaxRTPPacketSize | Specifies the maximum RTP packet
  131. * size in bytes to be described by the list of packetization descriptor.
  132. * Typically, this number is just below the MTU size of the network.
  133. *
  134. * @field DWORD | dwNumLayers | Specifies the number of encoding layers to
  135. * be described by the list of packetization descriptor. Typically, this
  136. * number is equal to 1. Only in the case of multi-layered encoders would
  137. * this number be higher than 1.
  138. *
  139. * @field DWORD | dwPayloadType | Specifies the static payload type the
  140. * stream describes. If the RTP packetization descriptors do not apply to
  141. * an existing static payload type but a dynamic payload type, this field
  142. * shall be set to DYNAMIC_PAYLOAD_TYPE (defined as MAXDWORD).
  143. *
  144. * @field DWORD | dwDescriptorVersion | Specifies a version identifier
  145. * qualifying the format of packetization descriptors. This field shall
  146. * be set to VERSION_1 (defined as 1UL) to identify the packetization
  147. * descriptor structures described in the next section.
  148. *
  149. * @field DWORD | dwReserved[4] | Reserved. Shall all be set to 0.
  150. ***************************************************************************/
  151. typedef struct tagRTP_PD_INFO {
  152. REFERENCE_TIME AvgTimePerSample;
  153. DWORD dwMaxRTPPacketizationDescriptorBufferSize;
  154. DWORD dwMaxRTPPayloadHeaderSize;
  155. DWORD dwMaxRTPPacketSize;
  156. DWORD dwNumLayers;
  157. DWORD dwPayloadType;
  158. DWORD dwDescriptorVersion;
  159. DWORD dwReserved[4];
  160. } RTP_PD_INFO, *PRTP_PD_INFO;
  161. /*****************************************************************************
  162. * @doc INTERNAL CRTPPDSTRUCTENUM
  163. *
  164. * @struct RTP_PD_CONFIG_CAPS | The <t RTP_PD_CONFIG_CAPS> structure is used
  165. * to store the RTP packetization descriptor configuration capabilities.
  166. *
  167. * @field DWORD | dwSmallestRTPPacketSize | Specifies the size in bytes of the
  168. * smallest RTP packet the stream can describe (typically, 512 bytes on Modem).
  169. *
  170. * @field DWORD | dwLargestRTPPacketSize | Specifies the size in bytes of the
  171. * largest packet the stream can describe (typically, 1350 bytes on LAN).
  172. *
  173. * @field DWORD | dwRTPPacketSizeGranularity | Specifies the granularity of
  174. * the increments between the smallest and largest packet size the stream
  175. * supports (ex. 1).
  176. *
  177. * @field DWORD | dwSmallestNumLayers | Specifies the smallest number of
  178. * encoding layers the stream can describe (typically 1).
  179. *
  180. * @field DWORD | dwLargestNumLayers | Specifies the largest number of
  181. * encoding layers the stream can describe (typically 1).
  182. *
  183. * @field DWORD | dwNumLayersGranularity | Specifies the granularity of the
  184. * increments between the smallest and largest number of encoding layers
  185. * the stream supports (ex. 0).
  186. *
  187. * @field DWORD | dwNumStaticPayloadTypes | Specifies the number of static
  188. * payload types the stream supports. This value is valid between 0 and
  189. * 4 (ex. 2 if it supports RFC 2190 and 2429 with H.263, but typically
  190. * only 1).
  191. *
  192. * @field DWORD | dwStaticPayloadTypes[4] | Specifies an array of static
  193. * payload types the stream supports. A stream can support at most 4
  194. * static payload types. The number of valid entries in this array is
  195. * indicated by the <p dwNumStaticPayloadTypes> field (ex. 34 for H.263).
  196. *
  197. * @field DWORD | dwNumDescriptorVersions | Specifies the number of
  198. * packetization descriptor versions the stream supports. This value is
  199. * valid between 1 and 4 (typically 1).
  200. *
  201. * @field DWORD | dwDescriptorVersions[4] | Specifies an array of version
  202. * identifiers qualifying the format of packetization descriptors. A
  203. * stream can support at most 4 packetization descriptor versions. The
  204. * number of valid entries in this array is indicated by the
  205. * <p dwNumDescriptorVersions> field (ex. VERION_1).
  206. *
  207. * @field DWORD | dwReserved[4] | Reserved. Shall all be set to 0.
  208. ***************************************************************************/
  209. typedef struct tagRTP_PD_CONFIG_CAPS {
  210. DWORD dwSmallestRTPPacketSize;
  211. DWORD dwLargestRTPPacketSize;
  212. DWORD dwRTPPacketSizeGranularity;
  213. DWORD dwSmallestNumLayers;
  214. DWORD dwLargestNumLayers;
  215. DWORD dwNumLayersGranularity;
  216. DWORD dwNumStaticPayloadTypes;
  217. DWORD dwStaticPayloadTypes[4];
  218. DWORD dwNumDescriptorVersions;
  219. DWORD dwDescriptorVersions[4];
  220. DWORD dwReserved[4];
  221. } RTP_PD_CONFIG_CAPS, *PRTP_PD_CONFIG_CAPS;
  222. #endif // _RTPPKTD_H_