1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

Rename ff_log_missing_feature() to av_log_missing_feature().

Originally committed as revision 19294 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Ronald S. Bultje 2009-06-29 19:07:04 +00:00
parent 38e54a75ab
commit ce863d7f36
8 changed files with 22 additions and 22 deletions

View File

@ -320,7 +320,7 @@ static int decode_ga_specific_config(AACContext * ac, GetBitContext * gb, int ch
int extension_flag, ret; int extension_flag, ret;
if(get_bits1(gb)) { // frameLengthFlag if(get_bits1(gb)) { // frameLengthFlag
ff_log_missing_feature(ac->avccontext, "960/120 MDCT window is", 1); av_log_missing_feature(ac->avccontext, "960/120 MDCT window is", 1);
return -1; return -1;
} }
@ -588,7 +588,7 @@ static int decode_ics_info(AACContext * ac, IndividualChannelStream * ics, GetBi
memset(ics, 0, sizeof(IndividualChannelStream)); memset(ics, 0, sizeof(IndividualChannelStream));
return -1; return -1;
} else { } else {
ff_log_missing_feature(ac->avccontext, "Predictor bit set but LTP is", 1); av_log_missing_feature(ac->avccontext, "Predictor bit set but LTP is", 1);
memset(ics, 0, sizeof(IndividualChannelStream)); memset(ics, 0, sizeof(IndividualChannelStream));
return -1; return -1;
} }
@ -1040,7 +1040,7 @@ static int decode_ics(AACContext * ac, SingleChannelElement * sce, GetBitContext
if ((tns->present = get_bits1(gb)) && decode_tns(ac, tns, gb, ics)) if ((tns->present = get_bits1(gb)) && decode_tns(ac, tns, gb, ics))
return -1; return -1;
if (get_bits1(gb)) { if (get_bits1(gb)) {
ff_log_missing_feature(ac->avccontext, "SSR", 1); av_log_missing_feature(ac->avccontext, "SSR", 1);
return -1; return -1;
} }
} }
@ -1245,7 +1245,7 @@ static int decode_cce(AACContext * ac, GetBitContext * gb, ChannelElement * che)
*/ */
static int decode_sbr_extension(AACContext * ac, GetBitContext * gb, int crc, int cnt) { static int decode_sbr_extension(AACContext * ac, GetBitContext * gb, int crc, int cnt) {
// TODO : sbr_extension implementation // TODO : sbr_extension implementation
ff_log_missing_feature(ac->avccontext, "SBR", 0); av_log_missing_feature(ac->avccontext, "SBR", 0);
skip_bits_long(gb, 8*cnt - 4); // -4 due to reading extension type skip_bits_long(gb, 8*cnt - 4); // -4 due to reading extension type
return cnt; return cnt;
} }
@ -1588,7 +1588,7 @@ static int parse_adts_frame_header(AACContext * ac, GetBitContext * gb) {
if (!hdr_info.crc_absent) if (!hdr_info.crc_absent)
skip_bits(gb, 16); skip_bits(gb, 16);
} else { } else {
ff_log_missing_feature(ac->avccontext, "More than one AAC RDB per ADTS frame is", 0); av_log_missing_feature(ac->avccontext, "More than one AAC RDB per ADTS frame is", 0);
return -1; return -1;
} }
} }

View File

