]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/internal.h
mov: Fix little endian audio detection
[ffmpeg] / libavformat / internal.h
index d69ce492faede2b85e861c45cd33ae4b1d11a7e9..f08ad90038034557eda4a6eec1ad0480cc0e1db0 100644 (file)
@@ -49,6 +49,47 @@ struct AVFormatInternal {
      * Muxing only.
      */
     int nb_interleaved_streams;
+
+    /**
+     * This buffer is only needed when packets were already buffered but
+     * not decoded, for example to get the codec parameters in MPEG
+     * streams.
+     */
+    struct AVPacketList *packet_buffer;
+    struct AVPacketList *packet_buffer_end;
+
+    /* av_seek_frame() support */
+    int64_t data_offset; /**< offset of the first packet */
+
+    /**
+     * Raw packets from the demuxer, prior to parsing and decoding.
+     * This buffer is used for buffering packets until the codec can
+     * be identified, as parsing cannot be done without knowing the
+     * codec.
+     */
+    struct AVPacketList *raw_packet_buffer;
+    struct AVPacketList *raw_packet_buffer_end;
+    /**
+     * Packets split by the parser get queued here.
+     */
+    struct AVPacketList *parse_queue;
+    struct AVPacketList *parse_queue_end;
+    /**
+     * Remaining size available for raw_packet_buffer, in bytes.
+     */
+#define RAW_PACKET_BUFFER_SIZE 2500000
+    int raw_packet_buffer_remaining_size;
+
+    /**
+     * Offset to remap timestamps to be non-negative.
+     * Expressed in timebase units.
+     */
+    int64_t offset;
+
+    /**
+     * Timebase for the timestamp offset.
+     */
+    AVRational offset_timebase;
 };
 
 void ff_dynarray_add(intptr_t **tab_ptr, int *nb_ptr, intptr_t elem);
@@ -366,10 +407,11 @@ static inline int ff_rename(const char *oldpath, const char *newpath)
     return 0;
 }
 
-#ifndef _WIN32
-#define USE_RENAME_REPLACE 1
-#else
-#define USE_RENAME_REPLACE 0
-#endif
+/**
+ * Add new side data to a stream. If a side data of this type already exists, it
+ * is replaced.
+ */
+uint8_t *ff_stream_new_side_data(AVStream *st, enum AVPacketSideDataType type,
+                                 int size);
 
 #endif /* AVFORMAT_INTERNAL_H */