]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/avformat.h
Remove redundant fastmemcpy.h #include, it is indirectly #included by avutil.h.
[ffmpeg] / libavformat / avformat.h
index eb8c4e1534b4dd6b9aeddfeb05025e10191ef8c4..d63966662e0d3a9feaf59ce6b06bd1b83e858c07 100644 (file)
 #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)
@@ -111,8 +107,11 @@ static inline void av_free_packet(AVPacket *pkt)
 /*************************************************/
 /* 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;
@@ -132,6 +131,7 @@ typedef struct AVProbeData {
 } 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;
@@ -204,7 +204,7 @@ typedef struct AVInputFormat {
     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);
@@ -252,6 +252,13 @@ typedef struct AVInputFormat {
     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;
@@ -298,17 +305,15 @@ typedef struct AVStream {
     /** 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;
@@ -526,7 +531,7 @@ int av_open_input_stream(AVFormatContext **ic_ptr,
  * @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,
@@ -880,9 +885,5 @@ int match_ext(const char *filename, const char *extensions);
 
 #endif /* HAVE_AV_CONFIG_H */
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* AVFORMAT_H */