diff options
author | Wim Taymans <wim.taymans@gmail.com> | 2006-09-28 17:08:47 +0000 |
---|---|---|
committer | Wim Taymans <wim.taymans@gmail.com> | 2006-09-28 17:08:47 +0000 |
commit | 210e3a8e67e7ab5b225d45d99e2a850a43aff843 (patch) | |
tree | fe26e7c9785547ea256ef83b492dbf0dfabca2b4 /sys/v4l2/v4l2_calls.c | |
parent | f0cf378a420ef88fa1ed59a1fd32188863610592 (diff) |
sys/v4l2/: Framerate can be 0/1 too.
Original commit message from CVS:
* sys/v4l2/gstv4l2src.c: (gst_v4l2src_get_all_caps),
(gst_v4l2src_get_caps):
* sys/v4l2/v4l2_calls.c: (gst_v4l2_fill_lists):
Framerate can be 0/1 too.
Init framerate to 0/1 before querying it so that we can detect
devices that don't know about a framerate.
Add some more debugging info.
Diffstat (limited to 'sys/v4l2/v4l2_calls.c')
-rw-r--r-- | sys/v4l2/v4l2_calls.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/v4l2/v4l2_calls.c b/sys/v4l2/v4l2_calls.c index c2c7c769..96188450 100644 --- a/sys/v4l2/v4l2_calls.c +++ b/sys/v4l2/v4l2_calls.c @@ -105,6 +105,8 @@ gst_v4l2_fill_lists (GstV4l2Object * v4l2object) } } + GST_DEBUG_OBJECT (v4l2object->element, " '%s'", input.name); + v4l2channel = g_object_new (GST_TYPE_V4L2_TUNER_CHANNEL, NULL); channel = GST_TUNER_CHANNEL (v4l2channel); channel->label = g_strdup ((const gchar *) input.name); @@ -150,6 +152,9 @@ gst_v4l2_fill_lists (GstV4l2Object * v4l2object) GstV4l2TunerNorm *v4l2norm; GstTunerNorm *norm; + /* fill in defaults */ + standard.frameperiod.denominator = 0; + standard.frameperiod.numerator = 1; standard.index = n; if (ioctl (v4l2object->video_fd, VIDIOC_ENUMSTD, &standard) < 0) { if (errno == EINVAL) @@ -162,6 +167,10 @@ gst_v4l2_fill_lists (GstV4l2Object * v4l2object) } } + GST_DEBUG_OBJECT (v4l2object->element, " '%s', fps: %d/%d", + standard.name, standard.frameperiod.denominator, + standard.frameperiod.numerator); + v4l2norm = g_object_new (GST_TYPE_V4L2_TUNER_NORM, NULL); norm = GST_TUNER_NORM (v4l2norm); norm->label = g_strdup ((const gchar *) standard.name); |