#ifndef AVFORMAT_H
#define AVFORMAT_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define LIBAVFORMAT_VERSION_INT ((51<<16)+(11<<8)+0)
-#define LIBAVFORMAT_VERSION 51.11.0
+#define LIBAVFORMAT_VERSION_INT ((51<<16)+(12<<8)+1)
+#define LIBAVFORMAT_VERSION 51.12.1
#define LIBAVFORMAT_BUILD LIBAVFORMAT_VERSION_INT
#define LIBAVFORMAT_IDENT "Lavf" AV_STRINGIFY(LIBAVFORMAT_VERSION)
/*************************************************/
/* fractional numbers for exact pts handling */
-/* the exact value of the fractional number is: 'val + num / den'. num
- is assumed to be such as 0 <= num < den */
+/**
+ * the exact value of the fractional number is: 'val + num / den'.
+ * num is assumed to be such as 0 <= num < den
+ * @deprecated Use AVRational instead
+*/
typedef struct AVFrac {
int64_t val, num, den;
} AVFrac attribute_deprecated;
} AVProbeData;
#define AVPROBE_SCORE_MAX 100 ///< max score, half of that is used for file extension based detection
+#define AVPROBE_PADDING_SIZE 32 ///< extra allocated bytes at the end of the probe buffer
typedef struct AVFormatParameters {
AVRational time_base;
int (*read_probe)(AVProbeData *);
/** read the format header and initialize the AVFormatContext
structure. Return 0 if OK. 'ap' if non NULL contains
- additionnal paramters. Only used in raw format right
+ additional paramters. Only used in raw format right
now. 'av_new_stream' should be called to create new streams. */
int (*read_header)(struct AVFormatContext *,
AVFormatParameters *ap);
struct AVInputFormat *next;
} AVInputFormat;
+enum AVStreamParseType {
+ AVSTREAM_PARSE_NONE,
+ AVSTREAM_PARSE_FULL, /**< full parsing and repack */
+ AVSTREAM_PARSE_HEADERS, /**< only parse headers, don't repack */
+ AVSTREAM_PARSE_TIMESTAMPS, /**< full parsing and interpolation of timestamps for frames not starting on packet boundary */
+};
+
typedef struct AVIndexEntry {
int64_t pos;
int64_t timestamp;
/** quality, as it has been removed from AVCodecContext and put in AVVideoFrame
* MN:dunno if thats the right place, for it */
float quality;
- /** decoding: position of the first frame of the component, in
- AV_TIME_BASE fractional seconds. */
+ /** decoding: pts of the first frame of the stream, in stream time base. */
int64_t start_time;
- /** decoding: duration of the stream, in AV_TIME_BASE fractional
- seconds. */
+ /** decoding: duration of the stream, in stream time base. */
int64_t duration;
char language[4]; /** ISO 639 3-letter language code (empty string if undefined) */
/* av_read_frame() support */
- int need_parsing; ///< 1->full parsing needed, 2->only parse headers dont repack
+ enum AVStreamParseType need_parsing;
struct AVCodecParserContext *parser;
int64_t cur_dts;
* @param filename filename to open.
* @param fmt if non NULL, force the file format to use
* @param buf_size optional buffer size (zero if default is OK)
- * @param ap additionnal parameters needed when opening the file (NULL if default)
+ * @param ap additional parameters needed when opening the file (NULL if default)
* @return 0 if OK. AVERROR_xxx otherwise.
*/
int av_open_input_file(AVFormatContext **ic_ptr, const char *filename,
#endif /* HAVE_AV_CONFIG_H */
-#ifdef __cplusplus
-}
-#endif
-
#endif /* AVFORMAT_H */