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