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.

288 lines
9.6 KiB

  1. /*++
  2. Copyright (c) 1994 - 1995 Microsoft Corporation. All Rights Reserved.
  3. Module Name:
  4. mpeg.h
  5. Abstract:
  6. These are the structures and defines that are used in the
  7. MPEG port driver.
  8. Author:
  9. Paul Shih (paulsh) 27-Mar-1994
  10. Revision History:
  11. --*/
  12. #ifndef _DDMPEG_H
  13. #define _DDMPEG_H
  14. #include "mpegcmn.h"
  15. //
  16. // Define the various device type values. Note that values used by Microsoft
  17. // Corporation are in the range 0-32767, and 32768-65535 are reserved for use
  18. // by customers.
  19. //
  20. #define FILE_DEVICE_MPEG_OVERLAY 0x00008200U
  21. #define FILE_DEVICE_MPEG_VIDEO 0x00008300U
  22. #define FILE_DEVICE_MPEG_AUDIO 0x00008600U
  23. //
  24. // Macro definition for defining IOCTL and FSCTL function control codes. Note
  25. // that function codes 0-2047 are reserved for Microsoft Corporation, and
  26. // 2048-4095 are reserved for customers.
  27. //
  28. #define MPEG_OVERLAY_IOCTL_BASE 0x820U
  29. #define MPEG_VIDEO_IOCTL_BASE 0x830U
  30. #define MPEG_AUDIO_IOCTL_BASE 0x860U
  31. //
  32. // Defines used in simplifying actual declarations of device IOCTL values below
  33. //
  34. #define CTL_CODE_MPEG_AUDIO(offset) CTL_CODE(FILE_DEVICE_MPEG_AUDIO, \
  35. MPEG_AUDIO_IOCTL_BASE + offset, \
  36. METHOD_BUFFERED, \
  37. FILE_ANY_ACCESS)
  38. #define CTL_CODE_MPEG_VIDEO(offset) CTL_CODE(FILE_DEVICE_MPEG_VIDEO, \
  39. MPEG_VIDEO_IOCTL_BASE + offset, \
  40. METHOD_BUFFERED, \
  41. FILE_ANY_ACCESS)
  42. #define CTL_CODE_MPEG_OVERLAY(offset) CTL_CODE(FILE_DEVICE_MPEG_OVERLAY, \
  43. MPEG_OVERLAY_IOCTL_BASE + offset, \
  44. METHOD_BUFFERED, \
  45. FILE_ANY_ACCESS)
  46. //****************************************************************************
  47. // MPEG_AUDIO device IOCTLs
  48. //****************************************************************************
  49. // Input: None
  50. // Output: None
  51. #define IOCTL_MPEG_AUDIO_RESET CTL_CODE_MPEG_AUDIO(0)
  52. // Input: None
  53. // Output: MPEG_TIME_STAMP
  54. #define IOCTL_MPEG_AUDIO_GET_STC CTL_CODE_MPEG_AUDIO(1)
  55. // Input: MPEG_TIME_STAMP
  56. // Output: None
  57. #define IOCTL_MPEG_AUDIO_SET_STC CTL_CODE_MPEG_AUDIO(2)
  58. // Input: None
  59. // Output: None
  60. #define IOCTL_MPEG_AUDIO_PLAY CTL_CODE_MPEG_AUDIO(3)
  61. // Input: None
  62. // Output: None
  63. #define IOCTL_MPEG_AUDIO_PAUSE CTL_CODE_MPEG_AUDIO(4)
  64. // Input: None
  65. // Output: None
  66. #define IOCTL_MPEG_AUDIO_STOP CTL_CODE_MPEG_AUDIO(5)
  67. // Input: None
  68. // Output: MPEG_AUDIO_DEVICE_INFO
  69. #define IOCTL_MPEG_AUDIO_QUERY_DEVICE CTL_CODE_MPEG_AUDIO(6)
  70. // Input: None
  71. // Output: None
  72. #define IOCTL_MPEG_AUDIO_END_OF_STREAM CTL_CODE_MPEG_AUDIO(7)
  73. // Input: MPEG_ATTRIBUTE
  74. // Output: none
  75. #define IOCTL_MPEG_AUDIO_SET_ATTRIBUTE CTL_CODE_MPEG_AUDIO(8)
  76. // Input: none
  77. // Output: MPEG_ATTRIBUTE
  78. #define IOCTL_MPEG_AUDIO_GET_ATTRIBUTE CTL_CODE_MPEG_AUDIO(9)
  79. // Input: MPEG_PACKET_LIST[]
  80. // Output: none
  81. #define IOCTL_MPEG_AUDIO_WRITE_PACKETS CTL_CODE_MPEG_AUDIO(10)
  82. //****************************************************************************
  83. // MPEG_VIDEO device IOCTLs
  84. //****************************************************************************
  85. // Input: None
  86. // Output: None
  87. #define IOCTL_MPEG_VIDEO_RESET CTL_CODE_MPEG_VIDEO(0)
  88. // Input: None
  89. // Output: MPEG_TIME_STAMP
  90. #define IOCTL_MPEG_VIDEO_GET_STC CTL_CODE_MPEG_VIDEO(1)
  91. // Input: MPEG_TIME_STAMP
  92. // Output: None
  93. #define IOCTL_MPEG_VIDEO_SET_STC CTL_CODE_MPEG_VIDEO(2)
  94. // Input: MPEG_TIME_STAMP (optional)
  95. // Output: MPEG_TIME_STAMP (optional)
  96. #define IOCTL_MPEG_VIDEO_SYNC CTL_CODE_MPEG_VIDEO(3)
  97. // Input: None
  98. // Output: None
  99. #define IOCTL_MPEG_VIDEO_PLAY CTL_CODE_MPEG_VIDEO(4)
  100. // Input: None
  101. // Output: None
  102. #define IOCTL_MPEG_VIDEO_PAUSE CTL_CODE_MPEG_VIDEO(5)
  103. // Input: None
  104. // Output: None
  105. #define IOCTL_MPEG_VIDEO_STOP CTL_CODE_MPEG_VIDEO(6)
  106. // Input: None
  107. // Output: MPEG_VIDEO_DEVICE_INFO
  108. #define IOCTL_MPEG_VIDEO_QUERY_DEVICE CTL_CODE_MPEG_VIDEO(7)
  109. // Input: None
  110. // Output: None
  111. #define IOCTL_MPEG_VIDEO_END_OF_STREAM CTL_CODE_MPEG_VIDEO(8)
  112. // Input: None
  113. // Output: None
  114. #define IOCTL_MPEG_VIDEO_CLEAR_BUFFER CTL_CODE_MPEG_VIDEO(9)
  115. // Input: MPEG_ATTRIBUTE
  116. // Output: none
  117. #define IOCTL_MPEG_VIDEO_SET_ATTRIBUTE CTL_CODE_MPEG_VIDEO(10)
  118. // Input: none
  119. // Output: MPEG_ATTRIBUTE
  120. #define IOCTL_MPEG_VIDEO_GET_ATTRIBUTE CTL_CODE_MPEG_VIDEO(11)
  121. // Input: MPEG_PACKET_LIST[]
  122. // Output: none
  123. #define IOCTL_MPEG_VIDEO_WRITE_PACKETS CTL_CODE_MPEG_VIDEO(12)
  124. //****************************************************************************
  125. // MPEG_OVERLAY device IOCTLs
  126. //****************************************************************************
  127. // Input: MPEG_OVERLAY_MODE
  128. // Output: None
  129. #define IOCTL_MPEG_OVERLAY_MODE CTL_CODE_MPEG_OVERLAY(0)
  130. // Input: MPEG_OVERLAY_PLACEMENT
  131. // Output: None
  132. #define IOCTL_MPEG_OVERLAY_SET_DESTINATION CTL_CODE_MPEG_OVERLAY(1)
  133. // Input: MPEG_OVERLAY_PLACEMENT (optional)
  134. // Output: MPEG_OVERLAY_PLACEMENT (optional)
  135. //#define IOCTL_MPEG_OVERLAY_ALIGN_WINDOW CTL_CODE_MPEG_OVERLAY(2)
  136. // Input: MPEG_OVERLAY_KEY
  137. // Output: None
  138. #define IOCTL_MPEG_OVERLAY_SET_VGAKEY CTL_CODE_MPEG_OVERLAY(3)
  139. // Input: MPEG_ATTRIBUTE
  140. // Output: none
  141. #define IOCTL_MPEG_OVERLAY_SET_ATTRIBUTE CTL_CODE_MPEG_OVERLAY(4)
  142. // Input: none
  143. // Output: MPEG_ATTRIBUTE
  144. #define IOCTL_MPEG_OVERLAY_GET_ATTRIBUTE CTL_CODE_MPEG_OVERLAY(5)
  145. // Input: MPEG_OVERLAY_BIT_MASK
  146. // Output: none
  147. #define IOCTL_MPEG_OVERLAY_SET_BIT_MASK CTL_CODE_MPEG_OVERLAY(6)
  148. // Input: None
  149. // Output: MPEG_OVERLAY_DEVICE_INFO
  150. #define IOCTL_MPEG_OVERLAY_QUERY_DEVICE CTL_CODE_MPEG_OVERLAY(7)
  151. //****************************************************************************
  152. // Data Structures
  153. //****************************************************************************
  154. // Used with: IOCTL_MPEG_VIDEO_QUERY_DEVICE
  155. typedef struct _MPEG_IOCTL_VIDEO_DEVICE_INFO {
  156. MPEG_DEVICE_STATE DeviceState; // Current MPEG device decode state
  157. ULONG DecoderBufferSize; // Size of the decoder buffer
  158. ULONG DecoderBufferFullness; // Used bytes in docoder buffer
  159. ULONG DecompressHeight; // Native MPEG decode height
  160. ULONG DecompressWidth; // Native MPEG decode width
  161. //!! below is bogus
  162. ULONG MaximumPendingRequest; // max allowable packet entries in queue
  163. ULONG CurrentPendingRequest; // number of requests not yet serviced
  164. ULONG StatusFlags; // Flags on the current driver status
  165. ULONG BytesOutstanding; // number of bytes outstand of current packet
  166. // !! above is bogus
  167. ULONG StarvationCounter; // The numer of times the device has
  168. // entered the starvation state
  169. } MPEG_IOCTL_VIDEO_DEVICE_INFO, *PMPEG_IOCTL_VIDEO_DEVICE_INFO;
  170. typedef struct _MPEG_IOCTL_AUDIO_PACKET {
  171. PVOID Packet; // Pointer to start of ISO MPEG packet
  172. ULONG Length; // Total length of packet
  173. } MPEG_IOCTL_AUDIO_PACKET, *PMPEG_IOCTL_AUDIO_PACKET;
  174. // Used with: IOCTL_MPEG_AUDIO_QUERY_DEVICE
  175. typedef struct _MPEG_IOCTL_AUDIO_DEVICE_INFO {
  176. MPEG_DEVICE_STATE DeviceState; // Current MPEG device decode state
  177. ULONG DecoderBufferSize; // Size of the decoder buffer
  178. ULONG DecoderBufferFullness; // Used bytes in docoder buffer
  179. //!! below is bogus
  180. ULONG MaximumPendingRequest; // max allowable packet entries in queue
  181. ULONG CurrentPendingRequest; // number of requests not yet serviced
  182. ULONG StatusFlags; // Flags on the current driver status
  183. ULONG DecoderBufferBytesInUse; // Number of bytes currently in buffer
  184. ULONG BytesOutstanding; // number of bytes outstand of current packet
  185. // !! above is bogus
  186. ULONG StarvationCounter; // The numer of times the device has
  187. // entered the starvation state
  188. } MPEG_IOCTL_AUDIO_DEVICE_INFO, *PMPEG_IOCTL_AUDIO_DEVICE_INFO;
  189. // Used with: IOCTL_MPEG_OVERLAY_QUERY_DEVICE
  190. typedef struct _MPEG_IOCTL_OVERLAY_DEVICE_INFO {
  191. ULONG MinDestinationHeight; // Minimum height of overlay
  192. ULONG MaxDestinationHeight; // Maximum height of overlay
  193. ULONG MinDestinationWidth; // Minimum width of overlay
  194. ULONG MaxDestinationWidth; // Maximum width of overlay
  195. } MPEG_IOCTL_OVERLAY_DEVICE_INFO, *PMPEG_IOCTL_OVERLAY_DEVICE_INFO;
  196. // Used with: IOCTL_MPEG_OVERLAY_SET_VGAKEY
  197. typedef struct _MPEG_IOCTL_OVERLAY_KEY {
  198. ULONG Color; // palette index or RGB color
  199. ULONG Mask; // significant bits in color
  200. } MPEG_IOCTL_OVERLAY_KEY,*PMPEG_IOCTL_OVERLAY_KEY;
  201. // Used with: IOCTL_MPEG_VIDEO_WRITE_PACKETS
  202. // IOCTL_MPEG_AUDIO_WRITE_PACKETS
  203. // This structure is passed as an array containing a list of packets.
  204. // The entry in the list can be a 0/NULL entry indicating End Of Stream
  205. // Used with: IOCTL_MPEG_AUDIO_GET_ATTRIBUTE
  206. // IOCTL_MPEG_AUDIO_SET_ATTRIBUTE
  207. // IOCTL_MPEG_VIDEO_GET_ATTRIBUTE
  208. // IOCTL_MPEG_VIDEO_SET_ATTRIBUTE
  209. // IOCTL_MPEG_OVERLAY_GET_ATTRIBUTE
  210. // IOCTL_MPEG_OVERLAY_SET_ATTRIBUTE
  211. #endif // #if _MPEG_H