[PATCH 3/7] winegstreamer: Implement pausing the media source.
Huw Davies
huw at codeweavers.com
Wed Sep 22 04:17:32 CDT 2021
On Mon, Sep 06, 2021 at 05:11:05PM +0200, Giovanni Mascellani wrote:
> +static void flush_token_queue(struct media_stream *stream, BOOL send)
> +{
> + LONG i;
> +
> + for (i = 0; i < stream->token_queue_count; i++)
> + {
> + if (send)
> + {
> + HRESULT hr;
> + struct source_async_command *command;
> + if (SUCCEEDED(hr = source_create_async_op(SOURCE_ASYNC_REQUEST_SAMPLE, &command)))
> + {
> + command->u.request_sample.stream = stream;
> + command->u.request_sample.token = stream->token_queue[i];
> +
> + hr = MFPutWorkItem(stream->parent_source->async_commands_queue, &stream->parent_source->async_commands_callback, &command->IUnknown_iface);
This could do with a linewrap---155 is a bit too long.
> @@ -699,7 +784,6 @@ static HRESULT WINAPI media_stream_RequestSample(IMFMediaStream *iface, IUnknown
> IUnknown_AddRef(token);
> command->u.request_sample.token = token;
>
> - /* Once pause support is added, this will need to put into a stream queue, and synchronization will need to be added*/
> hr = MFPutWorkItem(stream->parent_source->async_commands_queue, &stream->parent_source->async_commands_callback, &command->IUnknown_iface);
And while you're touching code near it, this is rather long too.
Huw.
More information about the wine-devel
mailing list