home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 2000 May / PCP163A.iso / Runimage / Cbuilder4 / Include / MPEGTYPE.H < prev    next >
Encoding:
C/C++ Source or Header  |  1999-01-26  |  4.1 KB  |  126 lines

  1. //==========================================================================;
  2. //
  3. //  THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
  4. //  KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  5. //  IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
  6. //  PURPOSE.
  7. //
  8. //  Copyright (c) 1996 - 1997 Microsoft Corporation.  All Rights Reserved.
  9. //
  10. //--------------------------------------------------------------------------;
  11.  
  12. // MPEG system stream compound type definition
  13.  
  14. #ifndef __MPEGTYPE__
  15. #pragma option push -b -a8 -pc -A- /*P_O_Push_S*/
  16. #define __MPEGTYPE__
  17.  
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif // __cplusplus
  21.  
  22. //
  23. //  AM_MPEGSYSTEMTYPE defines the format block contents for
  24. //  data of type MEDIATYPE_MPEG1System when the format
  25. //  block GUID is FORMAT_MPEG1System
  26. //
  27. //  The format block consists of elements of type
  28. //  AM_MPEGSYSTEMTYPE up to the length of the format block
  29. //  Each format block is 8-byte aligned from the start of
  30. //  the format block
  31. //
  32.  
  33. typedef struct tagAM_MPEGSTREAMTYPE
  34. {
  35.     DWORD             dwStreamId;     // Stream id of stream to process
  36.     DWORD             dwReserved;     // 8-byte alignment
  37.     AM_MEDIA_TYPE     mt;             // Type for substream - pbFormat is NULL
  38.     BYTE              bFormat[1];     // Format data
  39. } AM_MPEGSTREAMTYPE;
  40.  
  41. typedef struct tagAM_MPEGSYSTEMTYPE
  42. {
  43.     DWORD             dwBitRate;      // Bits per second
  44.     DWORD             cStreams;       // Number of streams
  45.     AM_MPEGSTREAMTYPE Streams[1];
  46. } AM_MPEGSYSTEMTYPE;
  47.  
  48. //
  49. //  Helper macros for AM_MPEGSTREAMTYPE
  50. //
  51. #define AM_MPEGSTREAMTYPE_ELEMENTLENGTH(pStreamType)  \
  52.     FIELD_OFFSET(AM_MPEGSTREAMTYPE, bFormat[(pStreamType)->mt.cbFormat])
  53. #define AM_MPEGSTREAMTYPE_NEXT(pStreamType)           \
  54.     ((AM_MPEGSTREAMTYPE *)((PBYTE)(pStreamType) +     \
  55.      ((AM_MPEGSTREAMTYPE_ELEMENTLENGTH(pStreamType) + 7) & ~7)))
  56.  
  57. //
  58. // IMpegAudioDecoder
  59. //
  60.  
  61. // Values for DualMode
  62. #define AM_MPEG_AUDIO_DUAL_MERGE 0
  63. #define AM_MPEG_AUDIO_DUAL_LEFT  1
  64. #define AM_MPEG_AUDIO_DUAL_RIGHT 2
  65.  
  66. DECLARE_INTERFACE_(IMpegAudioDecoder, IUnknown) {
  67.  
  68.     STDMETHOD(get_FrequencyDivider) (THIS_
  69.                            unsigned long *pDivider   /* [out] */
  70.                            ) PURE;
  71.  
  72.     STDMETHOD(put_FrequencyDivider) (THIS_
  73.                            unsigned long Divider     /* [in] */
  74.                            ) PURE;
  75.  
  76.     STDMETHOD(get_DecoderAccuracy) (THIS_
  77.                            unsigned long *pAccuracy  /* [out] */
  78.                            ) PURE;
  79.  
  80.     STDMETHOD(put_DecoderAccuracy) (THIS_
  81.                            unsigned long Accuracy    /* [in] */
  82.                            ) PURE;
  83.  
  84.     STDMETHOD(get_Stereo) (THIS_
  85.                            unsigned long *pStereo    /* [out] */
  86.                            ) PURE;
  87.  
  88.     STDMETHOD(put_Stereo) (THIS_
  89.                            unsigned long Stereo      /* [in] */
  90.                            ) PURE;
  91.  
  92.     STDMETHOD(get_DecoderWordSize) (THIS_
  93.                            unsigned long *pWordSize  /* [out] */
  94.                            ) PURE;
  95.  
  96.     STDMETHOD(put_DecoderWordSize) (THIS_
  97.                            unsigned long WordSize    /* [in] */
  98.                            ) PURE;
  99.  
  100.     STDMETHOD(get_IntegerDecode) (THIS_
  101.                            unsigned long *pIntDecode /* [out] */
  102.                            ) PURE;
  103.  
  104.     STDMETHOD(put_IntegerDecode) (THIS_
  105.                            unsigned long IntDecode   /* [in] */
  106.                            ) PURE;
  107.  
  108.     STDMETHOD(get_DualMode) (THIS_
  109.                            unsigned long *pIntDecode /* [out] */
  110.                            ) PURE;
  111.  
  112.     STDMETHOD(put_DualMode) (THIS_
  113.                            unsigned long IntDecode   /* [in] */
  114.                            ) PURE;
  115.  
  116.     STDMETHOD(get_AudioFormat) (THIS_
  117.                            MPEG1WAVEFORMAT *lpFmt    /* [out] */
  118.                            ) PURE;
  119. };
  120.  
  121. #ifdef __cplusplus
  122. }
  123. #endif // __cplusplus
  124. #pragma option pop /*P_O_Pop*/
  125. #endif // __MPEGTYPE__
  126.