diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-08-08 22:39:49 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-08-28 22:18:57 +0200 |
commit | e31db621bf0037b9079bff996d34f4163f4b3c16 (patch) | |
tree | 7cb829994b3c528b7d723bb5f81bc8c013b758a8 /libavformat/avformat.h | |
parent | 90411f7ed669d2f823468c4157647d73b0b28ebe (diff) | |
download | ffmpeg-e31db621bf0037b9079bff996d34f4163f4b3c16.tar.gz |
avformat: export probe score
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/avformat.h')
-rw-r--r-- | libavformat/avformat.h | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 77efc61e72..5c07887e9b 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -1237,6 +1237,15 @@ typedef struct AVFormatContext { */ int flush_packets; + /** + * format probing score. + * The maximal score is AVPROBE_SCORE_MAX, its set when the demuxer probes + * the format. + * - encoding: unused + * - decoding: set by avformat, read by user via av_format_get_probe_score() (NO direct access) + */ + int probe_score; + /***************************************************************** * All fields below this line are not part of the public API. They * may not be used outside of libavformat and can be changed and @@ -1296,6 +1305,8 @@ typedef struct AVFormatContext { int io_repositioned; } AVFormatContext; +int av_format_get_probe_score(const AVFormatContext *s); + /** * Returns the method used to set ctx->duration. * @@ -1504,9 +1515,17 @@ AVInputFormat *av_probe_input_format3(AVProbeData *pd, int is_opened, int *score * @param logctx the log context * @param offset the offset within the bytestream to probe from * @param max_probe_size the maximum probe buffer size (zero for default) - * @return 0 in case of success, a negative value corresponding to an + * @return the score in case of success, a negative value corresponding to an + * the maximal score is AVPROBE_SCORE_MAX * AVERROR code otherwise */ +int av_probe_input_buffer2(AVIOContext *pb, AVInputFormat **fmt, + const char *filename, void *logctx, + unsigned int offset, unsigned int max_probe_size); + +/** + * Like av_probe_input_buffer2() but returns 0 on success + */ int av_probe_input_buffer(AVIOContext *pb, AVInputFormat **fmt, const char *filename, void *logctx, unsigned int offset, unsigned int max_probe_size); |