mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
sys/v4l/v4l_calls.c: Fix for some v4l cards which hang in v4lsrc
Original commit message from CVS: 2004-10-25 Zaheer Abbas Merali <zaheerabbas at merali dot org> reviewed by: Ronald Bultje <rbultje at gnome dot org> * sys/v4l/v4l_calls.c: (gst_v4l_get_chan_names): Fix for some v4l cards which hang in v4lsrc
This commit is contained in:
parent
64f5768c35
commit
3e6dfe2955
2 changed files with 26 additions and 13 deletions
|
@ -1,3 +1,10 @@
|
|||
2004-10-25 Zaheer Abbas Merali <zaheerabbas at merali dot org>
|
||||
|
||||
reviewed by: Ronald Bultje <rbultje at gnome dot org>
|
||||
|
||||
* sys/v4l/v4l_calls.c: (gst_v4l_get_chan_names):
|
||||
Fix for some v4l cards which hang in v4lsrc
|
||||
|
||||
2004-10-25 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_remove),
|
||||
|
|
|
@ -316,21 +316,27 @@ gst_v4l_get_chan_names (GstV4lElement * v4lelement)
|
|||
gint n;
|
||||
|
||||
for (n = 0;; n++) {
|
||||
vtun.tuner = n;
|
||||
if (ioctl (v4lelement->video_fd, VIDIOCGTUNER, &vtun) < 0)
|
||||
break; /* no more tuners */
|
||||
if (!strcmp (vtun.name, vchan.name)) {
|
||||
v4lchannel->tuner = n;
|
||||
channel->flags |= GST_TUNER_CHANNEL_FREQUENCY;
|
||||
channel->freq_multiplicator =
|
||||
62.5 * ((vtun.flags & VIDEO_TUNER_LOW) ? 1 : 1000);
|
||||
channel->min_frequency = vtun.rangelow;
|
||||
channel->max_frequency = vtun.rangehigh;
|
||||
channel->min_signal = 0;
|
||||
channel->max_signal = 0xffff;
|
||||
break;
|
||||
if (n >= vchan.tuners) {
|
||||
vtun.tuner = 0;
|
||||
} else {
|
||||
vtun.tuner = n;
|
||||
if (ioctl (v4lelement->video_fd, VIDIOCGTUNER, &vtun) >= 0)
|
||||
continue; /* no more tuners */
|
||||
if (strcmp (vtun.name, vchan.name) != 0) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
v4lchannel->tuner = n;
|
||||
channel->flags |= GST_TUNER_CHANNEL_FREQUENCY;
|
||||
channel->freq_multiplicator =
|
||||
62.5 * ((vtun.flags & VIDEO_TUNER_LOW) ? 1 : 1000);
|
||||
channel->min_frequency = vtun.rangelow;
|
||||
channel->max_frequency = vtun.rangehigh;
|
||||
channel->min_signal = 0;
|
||||
channel->max_signal = 0xffff;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
if (vchan.flags & VIDEO_VC_AUDIO) {
|
||||
struct video_audio vaud;
|
||||
|
|
Loading…
Reference in a new issue