changeset 8281:f93efc084e41 libavcodec

Make av_log_missing_feature an internal function, and change its name to ff_log_missing_feature.
author stefano
date Mon, 08 Dec 2008 21:21:38 +0000
parents 63aba08af550
children f4ead16781e4
files aac.c ac3dec.c avcodec.h eac3dec.c internal.h qcelpdec.c utils.c
diffstat 7 files changed, 58 insertions(+), 27 deletions(-) [+]
line wrap: on
line diff
--- a/aac.c	Mon Dec 08 03:15:10 2008 +0000
+++ b/aac.c	Mon Dec 08 21:21:38 2008 +0000
@@ -77,6 +77,7 @@
 
 
 #include "avcodec.h"
+#include "internal.h"
 #include "bitstream.h"
 #include "dsputil.h"
 #include "lpc.h"
@@ -262,7 +263,7 @@
     int extension_flag, ret;
 
     if(get_bits1(gb)) {  // frameLengthFlag
-        av_log_missing_feature(ac->avccontext, "960/120 MDCT window is", 1);
+        ff_log_missing_feature(ac->avccontext, "960/120 MDCT window is", 1);
         return -1;
     }
 
@@ -521,7 +522,7 @@
                 memset(ics, 0, sizeof(IndividualChannelStream));
                 return -1;
             } else {
-                av_log_missing_feature(ac->avccontext, "Predictor bit set but LTP is", 1);
+                ff_log_missing_feature(ac->avccontext, "Predictor bit set but LTP is", 1);
                 memset(ics, 0, sizeof(IndividualChannelStream));
                 return -1;
             }
@@ -955,7 +956,7 @@
         if ((tns->present = get_bits1(gb)) && decode_tns(ac, tns, gb, ics))
             return -1;
         if (get_bits1(gb)) {
-            av_log_missing_feature(ac->avccontext, "SSR", 1);
+            ff_log_missing_feature(ac->avccontext, "SSR", 1);
             return -1;
         }
     }
@@ -1159,7 +1160,7 @@
  */
 static int decode_sbr_extension(AACContext * ac, GetBitContext * gb, int crc, int cnt) {
     // TODO : sbr_extension implementation
-    av_log_missing_feature(ac->avccontext, "SBR", 0);
+    ff_log_missing_feature(ac->avccontext, "SBR", 0);
     skip_bits_long(gb, 8*cnt - 4); // -4 due to reading extension type
     return cnt;
 }
--- a/ac3dec.c	Mon Dec 08 03:15:10 2008 +0000
+++ b/ac3dec.c	Mon Dec 08 21:21:38 2008 +0000
@@ -35,6 +35,7 @@
 #include <string.h>
 
 #include "libavutil/crc.h"
+#include "internal.h"
 #include "ac3_parser.h"
 #include "ac3dec.h"
 #include "ac3dec_data.h"
