]> git.sesse.net Git - ffmpeg/commitdiff
lavf: deprecate AVFormatParameters.channel.
authorAnton Khirnov <anton@khirnov.net>
Mon, 23 May 2011 20:06:09 +0000 (22:06 +0200)
committerAnton Khirnov <anton@khirnov.net>
Wed, 25 May 2011 13:55:47 +0000 (15:55 +0200)
libavdevice/dv1394.c
libavdevice/libdc1394.c
libavdevice/v4l2.c
libavformat/avformat.h

index 0981eff53cdc21ca61520da9557cea114f080771..c9b7a69d6f76758dcb17901df67174e0c1d314fb 100644 (file)
@@ -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);
index a8406b8c2eb59dab9c6f661517fbe11a92bff43f..96e9e9b88bfe85c0e6c574c91871c8ba5ff10d03 100644 (file)
@@ -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 */
index 0385a2c6c0b635bcc6bb32ea6a03225dc139297a..566ee92801a81e541206b9cac913285fe81c40d5 100644 (file)
@@ -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));
index 424fc920b41f6d3f62feafa82c40369fa38c7d83..11dbe8b2defc3c3b5478ccef9878108a037ef1b2 100644 (file)
@@ -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 */