diff options
author | Ronald S. Bultje <rbultje@ronald.bitfreak.net> | 2002-09-28 11:05:39 +0000 |
---|---|---|
committer | Ronald S. Bultje <rbultje@ronald.bitfreak.net> | 2002-09-28 11:05:39 +0000 |
commit | 419f2d205280e6bf50b482762f8bc2d41a89817d (patch) | |
tree | fc16bc815a9fcbec5c638b563b8c49b0909fe32e /sys/v4l2/v4l2-overlay_calls.c | |
parent | 6de50e694ba159b18070206eee1eb2f826ffd4e1 (diff) | |
download | gst-plugins-bad-419f2d205280e6bf50b482762f8bc2d41a89817d.tar.gz gst-plugins-bad-419f2d205280e6bf50b482762f8bc2d41a89817d.tar.bz2 gst-plugins-bad-419f2d205280e6bf50b482762f8bc2d41a89817d.zip |
I'm such an idiot - these files should have been in a week ago
Original commit message from CVS:
I'm such an idiot - these files should have been in a week ago
Diffstat (limited to 'sys/v4l2/v4l2-overlay_calls.c')
-rw-r--r-- | sys/v4l2/v4l2-overlay_calls.c | 73 |
1 files changed, 23 insertions, 50 deletions
diff --git a/sys/v4l2/v4l2-overlay_calls.c b/sys/v4l2/v4l2-overlay_calls.c index c8ee053c..7eecb49d 100644 --- a/sys/v4l2/v4l2-overlay_calls.c +++ b/sys/v4l2/v4l2-overlay_calls.c @@ -75,69 +75,42 @@ gst_v4l2_set_display (GstV4l2Element *v4l2element, /****************************************************** - * gst_v4l2_set_vwin(): - * does the VIDIOC_S_WIN ioctl() - * return value: TRUE on success, FALSE on error - ******************************************************/ - -static gboolean -gst_v4l2_set_vwin (GstV4l2Element *v4l2element) -{ - if (ioctl(v4l2element->video_fd, VIDIOC_S_WIN, &(v4l2element->vwin)) < 0) { - gst_element_error(GST_ELEMENT(v4l2element), - "Failed to set the video window on device %s: %s", - v4l2element->device, sys_errlist[errno]); - return FALSE; - } - - return TRUE; -} - - -/****************************************************** * gst_v4l2_set_window(): * sets the window where to display the video overlay * return value: TRUE on success, FALSE on error ******************************************************/ gboolean -gst_v4l2_set_window (GstV4l2Element *v4l2element, - gint x, gint y, - gint w, gint h) +gst_v4l2_set_window (GstV4l2Element *v4l2element, + gint x, + gint y, + gint w, + gint h, + struct v4l2_clip *clips, + gint num_clips) { + struct v4l2_window vwin; + DEBUG("trying to set video window to %dx%d,%d,%d", x,y,w,h); GST_V4L2_CHECK_OVERLAY(v4l2element); GST_V4L2_CHECK_OPEN(v4l2element); - v4l2element->vwin.clipcount = 0; - v4l2element->vwin.x = x; - v4l2element->vwin.y = y; - v4l2element->vwin.width = w; - v4l2element->vwin.height = h; - - return gst_v4l2_set_vwin(v4l2element); -} - + vwin.clipcount = 0; + vwin.x = x; + vwin.y = y; + vwin.width = w; + vwin.height = h; + vwin.clips = clips; + vwin.clipcount = num_clips; -/****************************************************** - * gst_v4l_set_clips(): - * sets video overlay clips - * return value: TRUE on success, FALSE on error - ******************************************************/ - -gboolean -gst_v4l2_set_clips (GstV4l2Element *v4l2element, - struct v4l2_clip *clips, - gint num_clips) -{ - DEBUG("trying to set video clipping information"); - GST_V4L2_CHECK_OPEN(v4l2element); - GST_V4L2_CHECK_OVERLAY(v4l2element); - - v4l2element->vwin.clips = clips; - v4l2element->vwin.clipcount = num_clips; + if (ioctl(v4l2element->video_fd, VIDIOC_S_WIN, &vwin) < 0) { + gst_element_error(GST_ELEMENT(v4l2element), + "Failed to set the video window on device %s: %s", + v4l2element->device, sys_errlist[errno]); + return FALSE; + } - return gst_v4l2_set_vwin(v4l2element); + return TRUE; } |