diff options
author | Diego Biurrun <diego@biurrun.de> | 2015-12-16 18:01:34 +0100 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2016-11-08 17:54:34 +0100 |
commit | 67deba8a416d818f3d95aef0aa916589090396e2 (patch) | |
tree | f8b114c5b54f8e478970bd21542897f0ea1c47a5 /libavformat | |
parent | 59d2b00d201935c16408a2917957d89a170fe58f (diff) | |
download | ffmpeg-67deba8a416d818f3d95aef0aa916589090396e2.tar.gz |
Use avpriv_report_missing_feature() where appropriate
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/avienc.c | 3 | ||||
-rw-r--r-- | libavformat/lxfdec.c | 5 | ||||
-rw-r--r-- | libavformat/matroskadec.c | 7 | ||||
-rw-r--r-- | libavformat/mpc8.c | 2 | ||||
-rw-r--r-- | libavformat/oggparseopus.c | 6 | ||||
-rw-r--r-- | libavformat/qcp.c | 4 | ||||
-rw-r--r-- | libavformat/rsoenc.c | 2 | ||||
-rw-r--r-- | libavformat/rtpdec_jpeg.c | 2 | ||||
-rw-r--r-- | libavformat/rtpdec_latm.c | 6 | ||||
-rw-r--r-- | libavformat/rtpdec_xiph.c | 14 | ||||
-rw-r--r-- | libavformat/rtsp.c | 3 | ||||
-rw-r--r-- | libavformat/spdifenc.c | 3 | ||||
-rw-r--r-- | libavformat/wvdec.c | 3 |
13 files changed, 28 insertions, 32 deletions
diff --git a/libavformat/avienc.c b/libavformat/avienc.c index e4743981b8..84a316f787 100644 --- a/libavformat/avienc.c +++ b/libavformat/avienc.c @@ -225,8 +225,7 @@ static int avi_write_header(AVFormatContext *s) // XSUB subtitles behave like video tracks, other subtitles // are not (yet) supported. if (par->codec_id != AV_CODEC_ID_XSUB) { - av_log(s, AV_LOG_ERROR, - "Subtitle streams other than DivX XSUB are not supported by the AVI muxer.\n"); + avpriv_report_missing_feature(s, "Subtitle streams other than DivX XSUB"); return AVERROR_PATCHWELCOME; } case AVMEDIA_TYPE_VIDEO: diff --git a/libavformat/lxfdec.c b/libavformat/lxfdec.c index 9c884ba9b5..285539c22a 100644 --- a/libavformat/lxfdec.c +++ b/libavformat/lxfdec.c @@ -180,7 +180,7 @@ static int get_packet_header(AVFormatContext *s) st->codecpar->bits_per_coded_sample = (audio_format >> 6) & 0x3F; if (st->codecpar->bits_per_coded_sample != (audio_format & 0x3F)) { - av_log(s, AV_LOG_WARNING, "only tightly packed PCM currently supported\n"); + avpriv_report_missing_feature(s, "Not tightly packed PCM"); return AVERROR_PATCHWELCOME; } @@ -190,8 +190,7 @@ static int get_packet_header(AVFormatContext *s) case 24: st->codecpar->codec_id = AV_CODEC_ID_PCM_S24LE_PLANAR; break; case 32: st->codecpar->codec_id = AV_CODEC_ID_PCM_S32LE_PLANAR; break; default: - av_log(s, AV_LOG_WARNING, - "only 16-, 20-, 24- and 32-bit PCM currently supported\n"); + avpriv_report_missing_feature(s, "PCM not 16-, 20-, 24- or 32-bits"); return AVERROR_PATCHWELCOME; } diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 991f86b8d5..8016730965 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -1947,10 +1947,9 @@ static int matroska_read_header(AVFormatContext *s) ebml.max_size > sizeof(uint64_t) || ebml.id_length > sizeof(uint32_t) || ebml.doctype_version > 3) { - av_log(matroska->ctx, AV_LOG_ERROR, - "EBML header using unsupported features\n" - "(EBML version %"PRIu64", doctype %s, doc version %"PRIu64")\n", - ebml.version, ebml.doctype, ebml.doctype_version); + avpriv_report_missing_feature(matroska->ctx, + "EBML version %"PRIu64", doctype %s, doc version %"PRIu64, + ebml.version, ebml.doctype, ebml.doctype_version); ebml_free(ebml_syntax, &ebml); return AVERROR_PATCHWELCOME; } diff --git a/libavformat/mpc8.c b/libavformat/mpc8.c index bd17c19838..d4005fa499 100644 --- a/libavformat/mpc8.c +++ b/libavformat/mpc8.c @@ -228,7 +228,7 @@ static int mpc8_read_header(AVFormatContext *s) avio_skip(pb, 4); //CRC c->ver = avio_r8(pb); if(c->ver != 8){ - av_log(s, AV_LOG_ERROR, "Unknown stream version %d\n", c->ver); + avpriv_report_missing_feature(s, "Stream version %d", c->ver); return AVERROR_PATCHWELCOME; } c->samples = ffio_read_varlen(pb); diff --git a/libavformat/oggparseopus.c b/libavformat/oggparseopus.c index 915ef42bab..f523143cab 100644 --- a/libavformat/oggparseopus.c +++ b/libavformat/oggparseopus.c @@ -123,9 +123,9 @@ static int opus_packet(AVFormatContext *avf, int idx) skip = FFMIN(skip, os->pduration); if (skip > 0) { os->pduration = skip < os->pduration ? os->pduration - skip : 1; - av_log(avf, AV_LOG_WARNING, - "Last packet is truncated to %d (because of unimplemented end trim support).\n", - os->pduration); + avpriv_report_missing_feature(avf, + "Last packet truncated to %u since end trim support", + os->pduration); return AVERROR_PATCHWELCOME; } } diff --git a/libavformat/qcp.c b/libavformat/qcp.c index 4069dbe8c0..b262d609df 100644 --- a/libavformat/qcp.c +++ b/libavformat/qcp.c @@ -102,10 +102,10 @@ static int qcp_read_header(AVFormatContext *s) if (is_qcelp_13k_guid(buf)) { st->codecpar->codec_id = AV_CODEC_ID_QCELP; } else if (!memcmp(buf, guid_evrc, 16)) { - av_log(s, AV_LOG_ERROR, "EVRC codec is not supported.\n"); + avpriv_report_missing_feature(s, "EVRC codec"); return AVERROR_PATCHWELCOME; } else if (!memcmp(buf, guid_smv, 16)) { - av_log(s, AV_LOG_ERROR, "SMV codec is not supported.\n"); + avpriv_report_missing_feature(s, "SMV codec"); return AVERROR_PATCHWELCOME; } else { av_log(s, AV_LOG_ERROR, "Unknown codec GUID.\n"); diff --git a/libavformat/rsoenc.c b/libavformat/rsoenc.c index 4f8278c4ab..f9dd419c4c 100644 --- a/libavformat/rsoenc.c +++ b/libavformat/rsoenc.c @@ -50,7 +50,7 @@ static int rso_write_header(AVFormatContext *s) } if (par->codec_id == AV_CODEC_ID_ADPCM_IMA_WAV) { - av_log(s, AV_LOG_ERROR, "ADPCM in RSO not implemented\n"); + avpriv_report_missing_feature(s, "ADPCM in RSO"); return AVERROR_PATCHWELCOME; } diff --git a/libavformat/rtpdec_jpeg.c b/libavformat/rtpdec_jpeg.c index 2cf41139c3..c3e5c8dc9f 100644 --- a/libavformat/rtpdec_jpeg.c +++ b/libavformat/rtpdec_jpeg.c @@ -230,7 +230,7 @@ static int jpeg_parse_packet(AVFormatContext *ctx, PayloadContext *jpeg, len -= 8; if (type > 1) { - av_log(ctx, AV_LOG_ERROR, "Unimplemented RTP/JPEG type %"PRIu8"\n", type); + avpriv_report_missing_feature(ctx, "RTP/JPEG type %"PRIu8, type); return AVERROR_PATCHWELCOME; } diff --git a/libavformat/rtpdec_latm.c b/libavformat/rtpdec_latm.c index 6be0a25d2b..df85ed3615 100644 --- a/libavformat/rtpdec_latm.c +++ b/libavformat/rtpdec_latm.c @@ -109,9 +109,9 @@ static int parse_fmtp_config(AVStream *st, const char *value) num_layers = get_bits(&gb, 3); if (audio_mux_version != 0 || same_time_framing != 1 || num_programs != 0 || num_layers != 0) { - av_log(NULL, AV_LOG_WARNING, "Unsupported LATM config (%d,%d,%d,%d)\n", - audio_mux_version, same_time_framing, - num_programs, num_layers); + avpriv_report_missing_feature(NULL, "LATM config (%d,%d,%d,%d)", + audio_mux_version, same_time_framing, + num_programs, num_layers); ret = AVERROR_PATCHWELCOME; goto end; } diff --git a/libavformat/rtpdec_xiph.c b/libavformat/rtpdec_xiph.c index 7821686983..920a8a75bf 100644 --- a/libavformat/rtpdec_xiph.c +++ b/libavformat/rtpdec_xiph.c @@ -108,15 +108,14 @@ static int xiph_handle_packet(AVFormatContext *ctx, PayloadContext *data, } if (ident != data->ident) { - av_log(ctx, AV_LOG_ERROR, - "Unimplemented Xiph SDP configuration change detected\n"); + avpriv_report_missing_feature(ctx, "Xiph SDP configuration change"); return AVERROR_PATCHWELCOME; } if (tdt) { - av_log(ctx, AV_LOG_ERROR, - "Unimplemented RTP Xiph packet settings (%d,%d,%d)\n", - fragmented, tdt, num_pkts); + avpriv_report_missing_feature(ctx, + "RTP Xiph packet settings (%d,%d,%d)", + fragmented, tdt, num_pkts); return AVERROR_PATCHWELCOME; } @@ -246,9 +245,8 @@ parse_packed_headers(AVFormatContext *s, length2 = get_base128(&packed_headers, packed_headers_end); if (num_packed != 1 || num_headers > 3) { - av_log(s, AV_LOG_ERROR, - "Unimplemented number of headers: %u packed headers, %u headers\n", - num_packed, num_headers); + avpriv_report_missing_feature(s, "%u packed headers, %u headers", + num_packed, num_headers); return AVERROR_PATCHWELCOME; } diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index 84b912f7f2..7e5985719e 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -1333,8 +1333,7 @@ static int rtsp_send_cmd_with_content_async(AVFormatContext *s, ffurl_write(rt->rtsp_hd_out, out_buf, strlen(out_buf)); if (send_content_length > 0 && send_content) { if (rt->control_transport == RTSP_MODE_TUNNEL) { - av_log(s, AV_LOG_ERROR, "tunneling of RTSP requests " - "with content data not supported\n"); + avpriv_report_missing_feature(s, "Tunneling of RTSP requests with content data"); return AVERROR_PATCHWELCOME; } ffurl_write(rt->rtsp_hd_out, send_content, send_content_length); diff --git a/libavformat/spdifenc.c b/libavformat/spdifenc.c index a19bcab4c9..a9b3b522b3 100644 --- a/libavformat/spdifenc.c +++ b/libavformat/spdifenc.c @@ -469,7 +469,8 @@ static int spdif_write_header(AVFormatContext *s) return AVERROR(ENOMEM); break; default: - av_log(s, AV_LOG_ERROR, "codec not supported\n"); + avpriv_report_missing_feature(s, "Codec %d", + s->streams[0]->codecpar->codec_id); return AVERROR_PATCHWELCOME; } return 0; diff --git a/libavformat/wvdec.c b/libavformat/wvdec.c index 717275c6a0..51aae084ea 100644 --- a/libavformat/wvdec.c +++ b/libavformat/wvdec.c @@ -95,7 +95,8 @@ static int wv_read_block_header(AVFormatContext *ctx, AVIOContext *pb) } if (wc->header.version < 0x402 || wc->header.version > 0x410) { - av_log(ctx, AV_LOG_ERROR, "Unsupported version %03X\n", wc->header.version); + avpriv_report_missing_feature(ctx, "WV version 0x%03X", + wc->header.version); return AVERROR_PATCHWELCOME; } |