@@ -826,7 +827,7 @@
     /* spectral extension strategy */
     if (s->eac3 && (!blk || get_bits1(gbc))) {
         if (get_bits1(gbc)) {
-            av_log_missing_feature(s->avctx, "Spectral extension", 1);
+            ff_log_missing_feature(s->avctx, "Spectral extension", 1);
             return -1;
         }
         /* TODO: parse spectral extension strategy info */
@@ -851,7 +852,7 @@
             /* check for enhanced coupling */
             if (s->eac3 && get_bits1(gbc)) {
                 /* TODO: parse enhanced coupling strategy info */
-                av_log_missing_feature(s->avctx, "Enhanced coupling", 1);
+                ff_log_missing_feature(s->avctx, "Enhanced coupling", 1);
                 return -1;
             }
 
--- a/avcodec.h	Mon Dec 08 03:15:10 2008 +0000
+++ b/avcodec.h	Mon Dec 08 21:21:38 2008 +0000
@@ -31,7 +31,7 @@
 
 #define LIBAVCODEC_VERSION_MAJOR 52
 #define LIBAVCODEC_VERSION_MINOR  6
-#define LIBAVCODEC_VERSION_MICRO  0
+#define LIBAVCODEC_VERSION_MICRO  1
 
 #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
                                                LIBAVCODEC_VERSION_MINOR, \
@@ -2998,18 +2998,6 @@
  */
 int av_parse_video_frame_rate(AVRational *frame_rate, const char *str);
 
-/**
- * Logs a generic warning message about a missing feature.
- * @param[in] avc a pointer to an arbitrary struct of which the first field is
- * a pointer to an AVClass struct
- * @param[in] feature string containing the name of the missing feature
- * @param[in] want_sample indicates if samples are wanted which exhibit this feature.
- * If \p want_sample is non-zero, additional verbage will be added to the log
- * message which tells the user how to report samples to the development
- * mailing list.
- */
-void av_log_missing_feature(void *avc, const char *feature, int want_sample);
-
 /* error handling */
 #if EINVAL > 0
 #define AVERROR(e) (-(e)) /**< Returns a negative error code from a POSIX error code, to return from library functions. */
--- a/eac3dec.c	Mon Dec 08 03:15:10 2008 +0000
+++ b/eac3dec.c	Mon Dec 08 21:21:38 2008 +0000
@@ -21,6 +21,7 @@
  */
 
 #include "avcodec.h"
+#include "internal.h"
 #include "ac3.h"
 #include "ac3_parser.h"
 #include "ac3dec.h"
@@ -182,7 +183,7 @@
        application can select from. each independent stream can also contain
        dependent streams which are used to add or replace channels. */
     if (s->frame_type == EAC3_FRAME_TYPE_DEPENDENT) {
-        av_log_missing_feature(s->avctx, "Dependent substream decoding", 1);
+        ff_log_missing_feature(s->avctx, "Dependent substream decoding", 1);
         return AC3_PARSE_ERROR_FRAME_TYPE;
     } else if (s->frame_type == EAC3_FRAME_TYPE_RESERVED) {
         av_log(s->avctx, AV_LOG_ERROR, "Reserved frame type\n");
@@ -194,7 +195,7 @@
        associated to an independent stream have matching substream id's. */
     if (s->substreamid) {
         /* only decode substream with id=0. skip any additional substreams. */
-        av_log_missing_feature(s->avctx, "Additional substreams", 1);
+        ff_log_missing_feature(s->avctx, "Additional substreams", 1);
         return AC3_PARSE_ERROR_FRAME_TYPE;
     }
 
@@ -203,7 +204,7 @@
            rates in bit allocation.  The best assumption would be that it is
            handled like AC-3 DolbyNet, but we cannot be sure until we have a
            sample which utilizes this feature. */
-        av_log_missing_feature(s->avctx, "Reduced sampling rates", 1);
+        ff_log_missing_feature(s->avctx, "Reduced sampling rates", 1);
         return -1;
     }
     skip_bits(gbc, 5); // skip bitstream id
@@ -460,7 +461,7 @@
 
     /* spectral extension attenuation data */
     if (parse_spx_atten_data) {
-        av_log_missing_feature(s->avctx, "Spectral extension attenuation", 1);
+        ff_log_missing_feature(s->avctx, "Spectral extension attenuation", 1);
         for (ch = 1; ch <= s->fbw_channels; ch++) {
             if (get_bits1(gbc)) { // channel has spx attenuation
                 skip_bits(gbc, 5); // skip spx attenuation code
@@ -476,7 +477,7 @@
            It is likely the offset of each block within the frame. */
         int block_start_bits = (s->num_blocks-1) * (4 + av_log2(s->frame_size-2));
         skip_bits_long(gbc, block_start_bits);
-        av_log_missing_feature(s->avctx, "Block start info", 1);
+        ff_log_missing_feature(s->avctx, "Block start info", 1);
     }
 
     /* syntax state initialization */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/internal.h	Mon Dec 08 21:21:38 2008 +0000
@@ -0,0 +1,39 @@
+/*
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/**
+ * @file internal.h
+ * common internal api header.
+ */
+
+#ifndef AVCODEC_INTERNAL_H
+#define AVCODEC_INTERNAL_H
+
+/**
+ * Logs a generic warning message about a missing feature.
+ * @param[in] avc a pointer to an arbitrary struct of which the first field is
+ * a pointer to an AVClass struct
+ * @param[in] feature string containing the name of the missing feature
+ * @param[in] want_sample indicates if samples are wanted which exhibit this feature.
+ * If \p want_sample is non-zero, additional verbage will be added to the log
+ * message which tells the user how to report samples to the development
+ * mailing list.
+ */
+void ff_log_missing_feature(void *avc, const char *feature, int want_sample);
+
+#endif /* AVCODEC_INTERNAL_H */
--- a/qcelpdec.c	Mon Dec 08 03:15:10 2008 +0000
+++ b/qcelpdec.c	Mon Dec 08 21:21:38 2008 +0000
@@ -30,6 +30,7 @@
 #include <stddef.h>
 
 #include "avcodec.h"
+#include "internal.h"
 #include "bitstream.h"
 
 #include "qcelpdata.h"
@@ -442,7 +443,7 @@
             scalefactor = sqrt(ff_dot_productf(v_ref + j, v_ref + j, 40)
                         / scalefactor);
         else
-            av_log_missing_feature(NULL, "Zero energy for gain control", 1);
+            ff_log_missing_feature(NULL, "Zero energy for gain control", 1);
         for(len=j+40; j<len; j++)
             v_out[j] = scalefactor * v_in[j];
     }
@@ -655,7 +656,7 @@
     if(bitrate == SILENCE)
     {
         // FIXME: the decoder should not handle SILENCE frames as I_F_Q frames
-        av_log_missing_feature(avctx, "Blank frame", 1);
+        ff_log_missing_feature(avctx, "Blank frame", 1);
         bitrate = I_F_Q;
     }
     return bitrate;
--- a/utils.c	Mon Dec 08 03:15:10 2008 +0000
+++ b/utils.c	Mon Dec 08 21:21:38 2008 +0000
@@ -1508,7 +1508,7 @@
         return 0;
 }
 
-void av_log_missing_feature(void *avc, const char *feature, int want_sample)
+void ff_log_missing_feature(void *avc, const char *feature, int want_sample)
 {
     av_log(avc, AV_LOG_WARNING, "%s not implemented. Update your FFmpeg "
             "version to the newest one from SVN. If the problem still "