summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim.muller@collabora.co.uk>2010-03-24 09:59:42 +0000
committerTim-Philipp Müller <tim.muller@collabora.co.uk>2010-03-28 20:21:10 +0100
commit37d000d175dad226f5eacbefe557f107cb43e6a6 (patch)
tree4ee0e1ffcedee22b50ac2b2efe95780237c782d1 /sys
parent133f804d2d5ff1e9c6c58e41849507f39137e489 (diff)
downloadgstreamer-plugins-base-37d000d175dad226f5eacbefe557f107cb43e6a6.tar.gz
xoverlay: change new set_render_rectangle() vfunc to take four arguments so we don't depend on libgstvideo
Don't make libgstinterfaces (and thus libgstaudio etc.) indirectly depend on libgstvideo by using the GstVideoRectangle helper structure in the API, which causes undesirable dependencies, esp. with the gobject-introspection (people will point and laugh at us if they find out that libgstaudio depends on libgstvideo). Instead, pass the x, y, width and height parameters directly to the function. Re-fixes #610249.
Diffstat (limited to 'sys')
-rw-r--r--sys/xvimage/xvimagesink.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/sys/xvimage/xvimagesink.c b/sys/xvimage/xvimagesink.c
index 85841074d..6b0383ce7 100644
--- a/sys/xvimage/xvimagesink.c
+++ b/sys/xvimage/xvimagesink.c
@@ -2858,16 +2858,21 @@ gst_xvimagesink_set_event_handling (GstXOverlay * overlay,
}
static void
-gst_xvimagesink_set_render_rectangle (GstXOverlay * overlay,
- GstVideoRectangle * rect)
+gst_xvimagesink_set_render_rectangle (GstXOverlay * overlay, gint x, gint y,
+ gint width, gint height)
{
GstXvImageSink *xvimagesink = GST_XVIMAGESINK (overlay);
- if (rect) {
- memcpy (&xvimagesink->render_rect, rect, sizeof (GstVideoRectangle));
+ /* FIXME: how about some locking? */
+ if (x >= 0 && y >= 0 && width >= 0 && height >= 0) {
+ xvimagesink->render_rect.x = x;
+ xvimagesink->render_rect.y = y;
+ xvimagesink->render_rect.w = width;
+ xvimagesink->render_rect.h = height;
xvimagesink->have_render_rect = TRUE;
} else {
- xvimagesink->render_rect.x = xvimagesink->render_rect.y = 0;
+ xvimagesink->render_rect.x = 0;
+ xvimagesink->render_rect.y = 0;
xvimagesink->render_rect.w = xvimagesink->xwindow->width;
xvimagesink->render_rect.h = xvimagesink->xwindow->height;
xvimagesink->have_render_rect = FALSE;