aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/avcodec.h
diff options
context:
space:
mode:
authorJosh de Kock <josh@itanimul.li>2017-12-22 22:17:00 +0000
committerJosh de Kock <josh@itanimul.li>2018-02-06 18:50:27 +0000
commit7e8eba2d8755962d9dca5eade57bf8f591a73c0c (patch)
treeb997d9b1f5efa61f828f21e130355e3f9d85d3b0 /libavcodec/avcodec.h
parentcaa4bd7a9fe9186a56fdcb8194263b066978cbbe (diff)
downloadffmpeg-7e8eba2d8755962d9dca5eade57bf8f591a73c0c.tar.gz
lavc: add new API for iterating codecs and codec parsers
Based on an unfinished patch by atomnuker.
Diffstat (limited to 'libavcodec/avcodec.h')
-rw-r--r--libavcodec/avcodec.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 8fbbc798a2..99f5fb9da0 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -3979,11 +3979,25 @@ typedef struct AVCodecParameters {
} AVCodecParameters;
/**
+ * Iterate over all registered codecs.
+ *
+ * @param opaque a pointer where libavcodec will store the iteration state. Must
+ * point to NULL to start the iteration.
+ *
+ * @return the next registered codec or NULL when the iteration is
+ * finished
+ */
+const AVCodec *av_codec_iterate(void **opaque);
+
+#if FF_API_NEXT
+/**
* If c is NULL, returns the first registered codec,
* if c is non-NULL, returns the next registered codec after c,
* or NULL if c is the last one.
*/
+attribute_deprecated
AVCodec *av_codec_next(const AVCodec *c);
+#endif
/**
* Return the LIBAVCODEC_VERSION_INT constant.
@@ -4000,6 +4014,7 @@ const char *avcodec_configuration(void);
*/
const char *avcodec_license(void);
+#if FF_API_NEXT
/**
* Register the codec codec and initialize libavcodec.
*
@@ -4008,6 +4023,7 @@ const char *avcodec_license(void);
*
* @see avcodec_register_all()
*/
+attribute_deprecated
void avcodec_register(AVCodec *codec);
/**
@@ -4020,7 +4036,9 @@ void avcodec_register(AVCodec *codec);
* @see av_register_codec_parser
* @see av_register_bitstream_filter
*/
+attribute_deprecated
void avcodec_register_all(void);
+#endif
/**
* Allocate an AVCodecContext and set its fields to default values. The
@@ -5120,8 +5138,21 @@ typedef struct AVCodecParser {
struct AVCodecParser *next;
} AVCodecParser;
+/**
+ * Iterate over all registered codec parsers.
+ *
+ * @param opaque a pointer where libavcodec will store the iteration state. Must
+ * point to NULL to start the iteration.
+ *
+ * @return the next registered codec parser or NULL when the iteration is
+ * finished
+ */
+const AVCodecParser *av_parser_iterate(void **opaque);
+
+attribute_deprecated
AVCodecParser *av_parser_next(const AVCodecParser *c);
+attribute_deprecated
void av_register_codec_parser(AVCodecParser *parser);
AVCodecParserContext *av_parser_init(int codec_id);