Commit 54843124 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

winegstreamer: Use IWMSyncReader2_GetStreamSelected in the async reader.

parent 08effb90
......@@ -191,8 +191,6 @@ struct wm_reader *wm_reader_from_sync_reader_inner(IUnknown *inner);
HRESULT wm_reader_get_stream_sample(struct wm_reader *reader, IWMReaderCallbackAdvanced *callback_advanced, WORD stream_number,
INSSBuffer **ret_sample, QWORD *pts, QWORD *duration, DWORD *flags, WORD *ret_stream_number);
HRESULT wm_reader_get_stream_selection(struct wm_reader *reader,
WORD stream_number, WMT_STREAM_SELECTION *selection);
HRESULT wm_reader_set_allocate_for_output(struct wm_reader *reader, DWORD output, BOOL allocate);
HRESULT wm_reader_set_allocate_for_stream(struct wm_reader *reader, WORD stream_number, BOOL allocate);
HRESULT wm_reader_set_streams_selected(struct wm_reader *reader, WORD count,
......
......@@ -711,7 +711,7 @@ static HRESULT WINAPI WMReaderAdvanced_GetStreamSelected(IWMReaderAdvanced6 *ifa
TRACE("reader %p, stream_number %u, selection %p.\n", reader, stream_number, selection);
return wm_reader_get_stream_selection(reader->wm_reader, stream_number, selection);
return IWMSyncReader2_GetStreamSelected(reader->reader, stream_number, selection);
}
static HRESULT WINAPI WMReaderAdvanced_SetReceiveSelectionCallbacks(IWMReaderAdvanced6 *iface, BOOL get_callbacks)
......
......@@ -1740,25 +1740,6 @@ 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;
}
HRESULT wm_reader_set_allocate_for_output(struct wm_reader *reader, DWORD output, BOOL allocate)
{
struct wm_stream *stream;
......@@ -2164,10 +2145,22 @@ static HRESULT WINAPI reader_GetStreamSelected(IWMSyncReader2 *iface,
WORD stream_number, WMT_STREAM_SELECTION *selection)
{
struct wm_reader *reader = impl_from_IWMSyncReader2(iface);
struct wm_stream *stream;
TRACE("reader %p, stream_number %u, selection %p.\n", reader, stream_number, selection);
return wm_reader_get_stream_selection(reader, stream_number, selection);
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;
}
static HRESULT WINAPI reader_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