From aa94247770732a40e46ab3d539dd9987062abef4 Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Fri, 10 Oct 2003 12:47:42 +0000 Subject: Some interface implementations for video4linux/video4linux2 plugins: a Tuner interface, with which one can select inp... Original commit message from CVS: Some interface implementations for video4linux/video4linux2 plugins: * a Tuner interface, with which one can select inputs and stations. Audio work is underway here, but unfinished. * A Xoverlay interface with which one can do simple overlay. Similar to the API of the v4l/Xv XFree86 extension. Widget implementation for GTK-2.0 coming up in the sandbox. * Colorbalance - for adapting colors (brightness, contrast, etc.) - pretty basic and maybe somewhat overdesigned. But it'll do for now. Apart from these interfaces, there's also a loadable library 'xwindowlistener' that listenes to X for the movement of a window and the overlap of other windows. This is partly copied from xawtv (and thus partly GPL :(), but it's needed for the xoverlay interface implementation in the v4l/v4l2 elements. Lastly, some small changes to remove redundant properties from the v4l/v4l2 elements since these can be done much simpler. Comments appreciated! --- sys/v4l2/v4l2-overlay_calls.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'sys/v4l2/v4l2-overlay_calls.c') diff --git a/sys/v4l2/v4l2-overlay_calls.c b/sys/v4l2/v4l2-overlay_calls.c index d6b35366..2de74269 100644 --- a/sys/v4l2/v4l2-overlay_calls.c +++ b/sys/v4l2/v4l2-overlay_calls.c @@ -43,28 +43,33 @@ ******************************************************/ gboolean -gst_v4l2_set_display (GstV4l2Element *v4l2element, - const gchar *display) +gst_v4l2_set_display (GstV4l2Element *v4l2element) { gchar *buff; - DEBUG("trying to set overlay to '%s'", display); + if (v4l2element->display) + g_free(v4l2element->display); + v4l2element->display = g_strdup(g_getenv("DISPLAY")); + + DEBUG("trying to set overlay to '%s'", v4l2element->display); /* start v4l-conf */ buff = g_strdup_printf("v4l-conf -q -c %s -d %s", - v4l2element->device?v4l2element->device:"/dev/video", display); + v4l2element->device, v4l2element->display); switch (system(buff)) { case -1: gst_element_error(GST_ELEMENT(v4l2element), - "Could not start v4l-conf: %s", g_strerror(errno)); + "Could not start v4l-conf: %s", + g_strerror(errno)); g_free(buff); return FALSE; case 0: break; default: gst_element_error(GST_ELEMENT(v4l2element), - "v4l-conf failed to run correctly: %s", g_strerror(errno)); + "v4l-conf failed to run correctly: %s", + g_strerror(errno)); g_free(buff); return FALSE; } -- cgit v1.2.1