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