1 | /*
|
---|
2 | * Copyright (C) 2008 Google (Lei Zhang)
|
---|
3 | *
|
---|
4 | * This library is free software; you can redistribute it and/or
|
---|
5 | * modify it under the terms of the GNU Lesser General Public
|
---|
6 | * License as published by the Free Software Foundation; either
|
---|
7 | * version 2.1 of the License, or (at your option) any later version.
|
---|
8 | *
|
---|
9 | * This library is distributed in the hope that it will be useful,
|
---|
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
12 | * Lesser General Public License for more details.
|
---|
13 | *
|
---|
14 | * You should have received a copy of the GNU Lesser General Public
|
---|
15 | * License along with this library; if not, write to the Free Software
|
---|
16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
---|
17 | */
|
---|
18 |
|
---|
19 | import "oaidl.idl";
|
---|
20 | import "ocidl.idl";
|
---|
21 | /* import "dxtrans.idl"; */
|
---|
22 | import "amstream.idl";
|
---|
23 | import "msxml.idl";
|
---|
24 |
|
---|
25 | [
|
---|
26 | object,
|
---|
27 | uuid(0579154A-2B53-4994-B0D0-E773148EFF85),
|
---|
28 | local,
|
---|
29 | pointer_default(unique)
|
---|
30 | ]
|
---|
31 | interface ISampleGrabberCB : IUnknown
|
---|
32 | {
|
---|
33 | HRESULT SampleCB(
|
---|
34 | double SampleTime,
|
---|
35 | IMediaSample * pSample
|
---|
36 | );
|
---|
37 | HRESULT BufferCB(
|
---|
38 | double SampleTime,
|
---|
39 | BYTE * pBuffer,
|
---|
40 | LONG BufferLen
|
---|
41 | );
|
---|
42 | }
|
---|
43 |
|
---|
44 | [
|
---|
45 | object,
|
---|
46 | uuid(6B652FFF-11FE-4fce-92AD-0266B5D7C78F),
|
---|
47 | local,
|
---|
48 | pointer_default(unique)
|
---|
49 | ]
|
---|
50 | interface ISampleGrabber: IUnknown
|
---|
51 | {
|
---|
52 | HRESULT SetOneShot(
|
---|
53 | BOOL OneShot
|
---|
54 | );
|
---|
55 |
|
---|
56 | HRESULT SetMediaType(
|
---|
57 | const AM_MEDIA_TYPE * pType
|
---|
58 | );
|
---|
59 |
|
---|
60 | HRESULT GetConnectedMediaType(
|
---|
61 | AM_MEDIA_TYPE * pType
|
---|
62 | );
|
---|
63 |
|
---|
64 | HRESULT SetBufferSamples(
|
---|
65 | BOOL BufferThem
|
---|
66 | );
|
---|
67 |
|
---|
68 | HRESULT GetCurrentBuffer(
|
---|
69 | [in,out] LONG * pBufferSize,
|
---|
70 | [out] LONG * pBuffer
|
---|
71 | );
|
---|
72 |
|
---|
73 | HRESULT GetCurrentSample(
|
---|
74 | [out] IMediaSample ** ppSample
|
---|
75 | );
|
---|
76 |
|
---|
77 | HRESULT SetCallback(
|
---|
78 | ISampleGrabberCB * pCallback,
|
---|
79 | LONG WhichMethodToCallback
|
---|
80 | );
|
---|
81 | };
|
---|
82 |
|
---|
83 | [
|
---|
84 | object,
|
---|
85 | uuid(65bd0710-24d2-4FF7-9324-ed2e5d3abafa),
|
---|
86 | pointer_default(unique)
|
---|
87 | ]
|
---|
88 | interface IMediaDet : IUnknown
|
---|
89 | {
|
---|
90 | HRESULT get_Filter(
|
---|
91 | [out] IUnknown* *pVal
|
---|
92 | );
|
---|
93 |
|
---|
94 | HRESULT put_Filter(
|
---|
95 | IUnknown* newVal
|
---|
96 | );
|
---|
97 |
|
---|
98 | HRESULT get_OutputStreams(
|
---|
99 | [out] LONG *pVal
|
---|
100 | );
|
---|
101 |
|
---|
102 | HRESULT get_CurrentStream(
|
---|
103 | [out] LONG *pVal
|
---|
104 | );
|
---|
105 |
|
---|
106 | HRESULT put_CurrentStream(
|
---|
107 | LONG newVal
|
---|
108 | );
|
---|
109 |
|
---|
110 | HRESULT get_StreamType(
|
---|
111 | [out] GUID *pVal
|
---|
112 | );
|
---|
113 |
|
---|
114 | HRESULT get_StreamTypeB(
|
---|
115 | [out] BSTR *pVal
|
---|
116 | );
|
---|
117 |
|
---|
118 | HRESULT get_StreamLength(
|
---|
119 | [out] double *pVal
|
---|
120 | );
|
---|
121 |
|
---|
122 | HRESULT get_Filename(
|
---|
123 | [out] BSTR *pVal
|
---|
124 | );
|
---|
125 |
|
---|
126 | HRESULT put_Filename(
|
---|
127 | BSTR newVal
|
---|
128 | );
|
---|
129 |
|
---|
130 | HRESULT GetBitmapBits(
|
---|
131 | double StreamTime,
|
---|
132 | LONG * pBufferSize,
|
---|
133 | char * pBuffer,
|
---|
134 | LONG Width,
|
---|
135 | LONG Height
|
---|
136 | );
|
---|
137 |
|
---|
138 | HRESULT WriteBitmapBits(
|
---|
139 | double StreamTime,
|
---|
140 | LONG Width,
|
---|
141 | LONG Height,
|
---|
142 | BSTR Filename
|
---|
143 | );
|
---|
144 |
|
---|
145 | HRESULT get_StreamMediaType(
|
---|
146 | [out] AM_MEDIA_TYPE * pVal
|
---|
147 | );
|
---|
148 |
|
---|
149 | HRESULT GetSampleGrabber(
|
---|
150 | [out] ISampleGrabber ** ppVal
|
---|
151 | );
|
---|
152 |
|
---|
153 | HRESULT get_FrameRate(
|
---|
154 | [out] double *pVal
|
---|
155 | );
|
---|
156 |
|
---|
157 | HRESULT EnterBitmapGrabMode(
|
---|
158 | double SeekTime
|
---|
159 | );
|
---|
160 | };
|
---|
161 |
|
---|
162 | [
|
---|
163 | uuid(65BD0711-24D2-4ff7-9324-ED2E5D3ABAFA),
|
---|
164 | ]
|
---|
165 | coclass MediaDet
|
---|
166 | {
|
---|
167 | [default] interface IMediaDet;
|
---|
168 | };
|
---|
169 |
|
---|
170 | enum
|
---|
171 | {
|
---|
172 | E_NOTINTREE = 0x80040400,
|
---|
173 | E_RENDER_ENGINE_IS_BROKEN = 0x80040401,
|
---|
174 | E_MUST_INIT_RENDERER = 0x80040402,
|
---|
175 | E_NOTDETERMINED = 0x80040403,
|
---|
176 | E_NO_TIMELINE = 0x80040404,
|
---|
177 | S_WARN_OUTPUTRESET = 40404
|
---|
178 | };
|
---|