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";
25 MF_SOURCE_READER_INVALID_STREAM_INDEX
= 0xffffffff,
26 MF_SOURCE_READER_ALL_STREAMS
= 0xfffffffe,
27 MF_SOURCE_READER_ANY_STREAM
= 0xfffffffe,
28 MF_SOURCE_READER_FIRST_AUDIO_STREAM
= 0xfffffffd,
29 MF_SOURCE_READER_FIRST_VIDEO_STREAM
= 0xfffffffc,
30 MF_SOURCE_READER_MEDIASOURCE
= 0xffffffff,
31 MF_SOURCE_READER_CURRENT_TYPE_INDEX
= 0xffffffff
34 interface IMFMediaSource
;
38 uuid(70ae66f2
-c809
-4e4f
-8915-bdcb406b7993
),
41 interface IMFSourceReader
: IUnknown
43 HRESULT GetStreamSelection
([in] DWORD index
, [out] BOOL
*selected
);
44 HRESULT SetStreamSelection
([in] DWORD index
, [in] BOOL selected
);
45 HRESULT GetNativeMediaType
([in] DWORD index
, [in] DWORD typeindex
, [out] IMFMediaType
**type
);
46 HRESULT GetCurrentMediaType
([in] DWORD index
, [out] IMFMediaType
**type
);
47 HRESULT SetCurrentMediaType
([in] DWORD index
, [in, out] DWORD
*reserved
, [in] IMFMediaType
*type
);
48 HRESULT SetCurrentPosition
([in] REFGUID format
, [in] REFPROPVARIANT position
);
49 HRESULT ReadSample
([in] DWORD index
, [in] DWORD flags
, [out] DWORD
*actualindex
, [out] DWORD
*sampleflags
,
50 [out] LONGLONG
*timestamp
, [out] IMFSample
**sample
);
51 HRESULT Flush
([in] DWORD index
);
52 HRESULT GetServiceForStream
([in] DWORD index
, [in] REFGUID service
, [in] REFIID riid
, [out] void **object);
53 HRESULT GetPresentationAttribute
([in] DWORD index
, [in] REFGUID guid
, [out] PROPVARIANT
*attr
);
56 cpp_quote
( "HRESULT WINAPI MFCreateSourceReaderFromMediaSource(IMFMediaSource *source, IMFAttributes *attributes," )
57 cpp_quote
( " IMFSourceReader **reader);" )