xref: /aoo42x/main/avmedia/source/win/interface.hxx (revision 9ea84ac5)
1*9ea84ac5SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*9ea84ac5SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*9ea84ac5SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*9ea84ac5SAndrew Rist  * distributed with this work for additional information
6*9ea84ac5SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*9ea84ac5SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*9ea84ac5SAndrew Rist  * "License"); you may not use this file except in compliance
9*9ea84ac5SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*9ea84ac5SAndrew Rist  *
11*9ea84ac5SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*9ea84ac5SAndrew Rist  *
13*9ea84ac5SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*9ea84ac5SAndrew Rist  * software distributed under the License is distributed on an
15*9ea84ac5SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*9ea84ac5SAndrew Rist  * KIND, either express or implied.  See the License for the
17*9ea84ac5SAndrew Rist  * specific language governing permissions and limitations
18*9ea84ac5SAndrew Rist  * under the License.
19*9ea84ac5SAndrew Rist  *
20*9ea84ac5SAndrew Rist  *************************************************************/
21*9ea84ac5SAndrew Rist 
22*9ea84ac5SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir extern "C" const CLSID CLSID_MediaDet;
25cdf0e10cSrcweir extern "C" const IID IID_IMediaDet;
26cdf0e10cSrcweir struct ISampleGrabber;
27cdf0e10cSrcweir 
28cdf0e10cSrcweir struct
29cdf0e10cSrcweir #ifndef __MINGW32__
30cdf0e10cSrcweir __declspec(uuid("65BD0710-24D2-4ff7-9324-ED2E5D3ABAFA")) __declspec(novtable)
31cdf0e10cSrcweir #endif
32cdf0e10cSrcweir IMediaDet : public IUnknown
33cdf0e10cSrcweir {
34cdf0e10cSrcweir public:
35cdf0e10cSrcweir     virtual  HRESULT __stdcall get_Filter(
36cdf0e10cSrcweir           IUnknown **pVal) = 0;
37cdf0e10cSrcweir     virtual  HRESULT __stdcall put_Filter(
38cdf0e10cSrcweir           IUnknown *newVal) = 0;
39cdf0e10cSrcweir     virtual  HRESULT __stdcall get_OutputStreams(
40cdf0e10cSrcweir           long *pVal) = 0;
41cdf0e10cSrcweir     virtual  HRESULT __stdcall get_CurrentStream(
42cdf0e10cSrcweir           long *pVal) = 0;
43cdf0e10cSrcweir     virtual  HRESULT __stdcall put_CurrentStream(
44cdf0e10cSrcweir          long newVal) = 0;
45cdf0e10cSrcweir     virtual  HRESULT __stdcall get_StreamType(
46cdf0e10cSrcweir           GUID *pVal) = 0;
47cdf0e10cSrcweir     virtual  HRESULT __stdcall get_StreamTypeB(
48cdf0e10cSrcweir           BSTR *pVal) = 0;
49cdf0e10cSrcweir     virtual  HRESULT __stdcall get_StreamLength(
50cdf0e10cSrcweir           double *pVal) = 0;
51cdf0e10cSrcweir     virtual  HRESULT __stdcall get_Filename(
52cdf0e10cSrcweir           BSTR *pVal) = 0;
53cdf0e10cSrcweir     virtual  HRESULT __stdcall put_Filename(
54cdf0e10cSrcweir           BSTR newVal) = 0;
55cdf0e10cSrcweir     virtual  HRESULT __stdcall GetBitmapBits(
56cdf0e10cSrcweir         double StreamTime,
57cdf0e10cSrcweir          long *pBufferSize,
58cdf0e10cSrcweir          char *pBuffer,
59cdf0e10cSrcweir         long Width,
60cdf0e10cSrcweir         long Height) = 0;
61cdf0e10cSrcweir     virtual  HRESULT __stdcall WriteBitmapBits(
62cdf0e10cSrcweir         double StreamTime,
63cdf0e10cSrcweir         long Width,
64cdf0e10cSrcweir         long Height,
65cdf0e10cSrcweir          BSTR Filename) = 0;
66cdf0e10cSrcweir     virtual  HRESULT __stdcall get_StreamMediaType(
67cdf0e10cSrcweir           AM_MEDIA_TYPE *pVal) = 0;
68cdf0e10cSrcweir     virtual  HRESULT __stdcall GetSampleGrabber(
69cdf0e10cSrcweir           ISampleGrabber **ppVal) = 0;
70cdf0e10cSrcweir     virtual  HRESULT __stdcall get_FrameRate(
71cdf0e10cSrcweir           double *pVal) = 0;
72cdf0e10cSrcweir     virtual  HRESULT __stdcall EnterBitmapGrabMode(
73cdf0e10cSrcweir         double SeekTime) = 0;
74cdf0e10cSrcweir };
75cdf0e10cSrcweir 
76cdf0e10cSrcweir extern "C" const IID IID_ISampleGrabberCB;
77cdf0e10cSrcweir struct
78cdf0e10cSrcweir #ifndef __MINGW32__
79cdf0e10cSrcweir __declspec(uuid("0579154A-2B53-4994-B0D0-E773148EFF85")) __declspec(novtable)
80cdf0e10cSrcweir #endif
81cdf0e10cSrcweir ISampleGrabberCB : public IUnknown
82cdf0e10cSrcweir {
83cdf0e10cSrcweir public:
84cdf0e10cSrcweir     virtual HRESULT __stdcall SampleCB(
85cdf0e10cSrcweir         double SampleTime,
86cdf0e10cSrcweir         IMediaSample *pSample) = 0;
87cdf0e10cSrcweir     virtual HRESULT __stdcall BufferCB(
88cdf0e10cSrcweir         double SampleTime,
89cdf0e10cSrcweir         BYTE *pBuffer,
90cdf0e10cSrcweir         long BufferLen) = 0;
91cdf0e10cSrcweir };
92cdf0e10cSrcweir 
93cdf0e10cSrcweir extern "C" const IID IID_ISampleGrabber;
94cdf0e10cSrcweir struct
95cdf0e10cSrcweir #ifndef __MINGW32__
96cdf0e10cSrcweir __declspec(uuid("6B652FFF-11FE-4fce-92AD-0266B5D7C78F")) __declspec(novtable)
97cdf0e10cSrcweir #endif
98cdf0e10cSrcweir ISampleGrabber : public IUnknown
99cdf0e10cSrcweir {
100cdf0e10cSrcweir public:
101cdf0e10cSrcweir     virtual HRESULT __stdcall SetOneShot(
102cdf0e10cSrcweir         BOOL OneShot) = 0;
103cdf0e10cSrcweir     virtual HRESULT __stdcall SetMediaType(
104cdf0e10cSrcweir         const AM_MEDIA_TYPE *pType) = 0;
105cdf0e10cSrcweir     virtual HRESULT __stdcall GetConnectedMediaType(
106cdf0e10cSrcweir         AM_MEDIA_TYPE *pType) = 0;
107cdf0e10cSrcweir     virtual HRESULT __stdcall SetBufferSamples(
108cdf0e10cSrcweir         BOOL BufferThem) = 0;
109cdf0e10cSrcweir     virtual HRESULT __stdcall GetCurrentBuffer(
110cdf0e10cSrcweir          long *pBufferSize,
111cdf0e10cSrcweir          long *pBuffer) = 0;
112cdf0e10cSrcweir     virtual HRESULT __stdcall GetCurrentSample(
113cdf0e10cSrcweir          IMediaSample **ppSample) = 0;
114cdf0e10cSrcweir     virtual HRESULT __stdcall SetCallback(
115cdf0e10cSrcweir         ISampleGrabberCB *pCallback,
116cdf0e10cSrcweir         long WhichMethodToCallback) = 0;
117cdf0e10cSrcweir 
118cdf0e10cSrcweir };
119cdf0e10cSrcweir 
120