2 * Copyright (C) 2017 Alistair Leslie-Hughes
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.
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.
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
21 import
"mfobjects.idl";
23 interface IMFMediaSource
;
27 uuid(70ae66f2
-c809
-4e4f
-8915-bdcb406b7993
),
30 interface IMFSourceReader
: IUnknown
32 HRESULT GetStreamSelection
([in] DWORD index
, [out] BOOL
*selected
);
33 HRESULT SetStreamSelection
([in] DWORD index
, [in] BOOL selected
);
34 HRESULT GetNativeMediaType
([in] DWORD index
, [in] DWORD typeindex
, [out] IMFMediaType
**type
);
35 HRESULT GetCurrentMediaType
([in] DWORD index
, [out] IMFMediaType
**type
);
36 HRESULT SetCurrentMediaType
([in] DWORD index
, [in, out] DWORD
*reserved
, [in] IMFMediaType
*type
);
37 HRESULT SetCurrentPosition
([in] REFGUID format
, [in] REFPROPVARIANT position
);
38 HRESULT ReadSample
([in] DWORD index
, [in] DWORD flags
, [out] DWORD
*actualindex
, [out] DWORD
*sampleflags
,
39 [out] LONGLONG
*timestamp
, [out] IMFSample
**sample
);
40 HRESULT Flush
([in] DWORD index
);
41 HRESULT GetServiceForStream
([in] DWORD index
, [in] REFGUID service
, [in] REFIID riid
, [out] void **object);
42 HRESULT GetPresentationAttribute
([in] DWORD index
, [in] REFGUID guid
, [out] PROPVARIANT
*attr
);
45 cpp_quote
( "HRESULT WINAPI MFCreateSourceReaderFromMediaSource(IMFMediaSource *source, IMFAttributes *attributes," )
46 cpp_quote
( " IMFSourceReader **reader);" )