/[cvs]/api/include/DShowIDL/mmstream.idl
ViewVC logotype

Annotation of /api/include/DShowIDL/mmstream.idl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (hide annotations) (vendor branch)
Sun Jul 1 20:47:59 2001 UTC (23 years, 5 months ago) by bearsoft
Branch: lazy, MAIN
CVS Tags: start, HEAD
Changes since 1.1: +0 -0 lines
First import

1 bearsoft 1.1 //------------------------------------------------------------------------------
2     // File: MMStream.idl
3     //
4     // Desc: MultiMedia streaming interface IDL file.
5     //
6     // Copyright (c) 1998 - 2000, Microsoft Corporation. All rights reserved.
7     //------------------------------------------------------------------------------
8    
9    
10     import "unknwn.idl";
11    
12     cpp_quote("#define MS_ERROR_CODE(x) MAKE_HRESULT(1, FACILITY_ITF, (x) + 0x400)")
13     cpp_quote("#define MS_SUCCESS_CODE(x) MAKE_HRESULT(0, FACILITY_ITF, x)")
14     cpp_quote("#define MS_S_PENDING MS_SUCCESS_CODE(1)")
15     cpp_quote("#define MS_S_NOUPDATE MS_SUCCESS_CODE(2)")
16     cpp_quote("#define MS_S_ENDOFSTREAM MS_SUCCESS_CODE(3)")
17    
18     cpp_quote("#define MS_E_SAMPLEALLOC MS_ERROR_CODE(1)")
19     cpp_quote("#define MS_E_PURPOSEID MS_ERROR_CODE(2)")
20     cpp_quote("#define MS_E_NOSTREAM MS_ERROR_CODE(3)")
21     cpp_quote("#define MS_E_NOSEEKING MS_ERROR_CODE(4)")
22     cpp_quote("#define MS_E_INCOMPATIBLE MS_ERROR_CODE(5)")
23     cpp_quote("#define MS_E_BUSY MS_ERROR_CODE(6)")
24     cpp_quote("#define MS_E_NOTINIT MS_ERROR_CODE(7)")
25     cpp_quote("#define MS_E_SOURCEALREADYDEFINED MS_ERROR_CODE(8)")
26     cpp_quote("#define MS_E_INVALIDSTREAMTYPE MS_ERROR_CODE(9)")
27     cpp_quote("#define MS_E_NOTRUNNING MS_ERROR_CODE(10)")
28    
29     cpp_quote("// {A35FF56A-9FDA-11d0-8FDF-00C04FD9189D}")
30     cpp_quote("DEFINE_GUID(MSPID_PrimaryVideo, ")
31     cpp_quote("0xa35ff56a, 0x9fda, 0x11d0, 0x8f, 0xdf, 0x0, 0xc0, 0x4f, 0xd9, 0x18, 0x9d);")
32    
33     cpp_quote("// {A35FF56B-9FDA-11d0-8FDF-00C04FD9189D}")
34     cpp_quote("DEFINE_GUID(MSPID_PrimaryAudio,")
35     cpp_quote("0xa35ff56b, 0x9fda, 0x11d0, 0x8f, 0xdf, 0x0, 0xc0, 0x4f, 0xd9, 0x18, 0x9d);")
36    
37     cpp_quote("#if(_WIN32_WINNT < 0x0400)")
38     typedef void (__stdcall * PAPCFUNC)(DWORD_PTR dwParam);
39     cpp_quote("#endif")
40    
41     typedef LONGLONG STREAM_TIME;
42    
43     typedef GUID MSPID;
44     typedef REFGUID REFMSPID;
45    
46     typedef enum {
47     STREAMTYPE_READ = 0,
48     STREAMTYPE_WRITE = 1,
49     STREAMTYPE_TRANSFORM= 2
50     } STREAM_TYPE;
51    
52     typedef enum {
53     STREAMSTATE_STOP = 0,
54     STREAMSTATE_RUN = 1
55     } STREAM_STATE;
56    
57    
58     typedef enum {
59     COMPSTAT_NOUPDATEOK = 0x00000001,
60     COMPSTAT_WAIT = 0x00000002,
61     COMPSTAT_ABORT = 0x00000004
62     } COMPLETION_STATUS_FLAGS;
63    
64     // Flags for GetInformation
65     enum {
66     MMSSF_HASCLOCK = 0x00000001,
67     MMSSF_SUPPORTSEEK = 0x00000002,
68     MMSSF_ASYNCHRONOUS = 0x00000004
69     };
70    
71     // Flags for StreamSample::Update
72     enum {
73     SSUPDATE_ASYNC = 0x00000001,
74     SSUPDATE_CONTINUOUS = 0x00000002
75     };
76    
77     interface IMultiMediaStream;
78     interface IMediaStream;
79     interface IStreamSample;
80    
81     // IMultiMediaStream interface
82     [
83     object,
84     local,
85     uuid(B502D1BC-9A57-11d0-8FDE-00C04FD9189D),
86     pointer_default(unique)
87     ]
88     interface IMultiMediaStream : IUnknown {
89    
90     HRESULT GetInformation(
91     [out] DWORD *pdwFlags,
92     [out] STREAM_TYPE *pStreamType);
93    
94     HRESULT GetMediaStream(
95     [in] REFMSPID idPurpose,
96     [out] IMediaStream **ppMediaStream);
97    
98     HRESULT EnumMediaStreams(
99     [in] long Index,
100     [out] IMediaStream **ppMediaStream);
101    
102     HRESULT GetState(
103     [out] STREAM_STATE *pCurrentState);
104    
105     HRESULT SetState(
106     [in] STREAM_STATE NewState);
107    
108     HRESULT GetTime(
109     [out] STREAM_TIME *pCurrentTime);
110    
111     HRESULT GetDuration(
112     [out] STREAM_TIME *pDuration);
113    
114     HRESULT Seek(
115     [in] STREAM_TIME SeekTime);
116    
117     HRESULT GetEndOfStreamEventHandle(
118     [out] HANDLE *phEOS);
119     };
120    
121    
122     // IMediaStream interface
123     [
124     object,
125     uuid(B502D1BD-9A57-11d0-8FDE-00C04FD9189D),
126     pointer_default(unique)
127     ]
128     interface IMediaStream : IUnknown {
129    
130     HRESULT GetMultiMediaStream(
131     [out] IMultiMediaStream **ppMultiMediaStream);
132    
133     HRESULT GetInformation(
134     [out] MSPID *pPurposeId,
135     [out] STREAM_TYPE *pType);
136    
137     HRESULT SetSameFormat(
138     [in] IMediaStream *pStreamThatHasDesiredFormat,
139     [in] DWORD dwFlags);
140    
141     HRESULT AllocateSample(
142     [in] DWORD dwFlags,
143     [out] IStreamSample **ppSample);
144    
145    
146     HRESULT CreateSharedSample(
147     [in] IStreamSample *pExistingSample,
148     [in] DWORD dwFlags,
149     [out] IStreamSample **ppNewSample);
150    
151     HRESULT SendEndOfStream(DWORD dwFlags);
152     };
153    
154    
155     // IStreamSample interface
156     [
157     object,
158     local,
159     uuid(B502D1BE-9A57-11d0-8FDE-00C04FD9189D),
160     pointer_default(unique)
161     ]
162     interface IStreamSample : IUnknown {
163    
164     HRESULT GetMediaStream(
165     [in] IMediaStream **ppMediaStream);
166    
167     HRESULT GetSampleTimes(
168     [out] STREAM_TIME * pStartTime,
169     [out] STREAM_TIME * pEndTime,
170     [out] STREAM_TIME * pCurrentTime);
171    
172     HRESULT SetSampleTimes(
173     [in] const STREAM_TIME *pStartTime,
174     [in] const STREAM_TIME *pEndTime);
175    
176     HRESULT Update(
177     [in] DWORD dwFlags,
178     [in] HANDLE hEvent,
179     [in] PAPCFUNC pfnAPC,
180     [in] DWORD_PTR dwAPCData);
181    
182     HRESULT CompletionStatus(
183     [in] DWORD dwFlags,
184     [in] DWORD dwMilliseconds);
185     };
186    
187    
188    
189    

root@recompile.se
ViewVC Help
Powered by ViewVC 1.1.26