After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 702826 - gdkpixbufoverlay: image overlay doesn't work for -ve offset
gdkpixbufoverlay: image overlay doesn't work for -ve offset
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
1.0.7
Other All
: Normal normal
: 1.1.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-06-21 16:18 UTC by Kishore Arepalli
Modified: 2013-07-01 11:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix: offset-x -ve value is horizontal offset from right of the video image and offset-y -ve value is vertical offset from bottom of the video image (3.83 KB, patch)
2013-06-21 16:18 UTC, Kishore Arepalli
needs-work Details | Review
Fix for negative values (offset-x and offset-y) (3.85 KB, patch)
2013-06-24 07:00 UTC, Kishore Arepalli
committed Details | Review

Description Kishore Arepalli 2013-06-21 16:18:41 UTC
Created attachment 247464 [details] [review]
Fix: offset-x -ve value is horizontal offset from right of the video image and offset-y -ve value is vertical offset from bottom of the video image

-ve values of offset-x and offset-y are doesn't work
Comment 1 Nicolas Dufresne (ndufresne) 2013-06-21 16:45:16 UTC
Review of attachment 247464 [details] [review]:

This seems more correct, I'd need to look at more context, meawhile there is some small fixes required.

::: ext/gdk_pixbuf/gstgdkpixbufoverlay.c
@@ +141,3 @@
+          "For +ve value, horizontal offset of overlay image in pixels from"
+          " left of video image. For -ve value, horizontal offset of overlay"
+          " image in pixels from right of video image", G_MININT, G_MAXINT, 0,

Might be me, but I see no difference in those two, ve is not very common acronym I think.

@@ +459,3 @@
+    video_height+overlay->offset_y - overlay_meta->height +
+    (overlay->relative_y * overlay_meta->height) :
+    overlay->offset_y + (overlay->relative_y * overlay_meta->height);

Coding style require that operators (-+) have spaces before and after. It's quite clear though that the original code would not work with negative values.
Comment 2 Kishore Arepalli 2013-06-24 07:00:04 UTC
Created attachment 247595 [details] [review]
Fix for negative values (offset-x and offset-y)

offset-x negative value is horizontal offset from right of the video image and offset-y negative value is vertical offset from bottom of the video image
Comment 3 Sebastian Dröge (slomo) 2013-07-01 11:09:53 UTC
commit 5d98c9d50047972de1286d5d4fd2b2b7fad94e94
Author: Kishore Arepalli <kishore.arepalli@gmail.com>
Date:   Fri Jun 21 18:10:28 2013 +0200

    gdkpixbufoverlay: Allow negative offsets to specify offset from bottom/right
    
    https://bugzilla.gnome.org/show_bug.cgi?id=702826