diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-07-29 20:57:42 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-07-29 20:57:42 +0200 |
commit | 80a3a6611fe5866163b2e64da7c492fff7874a03 (patch) | |
tree | fb0d5f2036e844076f7d726ccbdaaefdd382fb7c /libavformat/avformat.h | |
parent | 31e0b5d3cb40acd960b6f6c711557a82dc2d6c5f (diff) | |
parent | 3a19405d574a467c68b48e4b824c76617fd59de0 (diff) | |
download | ffmpeg-80a3a6611fe5866163b2e64da7c492fff7874a03.tar.gz |
Merge commit '3a19405d574a467c68b48e4b824c76617fd59de0'
* commit '3a19405d574a467c68b48e4b824c76617fd59de0':
avformat: Use the mime type information in input probe
Conflicts:
libavformat/format.c
libavformat/version.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/avformat.h')
-rw-r--r-- | libavformat/avformat.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 66638c8f22..8412d3a31b 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -393,12 +393,16 @@ typedef struct AVProbeData { const char *filename; unsigned char *buf; /**< Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero. */ int buf_size; /**< Size of buf except extra allocated bytes */ +#ifdef FF_API_PROBE_MIME + uint8_t *mime_type; /**< mime_type, when known. */ +#endif } AVProbeData; #define AVPROBE_SCORE_RETRY (AVPROBE_SCORE_MAX/4) #define AVPROBE_SCORE_STREAM_RETRY (AVPROBE_SCORE_MAX/4-1) #define AVPROBE_SCORE_EXTENSION 50 ///< score for file extension +#define AVPROBE_SCORE_MIME 75 ///< score for file mime type #define AVPROBE_SCORE_MAX 100 ///< maximum score #define AVPROBE_PADDING_SIZE 32 ///< extra allocated bytes at the end of the probe buffer @@ -585,6 +589,13 @@ typedef struct AVInputFormat { const AVClass *priv_class; ///< AVClass for the private context + /** + * Comma-separated list of mime types. + * It is used check for matching mime types while probing. + * @see av_probe_input_format2 + */ + const char *mime_type; + /***************************************************************** * No fields below this line are part of the public API. They * may not be used outside of libavformat and can be changed and |