Commit 82d4fa9f authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

winegstreamer: Access the stream duration through a Unix library function.

parent 9a6aa56c
......@@ -245,6 +245,8 @@ struct unix_funcs
void (CDECL *wg_parser_stream_notify_qos)(struct wg_parser_stream *stream,
bool underflow, double proportion, int64_t diff, uint64_t timestamp);
/* Returns the duration in 100-nanosecond units. */
uint64_t (CDECL *wg_parser_stream_get_duration)(struct wg_parser_stream *stream);
/* start_pos and stop_pos are in 100-nanosecond units. */
bool (CDECL *wg_parser_stream_seek)(struct wg_parser_stream *stream, double rate,
uint64_t start_pos, uint64_t stop_pos, DWORD start_flags, DWORD stop_flags);
......
......@@ -977,7 +977,7 @@ static HRESULT parser_sink_connect(struct strmbase_sink *iface, IPin *peer, cons
{
struct parser_source *pin = filter->sources[i];
pin->seek.llDuration = pin->seek.llStop = pin->wg_stream->duration;
pin->seek.llDuration = pin->seek.llStop = unix_funcs->wg_parser_stream_get_duration(pin->wg_stream);
pin->seek.llCurrent = 0;
}
......
......@@ -492,6 +492,11 @@ static void CDECL wg_parser_stream_release_buffer(struct wg_parser_stream *strea
pthread_cond_signal(&stream->event_empty_cond);
}
static uint64_t CDECL wg_parser_stream_get_duration(struct wg_parser_stream *stream)
{
return stream->duration;
}
static bool CDECL wg_parser_stream_seek(struct wg_parser_stream *stream, double rate,
uint64_t start_pos, uint64_t stop_pos, DWORD start_flags, DWORD stop_flags)
{
......@@ -1724,6 +1729,7 @@ static const struct unix_funcs funcs =
wg_parser_stream_release_buffer,
wg_parser_stream_notify_qos,
wg_parser_stream_get_duration,
wg_parser_stream_seek,
};
......
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