GNOME Bugzilla – Bug 752411
video-overlay-composition:move _GstVideoOverlayRectangle and _GstVideoOverlayComposition structs to their header file
Last modified: 2015-07-15 14:13:20 UTC
Created attachment 307457 [details] [review] move structs to their header files It is required to move _GstVideoOverlayRectangle and _GstVideoOvelayComposition structs to their header file to avoid compilation error when casted by other elements, as member variables are not seen. Typically when video overlay buffer is attached as meta data and rectangles are extracted on the sink to compose using hardware overlays. Regards, Sudip
I think you're confused. These structures are private on purpose, elements are not supposed to access them. What are you trying to do?
My objective is to compose subtitle/s using waylandsink at hardware composition stage. And not blend using gstdvbsuboverlay element directly onto the video frame (low performance) For this, the video buffer is attached as overlay composition meta data by gstdvbsuboverlay element. The rectangles are included in the composition. I am using waylandsink and extract the meta data through ometa = gst_buffer_get_video_overlay_composition_meta (buffer); And pull out rectangles, rect = ometa->overlay->rectangles[n]; These rectangles pixmap is copied on the weston subsurface interface, to be composed by the hardware. So what is wrong here ? And neither I think they should be kept private for any reason. I have implemented and tested this. Pretty much as explained here http://permalink.gmane.org/gmane.comp.video.gstreamer.bugs/96170 and http://lists.freedesktop.org/archives/gstreamer-bugs/2011-November/085507.html
(In reply to Sudip Jain from comment #2) > My objective is to compose subtitle/s using waylandsink at hardware > composition stage. And not blend using gstdvbsuboverlay element directly > onto the video frame (low performance) > > For this, the video buffer is attached as overlay composition meta data by > gstdvbsuboverlay element. The rectangles are included in the composition. Correction: subtitle buffer is attached as overlay composition meta data to video frame buffer. > > I am using waylandsink and extract the meta data through ometa = > gst_buffer_get_video_overlay_composition_meta (buffer); > > And pull out rectangles, > rect = ometa->overlay->rectangles[n]; > > These rectangles pixmap is copied on the weston subsurface interface, to be > composed by the hardware. > > So what is wrong here ? And neither I think they should be kept private for > any reason. > > I have implemented and tested this. Pretty much as explained here > http://permalink.gmane.org/gmane.comp.video.gstreamer.bugs/96170 and > http://lists.freedesktop.org/archives/gstreamer-bugs/2011-November/085507. > html
Why can't you use the normal API such as: gst_video_overlay_composition_get_rectangle(): http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstvideooverlaycomposition.html#gst-video-overlay-composition-get-rectangle and gst_video_rectangle_get_pixels_*() ?
(In reply to Tim-Philipp Müller from comment #4) > Why can't you use the normal API such as: > > gst_video_overlay_composition_get_rectangle(): > http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base- > libs/html/gst-plugins-base-libs-gstvideooverlaycomposition.html#gst-video- > overlay-composition-get-rectangle > > and > > gst_video_rectangle_get_pixels_*() > > ? I haven't tried using helper APIs', will check and update. Thanks