summaryrefslogtreecommitdiff
path: root/libavformat/avformat.h
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2014-03-13 22:11:12 +0100
committerLuca Barbato <lu_zero@gentoo.org>2014-07-29 17:47:26 +0200
commit3a19405d574a467c68b48e4b824c76617fd59de0 (patch)
treefab823ed19b1b1cf1ee30c9a9f6b1388bd2f0fef /libavformat/avformat.h
parent69e7336b8e16ee65226fc20381baf537f4b125e6 (diff)
avformat: Use the mime type information in input probe
It should provide a quicker guess for elementary streams provided by http.
Diffstat (limited to 'libavformat/avformat.h')
-rw-r--r--libavformat/avformat.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index db41836c3b..ab2081a3ef 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -391,9 +391,13 @@ 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_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
@@ -535,6 +539,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