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.

119 lines
3.7 KiB

  1. //------------------------------------------------------------------------------
  2. // File: MPEGType.h
  3. //
  4. // Desc: MPEG system stream compound type definition
  5. //
  6. // Copyright (c) 1996 - 2000, Microsoft Corporation. All rights reserved.
  7. //------------------------------------------------------------------------------
  8. #ifndef __MPEGTYPE__
  9. #define __MPEGTYPE__
  10. #ifdef __cplusplus
  11. extern "C" {
  12. #endif // __cplusplus
  13. //
  14. // AM_MPEGSYSTEMTYPE defines the format block contents for
  15. // data of type MEDIATYPE_MPEG1System when the format
  16. // block GUID is FORMAT_MPEG1System
  17. //
  18. // The format block consists of elements of type
  19. // AM_MPEGSYSTEMTYPE up to the length of the format block
  20. // Each format block is 8-byte aligned from the start of
  21. // the format block
  22. //
  23. typedef struct tagAM_MPEGSTREAMTYPE
  24. {
  25. DWORD dwStreamId; // Stream id of stream to process
  26. DWORD dwReserved; // 8-byte alignment
  27. AM_MEDIA_TYPE mt; // Type for substream - pbFormat is NULL
  28. BYTE bFormat[1]; // Format data
  29. } AM_MPEGSTREAMTYPE;
  30. typedef struct tagAM_MPEGSYSTEMTYPE
  31. {
  32. DWORD dwBitRate; // Bits per second
  33. DWORD cStreams; // Number of streams
  34. AM_MPEGSTREAMTYPE Streams[1];
  35. } AM_MPEGSYSTEMTYPE;
  36. //
  37. // Helper macros for AM_MPEGSTREAMTYPE
  38. //
  39. #define AM_MPEGSTREAMTYPE_ELEMENTLENGTH(pStreamType) \
  40. FIELD_OFFSET(AM_MPEGSTREAMTYPE, bFormat[(pStreamType)->mt.cbFormat])
  41. #define AM_MPEGSTREAMTYPE_NEXT(pStreamType) \
  42. ((AM_MPEGSTREAMTYPE *)((PBYTE)(pStreamType) + \
  43. ((AM_MPEGSTREAMTYPE_ELEMENTLENGTH(pStreamType) + 7) & ~7)))
  44. //
  45. // IMpegAudioDecoder
  46. //
  47. // Values for DualMode
  48. #define AM_MPEG_AUDIO_DUAL_MERGE 0
  49. #define AM_MPEG_AUDIO_DUAL_LEFT 1
  50. #define AM_MPEG_AUDIO_DUAL_RIGHT 2
  51. DECLARE_INTERFACE_(IMpegAudioDecoder, IUnknown) {
  52. STDMETHOD(get_FrequencyDivider) (THIS_
  53. unsigned long *pDivider /* [out] */
  54. ) PURE;
  55. STDMETHOD(put_FrequencyDivider) (THIS_
  56. unsigned long Divider /* [in] */
  57. ) PURE;
  58. STDMETHOD(get_DecoderAccuracy) (THIS_
  59. unsigned long *pAccuracy /* [out] */
  60. ) PURE;
  61. STDMETHOD(put_DecoderAccuracy) (THIS_
  62. unsigned long Accuracy /* [in] */
  63. ) PURE;
  64. STDMETHOD(get_Stereo) (THIS_
  65. unsigned long *pStereo /* [out] */
  66. ) PURE;
  67. STDMETHOD(put_Stereo) (THIS_
  68. unsigned long Stereo /* [in] */
  69. ) PURE;
  70. STDMETHOD(get_DecoderWordSize) (THIS_
  71. unsigned long *pWordSize /* [out] */
  72. ) PURE;
  73. STDMETHOD(put_DecoderWordSize) (THIS_
  74. unsigned long WordSize /* [in] */
  75. ) PURE;
  76. STDMETHOD(get_IntegerDecode) (THIS_
  77. unsigned long *pIntDecode /* [out] */
  78. ) PURE;
  79. STDMETHOD(put_IntegerDecode) (THIS_
  80. unsigned long IntDecode /* [in] */
  81. ) PURE;
  82. STDMETHOD(get_DualMode) (THIS_
  83. unsigned long *pIntDecode /* [out] */
  84. ) PURE;
  85. STDMETHOD(put_DualMode) (THIS_
  86. unsigned long IntDecode /* [in] */
  87. ) PURE;
  88. STDMETHOD(get_AudioFormat) (THIS_
  89. MPEG1WAVEFORMAT *lpFmt /* [out] */
  90. ) PURE;
  91. };
  92. #ifdef __cplusplus
  93. }
  94. #endif // __cplusplus
  95. #endif // __MPEGTYPE__