[FFmpeg-cvslog] lavf: deprecate AVFormatParameters.channel.

Anton Khirnov git at videolan.org
Thu May 26 03:32:23 CEST 2011


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Mon May 23 22:06:09 2011 +0200| [d20576d01b6489e37813302c208df01068418bfb] | committer: Anton Khirnov

lavf: deprecate AVFormatParameters.channel.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d20576d01b6489e37813302c208df01068418bfb
---

 libavdevice/dv1394.c    |    2 +-
 libavdevice/libdc1394.c |    2 ++
 libavdevice/v4l2.c      |    2 ++
 libavformat/avformat.h  |    2 +-
 4 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/libavdevice/dv1394.c b/libavdevice/dv1394.c
index 0981eff..c9b7a69 100644
--- a/libavdevice/dv1394.c
+++ b/libavdevice/dv1394.c
@@ -100,10 +100,10 @@ static int dv1394_read_header(AVFormatContext * context, AVFormatParameters * ap
        else
            dv->format = DV1394_NTSC;
     }
-#endif
 
     if (ap->channel)
         dv->channel = ap->channel;
+#endif
 
     /* Open and initialize DV1394 device */
     dv->fd = open(context->filename, O_RDONLY);
diff --git a/libavdevice/libdc1394.c b/libavdevice/libdc1394.c
index a8406b8..96e9e9b 100644
--- a/libavdevice/libdc1394.c
+++ b/libavdevice/libdc1394.c
@@ -159,8 +159,10 @@ static int dc1394_v1_read_header(AVFormatContext *c, AVFormatParameters * ap)
     if (dc1394_read_common(c,ap,&fmt,&fps) != 0)
         return -1;
 
+#if FF_API_FORMAT_PARAMETERS
     if (ap->channel)
         dc1394->channel = ap->channel;
+#endif
 
     /* Now let us prep the hardware. */
     dc1394->handle = dc1394_create_handle(0); /* FIXME: gotta have ap->port */
diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
index 0385a2c..566ee92 100644
--- a/libavdevice/v4l2.c
+++ b/libavdevice/v4l2.c
@@ -453,8 +453,10 @@ static int v4l2_set_parameters(AVFormatContext *s1, AVFormatParameters *ap)
 
     streamparm.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
 
+#if FF_API_FORMAT_PARAMETERS
     if (ap->channel > 0)
         s->channel = ap->channel;
+#endif
 
     /* set tv video input */
     memset (&input, 0, sizeof (input));
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 424fc92..11dbe8b 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -235,8 +235,8 @@ typedef struct AVFormatParameters {
     int width;
     int height;
     enum PixelFormat pix_fmt;
-    int channel; /**< Used to select DV channel. */
 #if FF_API_FORMAT_PARAMETERS
+    attribute_deprecated int channel; /**< Used to select DV channel. */
     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 */



More information about the ffmpeg-cvslog mailing list