#define AVFORMAT_AVFORMAT_H
#define LIBAVFORMAT_VERSION_MAJOR 52
-#define LIBAVFORMAT_VERSION_MINOR 23
-#define LIBAVFORMAT_VERSION_MICRO 1
+#define LIBAVFORMAT_VERSION_MINOR 25
+#define LIBAVFORMAT_VERSION_MICRO 0
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
LIBAVFORMAT_VERSION_MINOR, \
/*
* Public Metadata API.
+ * !!WARNING!! This is a work in progress. Don't use outside FFmpeg for now.
* The metadata API allows libavformat to export metadata tags to a client
* application using a sequence of key/value pairs.
* Important concepts to keep in mind:
* A demuxer should set a default if it sets any translated tag.
*/
-#define AV_METADATA_IGNORE_CASE 1
+#define AV_METADATA_MATCH_CASE 1
#define AV_METADATA_IGNORE_SUFFIX 2
typedef struct {
char *value;
}AVMetadataTag;
-struct AVMetadata;
+typedef struct AVMetadata AVMetadata;
/**
* gets a metadata element with matching key.
* @param prev set to the previous matching element to find the next.
- * @param flags allows case as well as suffix insensitive comparissions.
+ * @param flags allows case as well as suffix insensitive comparisons.
* @return found tag or NULL, changing key or value leads to undefined behavior.
*/
AVMetadataTag *
-av_metadata_get(struct AVMetadata *m, const char *key, const AVMetadataTag *prev, int flags);
+av_metadata_get(AVMetadata *m, const char *key, const AVMetadataTag *prev, int flags);
/**
* sets the given tag in m, overwriting an existing tag.
- * @param tag tag to add to m, key and value will be av_strduped.
+ * @param key tag key to add to m (will be av_strduped).
+ * @param value tag value to add to m (will be av_strduped).
* @return >= 0 if success otherwise error code that is <0.
*/
-int av_metadata_set(struct AVMetadata **m, AVMetadataTag tag);
+int av_metadata_set(AVMetadata **pm, const char *key, const char *value);
+
+/**
+ * Free all the memory allocated for an AVMetadata struct.
+ */
+void av_metadata_free(AVMetadata **m);
/* packet functions */
*/
AVRational sample_aspect_ratio;
- struct AVMetadata *metadata;
+ AVMetadata *metadata;
+
+ /* av_read_frame() support */
+ const uint8_t *cur_ptr;
+ int cur_len;
+ AVPacket cur_pkt;
} AVStream;
#define AV_PROGRAM_RUNNING 1
enum AVDiscard discard; ///< selects which program to discard and which to feed to the caller
unsigned int *stream_index;
unsigned int nb_stream_indexes;
- struct AVMetadata *metadata;
+ AVMetadata *metadata;
} AVProgram;
#define AVFMTCTX_NOHEADER 0x0001 /**< signal that no header is present
AVRational time_base; ///< time base in which the start/end timestamps are specified
int64_t start, end; ///< chapter start/end time in time_base units
char *title; ///< chapter title
- struct AVMetadata *metadata;
+ AVMetadata *metadata;
} AVChapter;
#define MAX_STREAMS 20
/* av_read_frame() support */
AVStream *cur_st;
- const uint8_t *cur_ptr;
- int cur_len;
- AVPacket cur_pkt;
+#if LIBAVFORMAT_VERSION_INT < (53<<16)
+ const uint8_t *cur_ptr_deprecated;
+ int cur_len_deprecated;
+ AVPacket cur_pkt_deprecated;
+#endif
/* av_seek_frame() support */
int64_t data_offset; /** offset of the first packet */
struct AVPacketList *packet_buffer_end;
- struct AVMetadata *metadata;
+ AVMetadata *metadata;
} AVFormatContext;
typedef struct AVPacketList {
*/
void av_pkt_dump_log(void *avcl, int level, AVPacket *pkt, int dump_payload);
+/**
+ * Initialize libavformat and register all the muxers, demuxers and
+ * protocols. If you do not call this function, then you can select
+ * exactly which formats you want to support.
+ *
+ * @see av_register_input_format()
+ * @see av_register_output_format()
+ * @see register_protocol()
+ */
void av_register_all(void);
/** codec tag <-> codec id */