@ -61,7 +61,7 @@ static int aac_adtstoasc_filter(AVBitStreamFilterContext *bsfc,
} }
if (!hdr.crc_absent && hdr.num_aac_frames > 1) { if (!hdr.crc_absent && hdr.num_aac_frames > 1) {
ff_log_missing_feature(avctx, "Multiple RDBs per frame with CRC is", 0); av_log_missing_feature(avctx, "Multiple RDBs per frame with CRC is", 0);
return -1; return -1;
} }
@ -74,7 +74,7 @@ static int aac_adtstoasc_filter(AVBitStreamFilterContext *bsfc,
if (!hdr.chan_config) { if (!hdr.chan_config) {
init_get_bits(&gb, buf, buf_size); init_get_bits(&gb, buf, buf_size);
if (get_bits(&gb, 3) != 5) { if (get_bits(&gb, 3) != 5) {
ff_log_missing_feature(avctx, "PCE based channel configuration, where the PCE is not the first syntax element is", 0); av_log_missing_feature(avctx, "PCE based channel configuration, where the PCE is not the first syntax element is", 0);
return -1; return -1;
} }
init_put_bits(&pb, pce_data, MAX_PCE_SIZE); init_put_bits(&pb, pce_data, MAX_PCE_SIZE);

View File

@ -820,7 +820,7 @@ static int decode_audio_block(AC3DecodeContext *s, int blk)
/* spectral extension strategy */ /* spectral extension strategy */
if (s->eac3 && (!blk || get_bits1(gbc))) { if (s->eac3 && (!blk || get_bits1(gbc))) {
if (get_bits1(gbc)) { if (get_bits1(gbc)) {
ff_log_missing_feature(s->avctx, "Spectral extension", 1); av_log_missing_feature(s->avctx, "Spectral extension", 1);
return -1; return -1;
} }
/* TODO: parse spectral extension strategy info */ /* TODO: parse spectral extension strategy info */
@ -845,7 +845,7 @@ static int decode_audio_block(AC3DecodeContext *s, int blk)
/* check for enhanced coupling */ /* check for enhanced coupling */
if (s->eac3 && get_bits1(gbc)) { if (s->eac3 && get_bits1(gbc)) {
/* TODO: parse enhanced coupling strategy info */ /* TODO: parse enhanced coupling strategy info */
ff_log_missing_feature(s->avctx, "Enhanced coupling", 1); av_log_missing_feature(s->avctx, "Enhanced coupling", 1);
return -1; return -1;
} }

View File

@ -214,7 +214,7 @@ int ff_eac3_parse_header(AC3DecodeContext *s)
application can select from. each independent stream can also contain application can select from. each independent stream can also contain
dependent streams which are used to add or replace channels. */ dependent streams which are used to add or replace channels. */
if (s->frame_type == EAC3_FRAME_TYPE_DEPENDENT) { if (s->frame_type == EAC3_FRAME_TYPE_DEPENDENT) {
ff_log_missing_feature(s->avctx, "Dependent substream decoding", 1); av_log_missing_feature(s->avctx, "Dependent substream decoding", 1);
return AAC_AC3_PARSE_ERROR_FRAME_TYPE; return AAC_AC3_PARSE_ERROR_FRAME_TYPE;
} else if (s->frame_type == EAC3_FRAME_TYPE_RESERVED) { } else if (s->frame_type == EAC3_FRAME_TYPE_RESERVED) {
av_log(s->avctx, AV_LOG_ERROR, "Reserved frame type\n"); av_log(s->avctx, AV_LOG_ERROR, "Reserved frame type\n");
@ -226,7 +226,7 @@ int ff_eac3_parse_header(AC3DecodeContext *s)
associated to an independent stream have matching substream id's. */ associated to an independent stream have matching substream id's. */
if (s->substreamid) { if (s->substreamid) {
/* only decode substream with id=0. skip any additional substreams. */ /* only decode substream with id=0. skip any additional substreams. */
ff_log_missing_feature(s->avctx, "Additional substreams", 1); av_log_missing_feature(s->avctx, "Additional substreams", 1);
return AAC_AC3_PARSE_ERROR_FRAME_TYPE; return AAC_AC3_PARSE_ERROR_FRAME_TYPE;
} }
@ -235,7 +235,7 @@ int ff_eac3_parse_header(AC3DecodeContext *s)
rates in bit allocation. The best assumption would be that it is 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 handled like AC-3 DolbyNet, but we cannot be sure until we have a
sample which utilizes this feature. */ sample which utilizes this feature. */
ff_log_missing_feature(s->avctx, "Reduced sampling rates", 1); av_log_missing_feature(s->avctx, "Reduced sampling rates", 1);
return -1; return -1;
} }
skip_bits(gbc, 5); // skip bitstream id skip_bits(gbc, 5); // skip bitstream id
@ -492,7 +492,7 @@ int ff_eac3_parse_header(AC3DecodeContext *s)
/* spectral extension attenuation data */ /* spectral extension attenuation data */
if (parse_spx_atten_data) { if (parse_spx_atten_data) {
ff_log_missing_feature(s->avctx, "Spectral extension attenuation", 1); av_log_missing_feature(s->avctx, "Spectral extension attenuation", 1);
for (ch = 1; ch <= s->fbw_channels; ch++) { for (ch = 1; ch <= s->fbw_channels; ch++) {
if (get_bits1(gbc)) { // channel has spx attenuation if (get_bits1(gbc)) { // channel has spx attenuation
skip_bits(gbc, 5); // skip spx attenuation code skip_bits(gbc, 5); // skip spx attenuation code
@ -508,7 +508,7 @@ int ff_eac3_parse_header(AC3DecodeContext *s)
It is likely the offset of each block within the frame. */ 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)); int block_start_bits = (s->num_blocks-1) * (4 + av_log2(s->frame_size-2));
skip_bits_long(gbc, block_start_bits); skip_bits_long(gbc, block_start_bits);
ff_log_missing_feature(s->avctx, "Block start info", 1); av_log_missing_feature(s->avctx, "Block start info", 1);
} }
/* syntax state initialization */ /* syntax state initialization */

View File

@ -448,7 +448,7 @@ static inline int decode_subframe(FLACContext *s, int channel)
s->curr_bps -= wasted; s->curr_bps -= wasted;
} }
if (s->curr_bps > 32) { if (s->curr_bps > 32) {
ff_log_missing_feature(s->avctx, "decorrelated bit depth > 32", 0); av_log_missing_feature(s->avctx, "decorrelated bit depth > 32", 0);
return -1; return -1;
} }

View File

@ -37,7 +37,7 @@
* message which tells the user how to report samples to the development * message which tells the user how to report samples to the development
* mailing list. * mailing list.
*/ */
void ff_log_missing_feature(void *avc, const char *feature, int want_sample); void av_log_missing_feature(void *avc, const char *feature, int want_sample);
/** /**
* Logs a generic warning message asking for a sample. * Logs a generic warning message asking for a sample.
@ -45,7 +45,7 @@ void ff_log_missing_feature(void *avc, const char *feature, int want_sample);
* a pointer to an AVClass struct * a pointer to an AVClass struct
* @param[in] msg string containing an optional message, or NULL if no message * @param[in] msg string containing an optional message, or NULL if no message
*/ */
void ff_log_ask_for_sample(void *avc, const char *msg); void av_log_ask_for_sample(void *avc, const char *msg);
/** /**
* Determines whether pix_fmt is a hardware accelerated format. * Determines whether pix_fmt is a hardware accelerated format.

View File

@ -432,7 +432,7 @@ static float compute_gain_ctrl(const float *v_ref, const float *v_in, const int
if(scalefactor) if(scalefactor)
scalefactor = sqrt(ff_dot_productf(v_ref, v_ref, len) / scalefactor); scalefactor = sqrt(ff_dot_productf(v_ref, v_ref, len) / scalefactor);
else else
ff_log_missing_feature(NULL, "Zero energy for gain control", 1); av_log_missing_feature(NULL, "Zero energy for gain control", 1);
return scalefactor; return scalefactor;
} }
@ -716,7 +716,7 @@ static qcelp_packet_rate determine_bitrate(AVCodecContext *avctx, const int buf_
if(bitrate == SILENCE) if(bitrate == SILENCE)
{ {
//FIXME: Remove experimental warning when tested with samples. //FIXME: Remove experimental warning when tested with samples.
ff_log_ask_for_sample(avctx, "'Blank frame handling is experimental."); av_log_ask_for_sample(avctx, "'Blank frame handling is experimental.");
} }
return bitrate; return bitrate;
} }

View File

@ -1191,19 +1191,19 @@ int av_parse_video_frame_rate(AVRational *frame_rate, const char *arg)
return 0; return 0;
} }
void ff_log_missing_feature(void *avc, const char *feature, int want_sample) void av_log_missing_feature(void *avc, const char *feature, int want_sample)
{ {
av_log(avc, AV_LOG_WARNING, "%s not implemented. Update your FFmpeg " av_log(avc, AV_LOG_WARNING, "%s not implemented. Update your FFmpeg "
"version to the newest one from SVN. If the problem still " "version to the newest one from SVN. If the problem still "
"occurs, it means that your file has a feature which has not " "occurs, it means that your file has a feature which has not "
"been implemented.", feature); "been implemented.", feature);
if(want_sample) if(want_sample)
ff_log_ask_for_sample(avc, NULL); av_log_ask_for_sample(avc, NULL);
else else
av_log(avc, AV_LOG_WARNING, "\n"); av_log(avc, AV_LOG_WARNING, "\n");
} }
void ff_log_ask_for_sample(void *avc, const char *msg) void av_log_ask_for_sample(void *avc, const char *msg)
{ {
if (msg) if (msg)
av_log(avc, AV_LOG_WARNING, "%s ", msg); av_log(avc, AV_LOG_WARNING, "%s ", msg);