#include <stdint.h>
#include "avformat.h"
+#include "os_support.h"
#define MAX_URL_SIZE 4096
enum AVCodecID id;
} CodecMime;
+struct AVFormatInternal {
+ /**
+ * Number of streams relevant for interleaving.
+ * Muxing only.
+ */
+ int nb_interleaved_streams;
+};
+
void ff_dynarray_add(intptr_t **tab_ptr, int *nb_ptr, intptr_t elem);
#ifdef __GNUC__
* Add packet to AVFormatContext->packet_buffer list, determining its
* interleaved position using compare() function argument.
*/
-void ff_interleave_add_packet(AVFormatContext *s, AVPacket *pkt,
- int (*compare)(AVFormatContext *, AVPacket *, AVPacket *));
+int ff_interleave_add_packet(AVFormatContext *s, AVPacket *pkt,
+ int (*compare)(AVFormatContext *, AVPacket *, AVPacket *));
void ff_read_frame_flush(AVFormatContext *s);
/**
* Return the frame duration in seconds. Return 0 if not available.
*/
-void ff_compute_frame_duration(int *pnum, int *pden, AVStream *st,
+void ff_compute_frame_duration(AVFormatContext *s, int *pnum, int *pden, AVStream *st,
AVCodecParserContext *pc, AVPacket *pkt);
-int ff_get_audio_frame_size(AVCodecContext *enc, int size, int mux);
-
unsigned int ff_codec_get_tag(const AVCodecTag *tags, enum AVCodecID id);
enum AVCodecID ff_codec_get_id(const AVCodecTag *tags, unsigned int tag);
*/
enum AVCodecID ff_get_pcm_codec_id(int bps, int flt, int be, int sflags);
+/**
+ * Generate standard extradata for AVC-Intra based on width/height and field
+ * order.
+ */
+int ff_generate_avci_extradata(AVStream *st);
+
+/**
+ * Wrap errno on rename() error.
+ *
+ * @param oldpath source path
+ * @param newpath destination path
+ * @return 0 or AVERROR on failure
+ */
+static inline int ff_rename(const char *oldpath, const char *newpath)
+{
+ if (rename(oldpath, newpath) == -1)
+ return AVERROR(errno);
+ return 0;
+}
+
#endif /* AVFORMAT_INTERNAL_H */