Commit a1a51f54 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

winegstreamer: Implement IWMSyncReader::GetStreamSelected().

parent 3e0a9877
......@@ -168,6 +168,8 @@ struct wm_stream *wm_reader_get_stream_by_stream_number(struct wm_reader *reader
WORD stream_number);
HRESULT wm_reader_get_stream_sample(struct wm_stream *stream,
INSSBuffer **sample, QWORD *pts, QWORD *duration, DWORD *flags);
HRESULT wm_reader_get_stream_selection(struct wm_reader *reader,
WORD stream_number, WMT_STREAM_SELECTION *selection);
void wm_reader_init(struct wm_reader *reader, const struct wm_reader_ops *ops);
HRESULT wm_reader_open_file(struct wm_reader *reader, const WCHAR *filename);
HRESULT wm_reader_open_stream(struct wm_reader *reader, IStream *stream);
......
......@@ -1872,6 +1872,25 @@ HRESULT wm_reader_set_streams_selected(struct wm_reader *reader, WORD count,
return S_OK;
}
HRESULT wm_reader_get_stream_selection(struct wm_reader *reader,
WORD stream_number, WMT_STREAM_SELECTION *selection)
{
struct wm_stream *stream;
EnterCriticalSection(&reader->cs);
if (!(stream = wm_reader_get_stream_by_stream_number(reader, stream_number)))
{
LeaveCriticalSection(&reader->cs);
return E_INVALIDARG;
}
*selection = stream->selection;
LeaveCriticalSection(&reader->cs);
return S_OK;
}
void wm_reader_init(struct wm_reader *reader, const struct wm_reader_ops *ops)
{
reader->IWMHeaderInfo3_iface.lpVtbl = &header_info_vtbl;
......
......@@ -221,11 +221,14 @@ static HRESULT WINAPI WMSyncReader_GetStreamNumberForOutput(IWMSyncReader2 *ifac
return S_OK;
}
static HRESULT WINAPI WMSyncReader_GetStreamSelected(IWMSyncReader2 *iface, WORD stream_num, WMT_STREAM_SELECTION *selection)
static HRESULT WINAPI WMSyncReader_GetStreamSelected(IWMSyncReader2 *iface,
WORD stream_number, WMT_STREAM_SELECTION *selection)
{
struct sync_reader *This = impl_from_IWMSyncReader2(iface);
FIXME("(%p)->(%d %p): stub!\n", This, stream_num, selection);
return E_NOTIMPL;
struct sync_reader *reader = impl_from_IWMSyncReader2(iface);
TRACE("reader %p, stream_number %u, selection %p.\n", reader, stream_number, selection);
return wm_reader_get_stream_selection(&reader->reader, stream_number, selection);
}
static HRESULT WINAPI WMSyncReader_Open(IWMSyncReader2 *iface, const WCHAR *filename)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment