]> git.sesse.net Git - ffmpeg/commitdiff
lavf: deprecate AVFormatParameters.standard.
authorAnton Khirnov <anton@khirnov.net>
Mon, 23 May 2011 19:40:44 +0000 (21:40 +0200)
committerAnton Khirnov <anton@khirnov.net>
Wed, 25 May 2011 13:55:47 +0000 (15:55 +0200)
libavdevice/bktr.c
libavdevice/dv1394.c
libavdevice/v4l.c
libavdevice/v4l2.c
libavformat/avformat.h

index af184b98d2a8cfa61c61cfb893f8615b9f1e7cbc..821567199ed52071dd8e83a4d30ff0d9e54caf58 100644 (file)
@@ -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)
index d0760ef269fbae5ce9b3861064f70f4c0aed680d..2515f78c8f4d0e67fd2323fe8e0a23bd91cf1349 100644 (file)
@@ -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;
index 8c1134536a8f70f2b8def7eff532e2265802e749..54d0394ff53d5b782a425a6bbd676ef00ba7172c 100644 (file)
@@ -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);
     }
index dca31a81401120e8bf3b62469dfd72b4722b15de..1c3059d850ff38fa9ad347d7bf19bc049ce4fbdf 100644 (file)
@@ -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",
index 64bbd223965241dfb0280a32a351f43b06527781..424fc920b41f6d3f62feafa82c40369fa38c7d83 100644 (file)
@@ -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;