diff options
author | Paul B Mahol <onemda@gmail.com> | 2013-03-15 17:13:52 +0000 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2013-03-15 18:10:28 +0000 |
commit | a9b424879f101b56cf75c2db889477bba188fe20 (patch) | |
tree | a9e67fe3fba92feaca7bdeb8122ebe2772f339ae /libavformat | |
parent | 3d751b1ef6619b20631b17c880aa96f2dd3a11dd (diff) | |
download | ffmpeg-a9b424879f101b56cf75c2db889477bba188fe20.tar.gz |
lavc & lavf: replace deprecated av_log* functions
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/astdec.c | 2 | ||||
-rw-r--r-- | libavformat/avr.c | 4 | ||||
-rw-r--r-- | libavformat/brstm.c | 8 | ||||
-rw-r--r-- | libavformat/electronicarts.c | 16 | ||||
-rw-r--r-- | libavformat/epafdec.c | 2 | ||||
-rw-r--r-- | libavformat/icodec.c | 7 | ||||
-rw-r--r-- | libavformat/iff.c | 4 | ||||
-rw-r--r-- | libavformat/lvfdec.c | 4 | ||||
-rw-r--r-- | libavformat/lxfdec.c | 2 | ||||
-rw-r--r-- | libavformat/mvdec.c | 16 | ||||
-rw-r--r-- | libavformat/nistspheredec.c | 4 | ||||
-rw-r--r-- | libavformat/oggdec.c | 2 | ||||
-rw-r--r-- | libavformat/pmpdec.c | 2 | ||||
-rw-r--r-- | libavformat/wvenc.c | 2 |
14 files changed, 38 insertions, 37 deletions
diff --git a/libavformat/astdec.c b/libavformat/astdec.c index fb5a34fddd..886274410d 100644 --- a/libavformat/astdec.c +++ b/libavformat/astdec.c @@ -50,7 +50,7 @@ static int ast_read_header(AVFormatContext *s) depth = avio_rb16(s->pb); if (depth != 16) { - av_log_ask_for_sample(s, "unsupported depth %d\n", depth); + avpriv_request_sample(s, "depth %d", depth); return AVERROR_INVALIDDATA; } diff --git a/libavformat/avr.c b/libavformat/avr.c index 71a107c3ac..473136ec3c 100644 --- a/libavformat/avr.c +++ b/libavformat/avr.c @@ -51,7 +51,7 @@ static int avr_read_header(AVFormatContext *s) } else if (chan == 0xFFFFu) { st->codec->channels = 2; } else { - av_log_ask_for_sample(s, "unknown number of channels\n"); + avpriv_request_sample(s, "chan %d", chan); return AVERROR_PATCHWELCOME; } @@ -78,7 +78,7 @@ static int avr_read_header(AVFormatContext *s) } else if (sign == 0xFFFFu && bps == 16) { st->codec->codec_id = AV_CODEC_ID_PCM_S16BE; } else { - av_log_ask_for_sample(s, "unknown bits per sample\n"); + avpriv_request_sample(s, "bits per sample %d", bps); return AVERROR_PATCHWELCOME; } diff --git a/libavformat/brstm.c b/libavformat/brstm.c index 82f3027620..7781b3c559 100644 --- a/libavformat/brstm.c +++ b/libavformat/brstm.c @@ -75,7 +75,7 @@ static int read_header(AVFormatContext *s) return AVERROR_INVALIDDATA; } if (bom == 0xFFFE) { - av_log_ask_for_sample(s, "unsupported byte order\n"); + avpriv_request_sample(s, "little endian byte order"); return AVERROR_PATCHWELCOME; } @@ -110,7 +110,7 @@ static int read_header(AVFormatContext *s) case 1: codec = AV_CODEC_ID_PCM_S16BE_PLANAR; break; case 2: codec = AV_CODEC_ID_ADPCM_THP; break; default: - av_log_ask_for_sample(s, "unsupported codec: %d\n", codec); + avpriv_request_sample(s, "codec %d", codec); return AVERROR_PATCHWELCOME; } @@ -220,8 +220,8 @@ static int read_header(AVFormatContext *s) } avio_skip(s->pb, start - avio_tell(s->pb)); - if (major!=1 || minor) - av_log_ask_for_sample(s, "Version %d.%d\n", major, minor); + if (major != 1 || minor) + avpriv_request_sample(s, "Version %d.%d", major, minor); return 0; default: diff --git a/libavformat/electronicarts.c b/libavformat/electronicarts.c index 5b821a9cf5..cf7a271263 100644 --- a/libavformat/electronicarts.c +++ b/libavformat/electronicarts.c @@ -184,7 +184,7 @@ static int process_audio_header_elements(AVFormatContext *s) case 3: ea->audio_codec = AV_CODEC_ID_ADPCM_EA_R3; break; case -1: break; default: - av_log_ask_for_sample(s, "unsupported stream type; revision=%i\n", revision); + avpriv_request_sample(s, "stream type; revision=%i", revision); return 0; } switch (revision2) { @@ -195,7 +195,7 @@ static int process_audio_header_elements(AVFormatContext *s) case 2: ea->audio_codec = AV_CODEC_ID_ADPCM_EA_R1; break; case 3: ea->audio_codec = AV_CODEC_ID_ADPCM_EA_R2; break; default: - av_log_ask_for_sample(s, "unsupported stream type; revision=%i, revision2=%i\n", revision, revision2); + avpriv_request_sample(s, "stream type; revision=%i, revision2=%i", revision, revision2); return 0; } break; @@ -203,12 +203,12 @@ static int process_audio_header_elements(AVFormatContext *s) case -1: break; default: ea->audio_codec = AV_CODEC_ID_NONE; - av_log_ask_for_sample(s, "unsupported stream type; revision2=%i\n", revision2); + avpriv_request_sample(s, "stream type; revision2=%i", revision2); return 0; } break; default: - av_log_ask_for_sample(s, "unsupported stream type; compression_type=%i\n", compression_type); + avpriv_request_sample(s, "stream type; compression_type=%i", compression_type); return 0; } @@ -244,7 +244,7 @@ static int process_audio_header_eacs(AVFormatContext *s) case 1: ea->audio_codec = AV_CODEC_ID_PCM_MULAW; ea->bytes = 1; break; case 2: ea->audio_codec = AV_CODEC_ID_ADPCM_IMA_EA_EACS; break; default: - av_log_ask_for_sample(s, "unsupported stream type; audio compression_type=%i\n", compression_type); + avpriv_request_sample(s, "stream type; audio compression_type=%i", compression_type); } return 1; @@ -332,7 +332,7 @@ static int process_ea_header(AVFormatContext *s) { switch (blockid) { case ISNh_TAG: if (avio_rl32(pb) != EACS_TAG) { - av_log_ask_for_sample(s, "unknown 1SNh headerid\n"); + avpriv_request_sample(s, "unknown 1SNh headerid"); return 0; } err = process_audio_header_eacs(s); @@ -344,7 +344,7 @@ static int process_ea_header(AVFormatContext *s) { if (blockid == GSTR_TAG) { avio_skip(pb, 4); } else if ((blockid & 0xFFFF)!=PT00_TAG) { - av_log_ask_for_sample(s, "unknown SCHl headerid\n"); + avpriv_request_sample(s, "unknown SCHl headerid"); return 0; } err = process_audio_header_elements(s); @@ -531,7 +531,7 @@ static int ea_read_packet(AVFormatContext *s, chunk_size -= 12; } if (partial_packet) { - av_log_ask_for_sample(s, "video header followed by audio packet not supported.\n"); + avpriv_request_sample(s, "video header followed by audio packet"); av_free_packet(pkt); partial_packet = 0; } diff --git a/libavformat/epafdec.c b/libavformat/epafdec.c index ffb8b95ec4..c737892325 100644 --- a/libavformat/epafdec.c +++ b/libavformat/epafdec.c @@ -77,7 +77,7 @@ static int epaf_read_header(AVFormatContext *s) st->codec->codec_id = AV_CODEC_ID_PCM_S8; break; case 1: - av_log_missing_feature(s, "24-bit Paris PCM format", 1); + avpriv_request_sample(s, "24-bit Paris PCM format"); default: return AVERROR_INVALIDDATA; } diff --git a/libavformat/icodec.c b/libavformat/icodec.c index 37909aab72..fa308da722 100644 --- a/libavformat/icodec.c +++ b/libavformat/icodec.c @@ -53,7 +53,7 @@ static int read_header(AVFormatContext *s) { IcoDemuxContext *ico = s->priv_data; AVIOContext *pb = s->pb; - int i; + int i, codec; avio_skip(pb, 4); ico->nb_images = avio_rl16(pb); @@ -88,7 +88,8 @@ static int read_header(AVFormatContext *s) if (avio_seek(pb, ico->images[i].offset, SEEK_SET) < 0) break; - switch(avio_rl32(pb)) { + codec = avio_rl32(pb); + switch (codec) { case MKTAG(0x89, 'P', 'N', 'G'): st->codec->codec_id = AV_CODEC_ID_PNG; st->codec->width = 0; @@ -106,7 +107,7 @@ static int read_header(AVFormatContext *s) st->codec->height = tmp / 2; break; default: - av_log_ask_for_sample(s, "unsupported codec\n"); + avpriv_request_sample(s, "codec %d", codec); return AVERROR_INVALIDDATA; } } diff --git a/libavformat/iff.c b/libavformat/iff.c index 100d981cab..5b0d3ff18d 100644 --- a/libavformat/iff.c +++ b/libavformat/iff.c @@ -298,7 +298,7 @@ static int iff_read_header(AVFormatContext *s) else if (fmt_size == sizeof(deep_abgr) && !memcmp(fmt, deep_abgr, sizeof(deep_abgr))) st->codec->pix_fmt = AV_PIX_FMT_ABGR; else { - av_log_ask_for_sample(s, "unsupported color format\n"); + avpriv_request_sample(s, "color format %.16s", fmt); return AVERROR_PATCHWELCOME; } break; @@ -364,7 +364,7 @@ static int iff_read_header(AVFormatContext *s) } else if (iff->maud_bits == 8 && iff->maud_compression == 3) { st->codec->codec_id = AV_CODEC_ID_PCM_MULAW; } else { - av_log_ask_for_sample(s, "unsupported compression %d and bit depth %d\n", iff->maud_compression, iff->maud_bits); + avpriv_request_sample(s, "compression %d and bit depth %d", iff->maud_compression, iff->maud_bits); return AVERROR_PATCHWELCOME; } diff --git a/libavformat/lvfdec.c b/libavformat/lvfdec.c index 08a089135e..f8dda58571 100644 --- a/libavformat/lvfdec.c +++ b/libavformat/lvfdec.c @@ -41,7 +41,7 @@ static int lvf_read_header(AVFormatContext *s) if (!nb_streams) return AVERROR_INVALIDDATA; if (nb_streams > 2) { - av_log_ask_for_sample(s, "too many streams\n"); + avpriv_request_sample(s, "%d streams", nb_streams); return AVERROR_PATCHWELCOME; } @@ -87,7 +87,7 @@ static int lvf_read_header(AVFormatContext *s) avio_seek(s->pb, 2048 + 8, SEEK_SET); return 0; default: - av_log_ask_for_sample(s, "unknown id\n"); + avpriv_request_sample(s, "id %d", id); return AVERROR_PATCHWELCOME; } diff --git a/libavformat/lxfdec.c b/libavformat/lxfdec.c index 90c49749a6..876f988ef5 100644 --- a/libavformat/lxfdec.c +++ b/libavformat/lxfdec.c @@ -130,7 +130,7 @@ static int get_packet_header(AVFormatContext *s) version = bytestream_get_le32(&p); header_size = bytestream_get_le32(&p); if (version > 1) - av_log_ask_for_sample(s, "Unknown format version %i\n", version); + avpriv_request_sample(s, "format version %i", version); if (header_size < (version ? 72 : 60) || header_size > LXF_MAX_PACKET_HEADER_SIZE || (header_size & 3)) { diff --git a/libavformat/mvdec.c b/libavformat/mvdec.c index 103a40af6d..5525233db5 100644 --- a/libavformat/mvdec.c +++ b/libavformat/mvdec.c @@ -172,7 +172,7 @@ static int parse_video_var(AVFormatContext *avctx, AVStream *st, const char *nam } else if (!strcmp(str, "MVC2")) { st->codec->codec_id = AV_CODEC_ID_MVC2; } else { - av_log_ask_for_sample(avctx, "unknown video compression %s\n", str); + avpriv_request_sample(avctx, "video compression %s", str); } av_free(str); } else if (!strcmp(name, "FPS")) { @@ -214,7 +214,7 @@ static void read_table(AVFormatContext *avctx, AVStream *st, int (*parse)(AVForm name[sizeof(name) - 1] = 0; size = avio_rb32(pb); if (parse(avctx, st, name, size) < 0) { - av_log_ask_for_sample(avctx, "unknown variable %s\n", name); + avpriv_request_sample(avctx, "variable %s", name); avio_skip(pb, size); } } @@ -274,7 +274,7 @@ static int mv_read_header(AVFormatContext *avctx) vst->codec->codec_id = AV_CODEC_ID_RAWVIDEO; break; default: - av_log_ask_for_sample(avctx, "unknown video compression %i\n", v); + avpriv_request_sample(avctx, "video compression %i", v); break; } vst->codec->codec_tag = 0; @@ -293,7 +293,7 @@ static int mv_read_header(AVFormatContext *avctx) if (v == AUDIO_FORMAT_SIGNED) { ast->codec->codec_id = AV_CODEC_ID_PCM_S16BE; } else { - av_log_ask_for_sample(avctx, "unknown audio compression (format %i)\n", v); + avpriv_request_sample(avctx, "audio compression (format %i)", v); } avio_skip(pb, 12); @@ -317,7 +317,7 @@ static int mv_read_header(AVFormatContext *avctx) read_table(avctx, NULL, parse_global_var); if (mv->nb_audio_tracks > 1) { - av_log_ask_for_sample(avctx, "multiple audio streams\n"); + avpriv_request_sample(avctx, "multiple audio streams support"); return AVERROR_PATCHWELCOME; } else if (mv->nb_audio_tracks) { ast = avformat_new_stream(avctx, NULL); @@ -329,7 +329,7 @@ static int mv_read_header(AVFormatContext *avctx) if (ast->codec->codec_tag == 100 && ast->codec->codec_id == AUDIO_FORMAT_SIGNED && ast->codec->bits_per_coded_sample == 16) { ast->codec->codec_id = AV_CODEC_ID_PCM_S16BE; } else { - av_log_ask_for_sample(avctx, "unknown audio compression %i (format %i, width %i)\n", + avpriv_request_sample(avctx, "audio compression %i (format %i, width %i)", ast->codec->codec_tag, ast->codec->codec_id, ast->codec->bits_per_coded_sample); ast->codec->codec_id = AV_CODEC_ID_NONE; } @@ -341,7 +341,7 @@ static int mv_read_header(AVFormatContext *avctx) } if (mv->nb_video_tracks > 1) { - av_log_ask_for_sample(avctx, "multiple video streams\n"); + avpriv_request_sample(avctx, "multiple video streams support"); return AVERROR_PATCHWELCOME; } else if (mv->nb_video_tracks) { vst = avformat_new_stream(avctx, NULL); @@ -357,7 +357,7 @@ static int mv_read_header(AVFormatContext *avctx) if (mv->nb_video_tracks) read_index(pb, vst); } else { - av_log_ask_for_sample(avctx, "unknown version %i\n", version); + avpriv_request_sample(avctx, "version %i", version); return AVERROR_PATCHWELCOME; } diff --git a/libavformat/nistspheredec.c b/libavformat/nistspheredec.c index 59c202003b..c09df9ccc1 100644 --- a/libavformat/nistspheredec.c +++ b/libavformat/nistspheredec.c @@ -70,7 +70,7 @@ static int nist_read_header(AVFormatContext *s) !av_strcasecmp(coding, "mu-law")) { st->codec->codec_id = AV_CODEC_ID_PCM_MULAW; } else { - av_log_ask_for_sample(s, "unsupported coding: %s\n", coding); + avpriv_request_sample(s, "coding %s", coding); } avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate); @@ -93,7 +93,7 @@ static int nist_read_header(AVFormatContext *s) } else if (!av_strcasecmp(format, "10")) { be = 1; } else if (av_strcasecmp(format, "1")) { - av_log_ask_for_sample(s, "unsupported sample byte format: %s\n", format); + avpriv_request_sample(s, "sample byte format %s", format); return AVERROR_PATCHWELCOME; } } else if (!memcmp(buffer, "sample_coding", 13)) { diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c index 5cb03fe13a..fdb5e96f00 100644 --- a/libavformat/oggdec.c +++ b/libavformat/oggdec.c @@ -195,7 +195,7 @@ static int ogg_replace_stream(AVFormatContext *s, uint32_t serial, int nsegs) if (i >= ogg->nstreams) return ogg_new_stream(s, serial); } else if (ogg->nstreams != 1) { - av_log_missing_feature(s, "Changing stream parameters in multistream ogg", 0); + avpriv_report_missing_feature(s, "Changing stream parameters in multistream ogg"); return AVERROR_PATCHWELCOME; } diff --git a/libavformat/pmpdec.c b/libavformat/pmpdec.c index e0394a9513..2fe6c46e13 100644 --- a/libavformat/pmpdec.c +++ b/libavformat/pmpdec.c @@ -139,7 +139,7 @@ static int pmp_packet(AVFormatContext *s, AVPacket *pkt) int num_packets; pmp->audio_packets = avio_r8(pb); if (!pmp->audio_packets) { - av_log_ask_for_sample(s, "0 audio packets\n"); + avpriv_request_sample(s, "0 audio packets"); return AVERROR_PATCHWELCOME; } num_packets = (pmp->num_streams - 1) * pmp->audio_packets + 1; diff --git a/libavformat/wvenc.c b/libavformat/wvenc.c index 3cc0a50c2d..03d471ecb6 100644 --- a/libavformat/wvenc.c +++ b/libavformat/wvenc.c @@ -45,7 +45,7 @@ static int write_header(AVFormatContext *s) return AVERROR(EINVAL); } if (codec->extradata_size > 0) { - av_log_missing_feature(s, "remuxing from matroska container", 0); + avpriv_report_missing_feature(s, "remuxing from matroska container"); return AVERROR_PATCHWELCOME; } avpriv_set_pts_info(s->streams[0], 64, 1, codec->sample_rate); |