Re: Render Gstreamer video on Wayland subsurface.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Le mercredi 08 juin 2022 à 07:23 +0000, Kishan Dudhatra a écrit :
> Hi,
> 
> Thank you for the replay , however I was trying the same approach using gst-
> overlay.
> 
> I'veattachedthecode for reference, executing this does not give favorable
> response (actual result attached in the image below).
> 
> Can you advice on the missing part ?

Perhaps try the example:

https://gitlab.freedesktop.org/gstreamer/gstreamer/-/tree/main/subprojects/gst-plugins-bad/tests/examples/waylandsink

And try to see what your app is doing different ?

> >     static GstBusSyncReply
> >     bus_sync_handler (GstBus * bus, GstMessage * message, gpointer
> > user_data)
> >     {
> >       DemoApp *app = user_data;
> > 
> >       if (gst_is_wayland_display_handle_need_context_message (message)) {
> >         app->context = gst_wayland_display_handle_context_new (app-
> > >display);
> >         gst_element_set_context (GST_ELEMENT (GST_MESSAGE_SRC (message)),
> >             app->context);
> > 
> >         goto drop;
> >       } else if (gst_is_wayland_display_handle_need_context_message
> > (message)) {
> >         gst_video_overlay_set_window_handle (GST_VIDEO_OVERLAY
> > (GST_MESSAGE_SRC
> >                 (message)), (guintptr) subsurface1);
> >         gst_video_overlay_set_render_rectangle (GST_VIDEO_OVERLAY
> > (GST_MESSAGE_SRC
> >                 (message)), 0, 0, 200, 200);
> >         wl_surface_commit (subsurface1);
> >         printf ("commiting surface from bus sync\n");
> >         goto drop;
> >       }
> >       return GST_BUS_PASS;
> > 
> > 
> 
> Appreciate if any (offline?) hacks are also available. Any links ?
> 
> Thanks, in advance.
> 
> Wecurrently have mainsurface (black), subsurface(silver), and gstreamer Video.
> 
> Themain surface isrendered in arandom location, thesubsurfaceis rendered ina
> fixedlocation relativeto the mainsurface, andthe GstreamerVideo rendered out
> ofthe mainsurface. 
> 
> 
> From: Nicolas Dufresne <nicolas@xxxxxxxxxxxx>
> Sent: Wednesday, June 8, 2022 5:13 AM
> To: Discussion of the development of and with GStreamer
> <gstreamer-devel@xxxxxxxxxxxxxxxxxxxxx>
> Cc: gstreamer-embedded@xxxxxxxxxxxxxxxxxxxxx
> <gstreamer-embedded@xxxxxxxxxxxxxxxxxxxxx>; Kishan Dudhatra
> <kishan.dudhatra@xxxxxxxxxxxxx>
> Subject: Re: Render Gstreamer video on Wayland subsurface. 
> 
> 
> Le mar. 7 juin 2022, 06 h 30, Kishan Dudhatra via gstreamer-devel
> <gstreamer-devel@xxxxxxxxxxxxxxxxxxxxx> a écrit :
> > hello;
> > 
> > issue posted : gst-plugins-bad
> > 
> > I want to render GStreamer video on Wayland subsurface and using
> > waylandsink.
> > 
> > Currently i have created 1.main surface 2.Subsurface as shown in attached
> > image.
> > 
> > I want to render the GStreamer video on subsurface.
> 
> As subsurface have no framebuffer or size, this is pretty inconvenient way. I
> would rather suggest to use the existing mechanism. through the sync message
> handler reply to the message the query a window handle. Pass your top level
> surface handle, and position that using
> gst_video_overlay_set_render_rectangle().
> 
> > 
> > I checked the Waylandsink source and discovered that it creates the surface
> > itself and renders video on that surface. So, what I'm trying to figure out
> > is how to render video on my own applications subsurface.
> > 
> > 





[Index of Archives]     [Linux Embedded]     [Linux ARM Kernel]     [Linux for ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux Media]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux