]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/avformat.h
Reformat rdt_demuxer AVCodec struct sanely.
[ffmpeg] / libavformat / avformat.h
index 3c327b0357945af70df2cc2e9e4a8373a7729479..d7c457b9053aae3d7fbabe42fbafe25d86253a4f 100644 (file)
@@ -49,6 +49,7 @@ unsigned avformat_version(void);
 
 /*
  * 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:
@@ -80,7 +81,7 @@ 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 *
@@ -88,10 +89,11 @@ av_metadata_get(AVMetadata *m, const char *key, const AVMetadataTag *prev, int f
 
 /**
  * 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(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.
@@ -487,6 +489,11 @@ typedef struct AVStream {
     AVRational sample_aspect_ratio;
 
     AVMetadata *metadata;
+
+    /* av_read_frame() support */
+    const uint8_t *cur_ptr;
+    int cur_len;
+    AVPacket cur_pkt;
 } AVStream;
 
 #define AV_PROGRAM_RUNNING 1
@@ -573,9 +580,11 @@ typedef struct AVFormatContext {
 
     /* 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 */
@@ -750,6 +759,15 @@ void av_pkt_dump(FILE *f, AVPacket *pkt, int dump_payload);
  */
 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 */