summaryrefslogtreecommitdiffstats
path: root/sys/v4l2/v4l2-overlay_calls.c
diff options
context:
space:
mode:
authorRonald S. Bultje <rbultje@ronald.bitfreak.net>2003-10-10 12:47:42 +0000
committerRonald S. Bultje <rbultje@ronald.bitfreak.net>2003-10-10 12:47:42 +0000
commitaa94247770732a40e46ab3d539dd9987062abef4 (patch)
tree1509ca08f33718ccb6cb63f1c1ad1f5b4752801b /sys/v4l2/v4l2-overlay_calls.c
parent39b91cdb495b9f9b326e79a10f64753a097c203c (diff)
downloadgst-plugins-bad-aa94247770732a40e46ab3d539dd9987062abef4.tar.gz
gst-plugins-bad-aa94247770732a40e46ab3d539dd9987062abef4.tar.bz2
gst-plugins-bad-aa94247770732a40e46ab3d539dd9987062abef4.zip
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!
Diffstat (limited to 'sys/v4l2/v4l2-overlay_calls.c')
-rw-r--r--sys/v4l2/v4l2-overlay_calls.c17
1 files changed, 11 insertions, 6 deletions
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;
}