Lei Zhang | 3a69b83 | 2008-02-13 12:59:43 -0800 | [diff] [blame] | 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, |
Michael Stefaniuc | b14c005 | 2009-03-12 01:42:24 +0100 | [diff] [blame^] | 40 | LONG BufferLen |
Lei Zhang | 3a69b83 | 2008-02-13 12:59:43 -0800 | [diff] [blame] | 41 | ); |
| 42 | } |
Lei Zhang | 121e8eb | 2008-02-13 13:10:23 -0800 | [diff] [blame] | 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( |
Michael Stefaniuc | b14c005 | 2009-03-12 01:42:24 +0100 | [diff] [blame^] | 69 | [in,out] LONG * pBufferSize, |
| 70 | [out] LONG * pBuffer |
Lei Zhang | 121e8eb | 2008-02-13 13:10:23 -0800 | [diff] [blame] | 71 | ); |
| 72 | |
| 73 | HRESULT GetCurrentSample( |
| 74 | [out] IMediaSample ** ppSample |
| 75 | ); |
| 76 | |
| 77 | HRESULT SetCallback( |
| 78 | ISampleGrabberCB * pCallback, |
Michael Stefaniuc | b14c005 | 2009-03-12 01:42:24 +0100 | [diff] [blame^] | 79 | LONG WhichMethodToCallback |
Lei Zhang | 121e8eb | 2008-02-13 13:10:23 -0800 | [diff] [blame] | 80 | ); |
| 81 | }; |
Lei Zhang | 6e2ce69 | 2008-02-13 00:49:37 -0800 | [diff] [blame] | 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( |
Michael Stefaniuc | b14c005 | 2009-03-12 01:42:24 +0100 | [diff] [blame^] | 99 | [out] LONG *pVal |
Lei Zhang | 6e2ce69 | 2008-02-13 00:49:37 -0800 | [diff] [blame] | 100 | ); |
| 101 | |
| 102 | HRESULT get_CurrentStream( |
Michael Stefaniuc | b14c005 | 2009-03-12 01:42:24 +0100 | [diff] [blame^] | 103 | [out] LONG *pVal |
Lei Zhang | 6e2ce69 | 2008-02-13 00:49:37 -0800 | [diff] [blame] | 104 | ); |
| 105 | |
| 106 | HRESULT put_CurrentStream( |
Michael Stefaniuc | b14c005 | 2009-03-12 01:42:24 +0100 | [diff] [blame^] | 107 | LONG newVal |
Lei Zhang | 6e2ce69 | 2008-02-13 00:49:37 -0800 | [diff] [blame] | 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, |
Michael Stefaniuc | b14c005 | 2009-03-12 01:42:24 +0100 | [diff] [blame^] | 132 | LONG * pBufferSize, |
Lei Zhang | 6e2ce69 | 2008-02-13 00:49:37 -0800 | [diff] [blame] | 133 | char * pBuffer, |
Michael Stefaniuc | b14c005 | 2009-03-12 01:42:24 +0100 | [diff] [blame^] | 134 | LONG Width, |
| 135 | LONG Height |
Lei Zhang | 6e2ce69 | 2008-02-13 00:49:37 -0800 | [diff] [blame] | 136 | ); |
| 137 | |
| 138 | HRESULT WriteBitmapBits( |
| 139 | double StreamTime, |
Michael Stefaniuc | b14c005 | 2009-03-12 01:42:24 +0100 | [diff] [blame^] | 140 | LONG Width, |
| 141 | LONG Height, |
Lei Zhang | 6e2ce69 | 2008-02-13 00:49:37 -0800 | [diff] [blame] | 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 | }; |