Output WebRTCBin to GTK Window using VideoOverlay
Busayo Famutimi
famutimi.busayo at gmail.com
Fri Jul 3 11:40:38 UTC 2020
Hi Matthew,
Thanks for your response.
However, I am still getting the same error message when I called the
overlay function on my sink element.
>
> *(webrtc-sendrecv.exe:14920): GLib-GObject-WARNING **: 12:35:52.095:
> invalid cast from 'GstAutoVideoSink' to 'GstVideoOverlay'**
> (webrtc-sendrecv.exe:14920): CRITICAL **: 12:35:52.095:
> gst_video_overlay_set_window_handle: assertion 'GST_IS_VIDEO_OVERLAY
> (overlay)' failed*
>
I then looked up the documentation
<https://gstreamer.freedesktop.org/documentation/autodetect/autovideosink.html?gi-language=c#autovideosink-page>
and I noticed that autovideosink does not implement the GstVideoOverlay
interface.
How can I fix this problem?
Thanks.
On Fri, Jul 3, 2020 at 3:01 AM Matthew Waters <ystreet00 at gmail.com> wrote:
> GstVideoOverlay is an interface that is implemented by most video sinks.
> You need to call gst_video_overlay_set_window_handle() on your video sink,
> not webrtcbin.
>
> On 3/7/20 6:40 am, Busayo Famutimi wrote:
>
> Hi Devs,
>
> I am trying to display a video stream from WebRTCBin to a GTK Window using
> VideoOverlay rather than have gstreamer create it's own window.
>
> The code works fine (gstwebrtc-demos - sendrecv.c
> <https://github.com/centricular/gstwebrtc-demos/blob/master/sendrecv/gst/webrtc-sendrecv.c>).
> I managed to tweak it to suit my intended purpose but I keep getting the
> following error:
>
>
>>
>> *GLib-GObject-WARNING **: 21:14:46.552: invalid cast from 'GstWebRTCBin'
>> to 'GstVideoOverlay' ** (webrtc-sendrecv.exe:6304): CRITICAL **:
>> 21:14:46.552: gst_video_overlay_set_window_handle: assertion
>> 'GST_IS_VIDEO_OVERLAY (overlay)' failed*
>>
>
> The error is coming from this line of the code:
>
>>
>> */* Pass it to playbin, which implements VideoOverlay and will forward it
>> to the video sink */
>> gst_video_overlay_set_window_handle(GST_VIDEO_OVERLAY(webrtc1),
>> window_handle);*
>>
>
> Please how can I handle this situation?
>
> Thanks.
>
> _______________________________________________
> gstreamer-devel mailing listgstreamer-devel at lists.freedesktop.orghttps://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20200703/cde229eb/attachment.htm>
More information about the gstreamer-devel
mailing list