[PATCH v2 2/5] winegstreamer: Insert audioconvert into decoded audio streams.

Zebediah Figura zfigura at codeweavers.com
Tue Oct 6 21:10:16 CDT 2020


On 10/6/20 10:59 AM, Derek Lesho wrote:
> Signed-off-by: Derek Lesho <dlesho at codeweavers.com>
> ---
> v2: Addressed comment.
> ---
>  dlls/winegstreamer/media_source.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c
> index cbee412030d..a31fa1d6f6c 100644
> --- a/dlls/winegstreamer/media_source.c
> +++ b/dlls/winegstreamer/media_source.c
> @@ -410,6 +410,19 @@ static HRESULT media_stream_connect_to_sink(struct media_stream *stream)
>  
>          gst_element_sync_state_with_parent(videoconvert);
>      }
> +    else if (!strcmp(stream_type, "audio/x-raw"))
> +    {
> +        GstElement *audioconvert = gst_element_factory_make("audioconvert", NULL);
> +
> +        gst_bin_add(GST_BIN(stream->parent_source->container), audioconvert);
> +
> +        stream->my_sink = gst_element_get_static_pad(audioconvert, "sink");
> +
> +        assert(gst_pad_link(stream->their_src, stream->my_sink) == GST_PAD_LINK_OK);

This is already done outside of the if/else block in patch 1/5 now.

> +        assert(gst_element_link(audioconvert, stream->appsink));

You use "assert" here, but return E_FAIL in the first patch.

> +
> +        gst_element_sync_state_with_parent(audioconvert);
> +    }
>      else
>      {
>          stream->my_sink = gst_element_get_static_pad(stream->appsink, "sink");
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20201006/65b4e6f7/attachment.sig>


More information about the wine-devel mailing list