* not decoded, for example to get the codec parameters in MPEG
* streams.
*/
- struct AVPacketList *packet_buffer;
- struct AVPacketList *packet_buffer_end;
+ struct PacketList *packet_buffer;
+ struct PacketList *packet_buffer_end;
/* av_seek_frame() support */
int64_t data_offset; /**< offset of the first packet */
* be identified, as parsing cannot be done without knowing the
* codec.
*/
- struct AVPacketList *raw_packet_buffer;
- struct AVPacketList *raw_packet_buffer_end;
+ struct PacketList *raw_packet_buffer;
+ struct PacketList *raw_packet_buffer_end;
/**
* Packets split by the parser get queued here.
*/
- struct AVPacketList *parse_queue;
- struct AVPacketList *parse_queue_end;
+ AVPacket *parse_pkt;
+ struct PacketList *parse_queue;
+ struct PacketList *parse_queue_end;
+
+ /**
+ * Used to hold temporary packets.
+ */
+ AVPacket *pkt;
/**
* Remaining size available for raw_packet_buffer, in bytes.
*/
* Prefer the codec framerate for avg_frame_rate computation.
*/
int prefer_codec_framerate;
+
+ /**
+ * Set if chapter ids are strictly monotonic.
+ */
+ int chapter_ids_monotonic;
};
struct AVStreamInternal {
} *info;
+ AVIndexEntry *index_entries; /**< Only used if the format does not
+ support seeking natively. */
+ int nb_index_entries;
+ unsigned int index_entries_allocated_size;
+
+ int64_t interleaver_chunk_size;
+ int64_t interleaver_chunk_duration;
+
/**
* stream probing state
* -1 -> probing finished
*/
int update_initial_durations_done;
+#define MAX_REORDER_DELAY 16
+
/**
* Internal data to generate dts from pts
*/
int64_t pts_reorder_error[MAX_REORDER_DELAY+1];
uint8_t pts_reorder_error_count[MAX_REORDER_DELAY+1];
+ int64_t pts_buffer[MAX_REORDER_DELAY+1];
+
/**
* Internal data to analyze DTS and detect faulty mpeg streams
*/
* - decoding: Set by libavformat to calculate sample_aspect_ratio internally
*/
AVRational display_aspect_ratio;
+
+ AVProbeData probe_data;
+
+ /**
+ * last packet in packet_buffer for this stream when muxing.
+ */
+ struct PacketList *last_in_packet_buffer;
};
#ifdef __GNUC__
} while(0)
#endif
-struct tm *ff_brktimegm(time_t secs, struct tm *tm);
-
/**
* Automatically create sub-directories
*
*
* @return AVChapter or NULL on error
*/
+#if FF_API_CHAPTER_ID_INT
AVChapter *avpriv_new_chapter(AVFormatContext *s, int id, AVRational time_base,
+#else
+AVChapter *avpriv_new_chapter(AVFormatContext *s, int64_t id, AVRational time_base,
+#endif
int64_t start, int64_t end, const char *title);
/**
/**
* Find the next packet in the interleaving queue for the given stream.
- * The pkt parameter is filled in with the queued packet, including
- * references to the data (which the caller is not allowed to keep or
- * modify).
*
- * @return 0 if a packet was found, a negative value if no packet was found
+ * @return a pointer to a packet if one was found, NULL otherwise.
*/
-int ff_interleaved_peek(AVFormatContext *s, int stream,
- AVPacket *pkt, int add_offset);
+const AVPacket *ff_interleaved_peek(AVFormatContext *s, int stream);
+int ff_get_muxer_ts_offset(AVFormatContext *s, int stream_index, int64_t *offset);
int ff_lock_avformat(void);
int ff_unlock_avformat(void);