xref: /reactos/sdk/include/dxsdk/mpegtype.h (revision 321bcc05)
1 
2 #ifndef __MPEGTYPE__
3 #define __MPEGTYPE__
4 
5 #ifdef __cplusplus
6 extern "C" {
7 #endif
8 
9 
10 
11 typedef struct tagAM_MPEGSTREAMTYPE
12 {
13   DWORD dwStreamId;
14   DWORD dwReserved;
15   AM_MEDIA_TYPE mt;
16   BYTE bFormat[1];
17 } AM_MPEGSTREAMTYPE;
18 
19 typedef struct tagAM_MPEGSYSTEMTYPE
20 {
21   DWORD dwBitRate;
22   DWORD cStreams;
23   AM_MPEGSTREAMTYPE Streams[1];
24 } AM_MPEGSYSTEMTYPE;
25 
26 DECLARE_INTERFACE_(IMpegAudioDecoder, IUnknown)
27 {
28   STDMETHOD(get_FrequencyDivider) (THIS_ unsigned long *pDivider) PURE;
29   STDMETHOD(put_FrequencyDivider) (THIS_ unsigned long Divider) PURE;
30   STDMETHOD(get_DecoderAccuracy) (THIS_ unsigned long *pAccuracy) PURE;
31   STDMETHOD(put_DecoderAccuracy) (THIS_ unsigned long Accuracy) PURE;
32   STDMETHOD(get_Stereo) (THIS_ unsigned long *pStereo ) PURE;
33   STDMETHOD(put_Stereo) (THIS_ unsigned long Stereo) PURE;
34   STDMETHOD(get_DecoderWordSize) (THIS_ unsigned long *pWordSize) PURE;
35   STDMETHOD(put_DecoderWordSize) (THIS_ unsigned long WordSize) PURE;
36   STDMETHOD(get_IntegerDecode) (THIS_ unsigned long *pIntDecode) PURE;
37   STDMETHOD(put_IntegerDecode) (THIS_ unsigned long IntDecode) PURE;
38   STDMETHOD(get_DualMode) (THIS_ unsigned long *pIntDecode) PURE;
39   STDMETHOD(put_DualMode) (THIS_ unsigned long IntDecode) PURE;
40   STDMETHOD(get_AudioFormat) (THIS_ MPEG1WAVEFORMAT *lpFmt) PURE;
41 };
42 
43 #ifdef
44 }
45 #endif
46 #endif
47 
48 #define AM_MPEGSTREAMTYPE_ELEMENTLENGTH(pStreamType)  FIELD_OFFSET(AM_MPEGSTREAMTYPE, bFormat[(pStreamType)->mt.cbFormat])
49 #define AM_MPEGSTREAMTYPE_NEXT(pStreamType)           ((AM_MPEGSTREAMTYPE *)((PBYTE)(pStreamType) + ((AM_MPEGSTREAMTYPE_ELEMENTLENGTH(pStreamType) + 7) & ~7)))
50 #define AM_MPEG_AUDIO_DUAL_MERGE 0
51 #define AM_MPEG_AUDIO_DUAL_LEFT  1
52 #define AM_MPEG_AUDIO_DUAL_RIGHT 2
53 
54