xref: /aoo42x/main/avmedia/source/win/interface.hxx (revision cdf0e10c)
1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir 
28*cdf0e10cSrcweir extern "C" const CLSID CLSID_MediaDet;
29*cdf0e10cSrcweir extern "C" const IID IID_IMediaDet;
30*cdf0e10cSrcweir struct ISampleGrabber;
31*cdf0e10cSrcweir 
32*cdf0e10cSrcweir struct
33*cdf0e10cSrcweir #ifndef __MINGW32__
34*cdf0e10cSrcweir __declspec(uuid("65BD0710-24D2-4ff7-9324-ED2E5D3ABAFA")) __declspec(novtable)
35*cdf0e10cSrcweir #endif
36*cdf0e10cSrcweir IMediaDet : public IUnknown
37*cdf0e10cSrcweir {
38*cdf0e10cSrcweir public:
39*cdf0e10cSrcweir     virtual  HRESULT __stdcall get_Filter(
40*cdf0e10cSrcweir           IUnknown **pVal) = 0;
41*cdf0e10cSrcweir     virtual  HRESULT __stdcall put_Filter(
42*cdf0e10cSrcweir           IUnknown *newVal) = 0;
43*cdf0e10cSrcweir     virtual  HRESULT __stdcall get_OutputStreams(
44*cdf0e10cSrcweir           long *pVal) = 0;
45*cdf0e10cSrcweir     virtual  HRESULT __stdcall get_CurrentStream(
46*cdf0e10cSrcweir           long *pVal) = 0;
47*cdf0e10cSrcweir     virtual  HRESULT __stdcall put_CurrentStream(
48*cdf0e10cSrcweir          long newVal) = 0;
49*cdf0e10cSrcweir     virtual  HRESULT __stdcall get_StreamType(
50*cdf0e10cSrcweir           GUID *pVal) = 0;
51*cdf0e10cSrcweir     virtual  HRESULT __stdcall get_StreamTypeB(
52*cdf0e10cSrcweir           BSTR *pVal) = 0;
53*cdf0e10cSrcweir     virtual  HRESULT __stdcall get_StreamLength(
54*cdf0e10cSrcweir           double *pVal) = 0;
55*cdf0e10cSrcweir     virtual  HRESULT __stdcall get_Filename(
56*cdf0e10cSrcweir           BSTR *pVal) = 0;
57*cdf0e10cSrcweir     virtual  HRESULT __stdcall put_Filename(
58*cdf0e10cSrcweir           BSTR newVal) = 0;
59*cdf0e10cSrcweir     virtual  HRESULT __stdcall GetBitmapBits(
60*cdf0e10cSrcweir         double StreamTime,
61*cdf0e10cSrcweir          long *pBufferSize,
62*cdf0e10cSrcweir          char *pBuffer,
63*cdf0e10cSrcweir         long Width,
64*cdf0e10cSrcweir         long Height) = 0;
65*cdf0e10cSrcweir     virtual  HRESULT __stdcall WriteBitmapBits(
66*cdf0e10cSrcweir         double StreamTime,
67*cdf0e10cSrcweir         long Width,
68*cdf0e10cSrcweir         long Height,
69*cdf0e10cSrcweir          BSTR Filename) = 0;
70*cdf0e10cSrcweir     virtual  HRESULT __stdcall get_StreamMediaType(
71*cdf0e10cSrcweir           AM_MEDIA_TYPE *pVal) = 0;
72*cdf0e10cSrcweir     virtual  HRESULT __stdcall GetSampleGrabber(
73*cdf0e10cSrcweir           ISampleGrabber **ppVal) = 0;
74*cdf0e10cSrcweir     virtual  HRESULT __stdcall get_FrameRate(
75*cdf0e10cSrcweir           double *pVal) = 0;
76*cdf0e10cSrcweir     virtual  HRESULT __stdcall EnterBitmapGrabMode(
77*cdf0e10cSrcweir         double SeekTime) = 0;
78*cdf0e10cSrcweir };
79*cdf0e10cSrcweir 
80*cdf0e10cSrcweir extern "C" const IID IID_ISampleGrabberCB;
81*cdf0e10cSrcweir struct
82*cdf0e10cSrcweir #ifndef __MINGW32__
83*cdf0e10cSrcweir __declspec(uuid("0579154A-2B53-4994-B0D0-E773148EFF85")) __declspec(novtable)
84*cdf0e10cSrcweir #endif
85*cdf0e10cSrcweir ISampleGrabberCB : public IUnknown
86*cdf0e10cSrcweir {
87*cdf0e10cSrcweir public:
88*cdf0e10cSrcweir     virtual HRESULT __stdcall SampleCB(
89*cdf0e10cSrcweir         double SampleTime,
90*cdf0e10cSrcweir         IMediaSample *pSample) = 0;
91*cdf0e10cSrcweir     virtual HRESULT __stdcall BufferCB(
92*cdf0e10cSrcweir         double SampleTime,
93*cdf0e10cSrcweir         BYTE *pBuffer,
94*cdf0e10cSrcweir         long BufferLen) = 0;
95*cdf0e10cSrcweir };
96*cdf0e10cSrcweir 
97*cdf0e10cSrcweir extern "C" const IID IID_ISampleGrabber;
98*cdf0e10cSrcweir struct
99*cdf0e10cSrcweir #ifndef __MINGW32__
100*cdf0e10cSrcweir __declspec(uuid("6B652FFF-11FE-4fce-92AD-0266B5D7C78F")) __declspec(novtable)
101*cdf0e10cSrcweir #endif
102*cdf0e10cSrcweir ISampleGrabber : public IUnknown
103*cdf0e10cSrcweir {
104*cdf0e10cSrcweir public:
105*cdf0e10cSrcweir     virtual HRESULT __stdcall SetOneShot(
106*cdf0e10cSrcweir         BOOL OneShot) = 0;
107*cdf0e10cSrcweir     virtual HRESULT __stdcall SetMediaType(
108*cdf0e10cSrcweir         const AM_MEDIA_TYPE *pType) = 0;
109*cdf0e10cSrcweir     virtual HRESULT __stdcall GetConnectedMediaType(
110*cdf0e10cSrcweir         AM_MEDIA_TYPE *pType) = 0;
111*cdf0e10cSrcweir     virtual HRESULT __stdcall SetBufferSamples(
112*cdf0e10cSrcweir         BOOL BufferThem) = 0;
113*cdf0e10cSrcweir     virtual HRESULT __stdcall GetCurrentBuffer(
114*cdf0e10cSrcweir          long *pBufferSize,
115*cdf0e10cSrcweir          long *pBuffer) = 0;
116*cdf0e10cSrcweir     virtual HRESULT __stdcall GetCurrentSample(
117*cdf0e10cSrcweir          IMediaSample **ppSample) = 0;
118*cdf0e10cSrcweir     virtual HRESULT __stdcall SetCallback(
119*cdf0e10cSrcweir         ISampleGrabberCB *pCallback,
120*cdf0e10cSrcweir         long WhichMethodToCallback) = 0;
121*cdf0e10cSrcweir 
122*cdf0e10cSrcweir };
123*cdf0e10cSrcweir 
124