summaryrefslogtreecommitdiff
path: root/libavdevice
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2011-05-23 21:40:44 +0200
committerAnton Khirnov <anton@khirnov.net>2011-05-25 15:55:47 +0200
commitfc68a8f7030227fc4fa8d83b9051aaf598cd12dd (patch)
treecb2db6603f6cd1adea0bbc91c150e2d0036dee81 /libavdevice
parentb3da2692115ea17190544883d15efa36219da99e (diff)
lavf: deprecate AVFormatParameters.standard.
Diffstat (limited to 'libavdevice')
-rw-r--r--libavdevice/bktr.c2
-rw-r--r--libavdevice/dv1394.c2
-rw-r--r--libavdevice/v4l.c2
-rw-r--r--libavdevice/v4l2.c2
4 files changed, 8 insertions, 0 deletions
diff --git a/libavdevice/bktr.c b/libavdevice/bktr.c
index af184b98d2..821567199e 100644
--- a/libavdevice/bktr.c
+++ b/libavdevice/bktr.c
@@ -277,6 +277,7 @@ static int grab_read_header(AVFormatContext *s1, AVFormatParameters *ap)
st->codec->time_base.den = frame_rate;
st->codec->time_base.num = frame_rate_base;
+#if FF_API_FORMAT_PARAMETERS
if (ap->standard) {
if (!strcasecmp(ap->standard, "pal"))
s->standard = PAL;
@@ -285,6 +286,7 @@ static int grab_read_header(AVFormatContext *s1, AVFormatParameters *ap)
else if (!strcasecmp(ap->standard, "ntsc"))
s->standard = NTSC;
}
+#endif
if (bktr_init(s1->filename, width, height, s->standard,
&(s->video_fd), &(s->tuner_fd), -1, 0.0) < 0)
diff --git a/libavdevice/dv1394.c b/libavdevice/dv1394.c
index d0760ef269..2515f78c8f 100644
--- a/libavdevice/dv1394.c
+++ b/libavdevice/dv1394.c
@@ -93,12 +93,14 @@ static int dv1394_read_header(AVFormatContext * context, AVFormatParameters * ap
if (!dv->dv_demux)
goto failed;
+#if FF_API_FORMAT_PARAMETERS
if (ap->standard) {
if (!strcasecmp(ap->standard, "pal"))
dv->format = DV1394_PAL;
else
dv->format = DV1394_NTSC;
}
+#endif
if (ap->channel)
dv->channel = ap->channel;
diff --git a/libavdevice/v4l.c b/libavdevice/v4l.c
index 8c1134536a..54d0394ff5 100644
--- a/libavdevice/v4l.c
+++ b/libavdevice/v4l.c
@@ -136,6 +136,7 @@ static int grab_read_header(AVFormatContext *s1, AVFormatParameters *ap)
/* set tv standard */
if (!ioctl(video_fd, VIDIOCGTUNER, &tuner)) {
+#if FF_API_FORMAT_PARAMETERS
if (ap->standard) {
if (!strcasecmp(ap->standard, "pal"))
s->standard = VIDEO_MODE_PAL;
@@ -144,6 +145,7 @@ static int grab_read_header(AVFormatContext *s1, AVFormatParameters *ap)
else
s->standard = VIDEO_MODE_NTSC;
}
+#endif
tuner.mode = s->standard;
ioctl(video_fd, VIDIOCSTUNER, &tuner);
}
diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
index dca31a8140..1c3059d850 100644
--- a/libavdevice/v4l2.c
+++ b/libavdevice/v4l2.c
@@ -470,10 +470,12 @@ static int v4l2_set_parameters(AVFormatContext *s1, AVFormatParameters *ap)
}
}
+#if FF_API_FORMAT_PARAMETERS
if (ap->standard) {
av_freep(&s->standard);
s->standard = av_strdup(ap->standard);
}
+#endif
if (s->standard) {
av_log(s1, AV_LOG_DEBUG, "The V4L2 driver set standard: %s\n",