summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2008-12-08 21:21:38 +0000
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2008-12-08 21:21:38 +0000
commitdbbec0c2f24dcd79c27dab14329905deda36b807 (patch)
tree0b6513822be4ee565207aa084285cce9d5b2da05 /libavcodec
parent6cffaea8dbf9c1fbebdcb3df804b84a911d3fb32 (diff)
Make av_log_missing_feature an internal function, and change its name
to ff_log_missing_feature. Originally committed as revision 16037 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/aac.c9
-rw-r--r--libavcodec/ac3dec.c5
-rw-r--r--libavcodec/avcodec.h14
-rw-r--r--libavcodec/eac3dec.c11
-rw-r--r--libavcodec/internal.h39
-rw-r--r--libavcodec/qcelpdec.c5
-rw-r--r--libavcodec/utils.c2
7 files changed, 58 insertions, 27 deletions
diff --git a/libavcodec/aac.c b/libavcodec/aac.c
index 863646e842..bbd1da305e 100644
--- a/libavcodec/aac.c
+++ b/libavcodec/aac.c
@@ -77,6 +77,7 @@
#include "avcodec.h"
+#include "internal.h"
#include "bitstream.h"
#include "dsputil.h"
#include "lpc.h"
@@ -262,7 +263,7 @@ static int decode_ga_specific_config(AACContext * ac, GetBitContext * gb, int ch
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 @@ static int decode_ics_info(AACContext * ac, IndividualChannelStream * ics, GetBi
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 @@ static int decode_ics(AACContext * ac, SingleChannelElement * sce, GetBitContext
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_cce(AACContext * ac, GetBitContext * gb, ChannelElement * che)
*/
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;
}
diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c
index ae56a85d2a..19682c6040 100644
--- a/libavcodec/ac3dec.c
+++ b/libavcodec/ac3dec.c
@@ -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 @@ static int decode_audio_block(AC3DecodeContext *s, int blk)
/* 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 @@ static int decode_audio_block(AC3DecodeContext *s, int blk)
/* 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;
}
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 1ee01c4866..5ec0d1c9ba 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -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_size(int *width_ptr, int *height_ptr, const char *str);
*/
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. */
diff --git a/libavcodec/eac3dec.c b/libavcodec/eac3dec.c
index c582fbc3d5..bae4d15838 100644
--- a/libavcodec/eac3dec.c
+++ b/libavcodec/eac3dec.c
@@ -21,6 +21,7 @@
*/
#include "avcodec.h"
+#include "internal.h"
#include "ac3.h"
#include "ac3_parser.h"
#include "ac3dec.h"
@@ -182,7 +183,7 @@ int ff_eac3_parse_header(AC3DecodeContext *s)
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 @@ int ff_eac3_parse_header(AC3DecodeContext *s)
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 @@ int ff_eac3_parse_header(AC3DecodeContext *s)
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 @@ int ff_eac3_parse_header(AC3DecodeContext *s)
/* 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 @@ int ff_eac3_parse_header(AC3DecodeContext *s)
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 */
diff --git a/libavcodec/internal.h b/libavcodec/internal.h
new file mode 100644
index 0000000000..ec954a4f0f
--- /dev/null
+++ b/libavcodec/internal.h
@@ -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 */
diff --git a/libavcodec/qcelpdec.c b/libavcodec/qcelpdec.c
index ee21e529ee..ccfba26a88 100644
--- a/libavcodec/qcelpdec.c
+++ b/libavcodec/qcelpdec.c
@@ -30,6 +30,7 @@
#include <stddef.h>
#include "avcodec.h"
+#include "internal.h"
#include "bitstream.h"
#include "qcelpdata.h"
@@ -442,7 +443,7 @@ static void apply_gain_ctrl(float *v_out, const float *v_ref,
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 @@ static int determine_bitrate(AVCodecContext *avctx, const int buf_size,
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;
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 5debe0404b..9b16571f56 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -1508,7 +1508,7 @@ int av_parse_video_frame_rate(AVRational *frame_rate, const char *arg)
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 "