[FFmpeg-cvslog] lavf: deprecate AVFormatParameters.standard.
Anton Khirnov
git at videolan.org
Thu May 26 03:32:22 CEST 2011
ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Mon May 23 21:40:44 2011 +0200| [fc68a8f7030227fc4fa8d83b9051aaf598cd12dd] | committer: Anton Khirnov
lavf: deprecate AVFormatParameters.standard.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fc68a8f7030227fc4fa8d83b9051aaf598cd12dd
---
libavdevice/bktr.c | 2 ++
libavdevice/dv1394.c | 2 ++
libavdevice/v4l.c | 2 ++
libavdevice/v4l2.c | 2 ++
libavformat/avformat.h | 2 +-
5 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/libavdevice/bktr.c b/libavdevice/bktr.c
index af184b9..8215671 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 d0760ef..2515f78 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 8c11345..54d0394 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 dca31a8..1c3059d 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",
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 64bbd22..424fc92 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -236,8 +236,8 @@ typedef struct AVFormatParameters {
int height;
enum PixelFormat pix_fmt;
int channel; /**< Used to select DV channel. */
- const char *standard; /**< TV standard, NTSC, PAL, SECAM */
#if FF_API_FORMAT_PARAMETERS
+ attribute_deprecated const char *standard; /**< deprecated, use demuxer-specific options instead. */
attribute_deprecated unsigned int mpeg2ts_raw:1; /**< deprecated, use mpegtsraw demuxer */
/**< deprecated, use mpegtsraw demuxer-specific options instead */
attribute_deprecated unsigned int mpeg2ts_compute_pcr:1;
More information about the ffmpeg-cvslog
mailing list