GNOME Bugzilla – Bug 757292
gdkpixbufoverlay: relative-x/y properties
Last modified: 2016-11-24 11:41:50 UTC
Created attachment 314373 [details] image that show the problem please test this pipeline using the provide png videotestsrc ! gdkpixbufoverlay location=/tmp/pipeline.png overlay-width=200 overlay-height=120 relative-x=0.1 relative-y=0.1 ! xvimagesink the logs says something like this: 0:00:00.128700446 4858 0x10040a0 DEBUG gdkpixbufoverlay gstgdkpixbufoverlay.c:588:gst_gdk_pixbuf_overlay_update_composition:<gdkpixbufoverlay0> overlay rendered: 200 x 120 @ 494,66 (onto 320 x 240) and no overlay is rendered changing overlay->offset_x + (overlay->relative_x * overlay_meta->width); with overlay->offset_x + (overlay->relative_x * video_width); here: http://cgit.freedesktop.org/gstreamer/gst-plugins-good/tree/ext/gdk_pixbuf/gstgdkpixbufoverlay.c#n569 and doing the same for the y this log is showed 0:00:00.143735692 4866 0xc930a0 DEBUG gdkpixbufoverlay gstgdkpixbufoverlay.c:591:gst_gdk_pixbuf_overlay_update_composition:<gdkpixbufoverlay0> overlay rendered: 200 x 120 @ 32,24 (onto 320 x 240) and the overlay is rendered as expected, I'm not sure if I have correctly understand how these properties are supposed to work please advise if you want a patch or update the docs to be more clear, thanks
Created attachment 337833 [details] [review] Patch file
There were multiple issues width and height(overlay_width, overlay_height) to be used instead of Overlay Image's width and height video_width and video_height to be used while multiplying with relative_* properties The attached patch works for me
Comment on attachment 337833 [details] [review] Patch file Please provide a patch in "git format-patch" format with an appropriate commit message to explain what this fixes and how and how it was wrong.
Created attachment 338472 [details] [review] Updated patch Hi, the git format-patch is updated with appropriate commit message
Comment on attachment 338472 [details] [review] Updated patch The commit message should be in the format: > gdkpixbufoverlay: one line summary > [empty line] > multi-line explanation what was wrong, how it was fixed > and why the fix is correct > [empty line] > https://bugzilla.gnome.org/.... [link to this bug] Otherwise seems to make sense to me
Created attachment 338473 [details] [review] Reworked patch Here it is :)
commit bb21c885168f934a52cff4ee86ae2b2652449f16 Author: Jagadish <jagadishkamathk@gmail.com> Date: Wed Oct 26 12:46:28 2016 +0530 gdkpixbufoverlay: Fixing x and y offset computation While computing the x and y offsets, it's the video resolution and resized overlay resolution to be used instead of actual overlay image resoltuion. Due to this, the overlay image used to get wrongly overlayed in undesired location https://bugzilla.gnome.org/show_bug.cgi?id=757292