I have the C code:
g_object_set(G_OBJECT(play_bin->gobj()), "video-sink", video_element, nullptr); which does the right thing gtkmm wise in that the video widget associated with the video_element is embedded in the right GTK container. However if instead I use the C++: play_bin->set_property("video-sink", video_element); a new video window is created in addition to the one that should contain it. I suspect I am missing something very simple. -- Russel. ============================================================================= Dr Russel Winder t: +44 20 7585 2200 voip: sip:[hidden email] 41 Buckmaster Road m: +44 7770 465 077 xmpp: [hidden email] London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel signature.asc (849 bytes) Download Attachment |
On Tue, 2017-09-12 at 14:47 +0100, Russel Winder wrote:
> I have the C code: > > g_object_set(G_OBJECT(play_bin->gobj()), "video-sink", video_element, > nullptr); > > which does the right thing gtkmm wise in that the video widget associated with > the video_element is embedded in the right GTK container. However if instead I > use the C++: > > play_bin->set_property("video-sink", video_element); > > a new video window is created in addition to the one that should contain it. > > I suspect I am missing something very simple. this so we can take a look. From the two lines of code it seems like it should be equivalent. -- Sebastian Dröge, Centricular Ltd · https://www.centricular.com _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel signature.asc (981 bytes) Download Attachment |
On Tue, 2017-09-12 at 17:13 +0300, Sebastian Dröge wrote:
> […] > > Best would be if you could provide a compileable/runnable testcase for > this so we can take a look. > > From the two lines of code it seems like it should be equivalent. OK, so I wasn't being totally stupid being surprised! I fear it may be difficult to extract a trivial example from the Me TV context, but given the need for an actual test case, I'll give it a go. -- Russel. ============================================================================= Dr Russel Winder t: +44 20 7585 2200 voip: sip:[hidden email] 41 Buckmaster Road m: +44 7770 465 077 xmpp: [hidden email] London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel signature.asc (849 bytes) Download Attachment |
On Tue, 2017-09-12 at 16:08 +0100, Russel Winder wrote:
> […] > > I fear it may be difficult to extract a trivial example from the Me TV > context, but given the need for an actual test case, I'll give it a go. It seems that any C++/gstreamermm code dealing with the construction of gtkglsink, gtksink, glsinkbin, and attaching as the video-sink to the playbin stops the "overlay" and causes a new window to appear. At least in the Me TV context. I'll see if I can transpose this problem into a small example. -- Russel. ============================================================================= Dr Russel Winder t: +44 20 7585 2200 voip: sip:[hidden email] 41 Buckmaster Road m: +44 7770 465 077 xmpp: [hidden email] London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel signature.asc (849 bytes) Download Attachment |
Le mardi 12 septembre 2017 à 17:51 +0100, Russel Winder a écrit :
> It seems that any C++/gstreamermm code dealing with the construction of > gtkglsink, gtksink, glsinkbin, and attaching as the video-sink to the playbin > stops the "overlay" and causes a new window to appear. At least in the Me TV > context. I'll see if I can transpose this problem into a small example. Ignore glsinkbin, it's just a wrapper. gtkglsink, gtksink, qmlglsink are widget sink. They don't support GstVideoOverlay. Use glimagesink, xvimagesink if you don't want to use a separate window for overlaying your video. The widget based sink are design to be composed within your widget tree. Instead of using the GstVideoOverlay interface, you get the "widget" property on them, and add the widget to you UI the way it works in your widget library. regards, Nicolas _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel signature.asc (201 bytes) Download Attachment |
On Tue, 2017-09-12 at 15:00 -0400, Nicolas Dufresne wrote:
[…] > > Ignore glsinkbin, it's just a wrapper. gtkglsink, gtksink, qmlglsink > are widget sink. They don't support GstVideoOverlay. Use glimagesink, > xvimagesink if you don't want to use a separate window for overlaying > your video. The widget based sink are design to be composed within your > widget tree. Instead of using the GstVideoOverlay interface, you get > the "widget" property on them, and add the widget to you UI the way it > works in your widget library. For some reason my code, based on GstPlayer bits by Sebastian, wraps a gtkglsink in a glsinkbin or uses a gtksink directly. I no longer use the overlay stuff since it is X specific and doesn't work on Wayland. I just put the sink element as a Gtk::Widget as a child of a container widget in the UI. cf. https://github.com/Me-TV/Me-TV/blob/master/src/gstreamer_engine.cpp and ht tps://github.com/Me-TV/Me-TV/blob/master/src/frontend_window.cpp This all seems to work as long as I do all the gtkglsink, glsinkbin, and gtksink stuff in C. As soon as I use any C++/gstreamermm associated with preparing the AV sink/widget then it start a new window rather than the playing in the Gtk::Widget it is supposed to. I have started trying to create a strip down example of the problem. -- Russel. ============================================================================= Dr Russel Winder t: +44 20 7585 2200 voip: sip:[hidden email] 41 Buckmaster Road m: +44 7770 465 077 xmpp: [hidden email] London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel signature.asc (849 bytes) Download Attachment |
In reply to this post by Nicolas Dufresne-5
On Tue, 2017-09-12 at 15:00 -0400, Nicolas Dufresne wrote:
> […] > Ignore glsinkbin, it's just a wrapper. gtkglsink, gtksink, qmlglsink > are widget sink. They don't support GstVideoOverlay. Use glimagesink, > xvimagesink if you don't want to use a separate window for overlaying > your video. The widget based sink are design to be composed within your > widget tree. Instead of using the GstVideoOverlay interface, you get > the "widget" property on them, and add the widget to you UI the way it > works in your widget library. It seems that, at least on Debian Sid with i915, trying to use a gtkglsink *not* wrapped in a glsinkbin fails, I have reverted to doing the wrapping. -- Russel. ============================================================================= Dr Russel Winder t: +44 20 7585 2200 voip: sip:[hidden email] 41 Buckmaster Road m: +44 7770 465 077 xmpp: [hidden email] London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel signature.asc (849 bytes) Download Attachment |
On Thu, 2017-09-14 at 09:53 +0100, Russel Winder wrote:
> On Tue, 2017-09-12 at 15:00 -0400, Nicolas Dufresne wrote: > > > > […] > > Ignore glsinkbin, it's just a wrapper. gtkglsink, gtksink, qmlglsink > > are widget sink. They don't support GstVideoOverlay. Use glimagesink, > > xvimagesink if you don't want to use a separate window for overlaying > > your video. The widget based sink are design to be composed within your > > widget tree. Instead of using the GstVideoOverlay interface, you get > > the "widget" property on them, and add the widget to you UI the way it > > works in your widget library. > > It seems that, at least on Debian Sid with i915, trying to use a gtkglsink > *not* wrapped in a glsinkbin fails, I have reverted to doing the wrapping. it that do the same). It won't work without. -- Sebastian Dröge, Centricular Ltd · https://www.centricular.com _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel signature.asc (981 bytes) Download Attachment |
In reply to this post by Russel Winder
Le jeudi 14 septembre 2017 à 09:53 +0100, Russel Winder a écrit :
> > Ignore glsinkbin, it's just a wrapper. gtkglsink, gtksink, qmlglsink > > are widget sink. They don't support GstVideoOverlay. Use glimagesink, > > xvimagesink if you don't want to use a separate window for overlaying > > your video. The widget based sink are design to be composed within your > > widget tree. Instead of using the GstVideoOverlay interface, you get > > the "widget" property on them, and add the widget to you UI the way it > > works in your widget library. > > It seems that, at least on Debian Sid with i915, trying to use a gtkglsink > *not* wrapped in a glsinkbin fails, I have reverted to doing the wrapping. wrapper (or minimally glupload ! glcolorconvert) for the gtkglsink to work. What I was saying, is that these widget base sink don't support rendering to an XID or similar native window handle. Instead they will blend their content in the widget draw function. In the case of gtkglsink, what you need to be aware is that at the end of the render, a pixman copy will happen. This will go away in GTK 4, when the widget drawing will become fully OpenGL based (like QT/QML). Nicolas _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel signature.asc (201 bytes) Download Attachment |
Free forum by Nabble | Edit this page |