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

winegstreamer: Use IWMSyncReader2_GetReadStreamSamples in the async reader.

parent cbd7be3f
...@@ -196,8 +196,6 @@ HRESULT wm_reader_get_output_format(struct wm_reader *reader, DWORD output, ...@@ -196,8 +196,6 @@ HRESULT wm_reader_get_output_format(struct wm_reader *reader, DWORD output,
HRESULT wm_reader_get_output_format_count(struct wm_reader *reader, DWORD output, DWORD *count); HRESULT wm_reader_get_output_format_count(struct wm_reader *reader, DWORD output, DWORD *count);
HRESULT wm_reader_get_output_props(struct wm_reader *reader, DWORD output, HRESULT wm_reader_get_output_props(struct wm_reader *reader, DWORD output,
IWMOutputMediaProps **props); IWMOutputMediaProps **props);
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_reader *reader, IWMReaderCallbackAdvanced *callback_advanced, WORD stream_number, 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); INSSBuffer **ret_sample, QWORD *pts, QWORD *duration, DWORD *flags, WORD *ret_stream_number);
HRESULT wm_reader_get_stream_selection(struct wm_reader *reader, HRESULT wm_reader_get_stream_selection(struct wm_reader *reader,
......
...@@ -138,7 +138,6 @@ static void async_reader_deliver_sample(struct async_reader *reader, struct samp ...@@ -138,7 +138,6 @@ static void async_reader_deliver_sample(struct async_reader *reader, struct samp
{ {
IWMReaderCallbackAdvanced *callback_advanced = reader->callback_advanced; IWMReaderCallbackAdvanced *callback_advanced = reader->callback_advanced;
IWMReaderCallback *callback = reader->callback; IWMReaderCallback *callback = reader->callback;
struct wm_stream *stream;
BOOL read_compressed; BOOL read_compressed;
HRESULT hr; HRESULT hr;
...@@ -146,8 +145,9 @@ static void async_reader_deliver_sample(struct async_reader *reader, struct samp ...@@ -146,8 +145,9 @@ static void async_reader_deliver_sample(struct async_reader *reader, struct samp
reader, sample->stream, debugstr_time(sample->pts), debugstr_time(sample->duration), reader, sample->stream, debugstr_time(sample->pts), debugstr_time(sample->duration),
sample->flags, sample->buffer); sample->flags, sample->buffer);
stream = wm_reader_get_stream_by_stream_number(reader->wm_reader, sample->stream); if (FAILED(hr = IWMSyncReader2_GetReadStreamSamples(reader->reader, sample->stream,
read_compressed = stream->read_compressed; &read_compressed)))
read_compressed = FALSE;
LeaveCriticalSection(&reader->callback_cs); LeaveCriticalSection(&reader->callback_cs);
if (read_compressed) if (read_compressed)
......
...@@ -1580,7 +1580,7 @@ HRESULT wm_reader_close(struct wm_reader *reader) ...@@ -1580,7 +1580,7 @@ HRESULT wm_reader_close(struct wm_reader *reader)
return S_OK; return S_OK;
} }
struct wm_stream *wm_reader_get_stream_by_stream_number(struct wm_reader *reader, WORD stream_number) static struct wm_stream *wm_reader_get_stream_by_stream_number(struct wm_reader *reader, WORD stream_number)
{ {
if (stream_number && stream_number <= reader->stream_count) if (stream_number && stream_number <= reader->stream_count)
return &reader->streams[stream_number - 1]; return &reader->streams[stream_number - 1];
......
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