[FFmpeg-devel] [PATCH 1/3] avcodec/avcodec: add an event flags field to AVCodecContext
James Almer
jamrial at gmail.com
Tue Apr 11 23:38:49 EEST 2023
Signed-off-by: James Almer <jamrial at gmail.com>
---
doc/APIchanges | 3 +++
libavcodec/avcodec.h | 14 ++++++++++++++
libavcodec/version.h | 2 +-
3 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/doc/APIchanges b/doc/APIchanges
index 44ba3ad634..59216231f9 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -2,6 +2,9 @@ The last version increases of all libraries were on 2023-02-09
API changes, most recent first:
+2023-04-11 - xxxxxxxxxx - lavc 60.10.100 - avcodec.h
+ Add event_flags to AVCodecContext.
+
2023-04-04 - xxxxxxxxxx - lavu 58.6.100 - hdr_dynamic_metadata.h
Add AV_HDR_PLUS_MAX_PAYLOAD_SIZE.
av_dynamic_hdr_plus_create_side_data() now accepts a user provided
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 1e91b9cb53..6cc54edab9 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -2087,6 +2087,20 @@ typedef struct AVCodecContext {
* an error.
*/
int64_t frame_num;
+
+ /**
+ * Flags indicating events happening on the stream, a combination of
+ * AVCTX_EVENT_FLAG_*.
+ *
+ * - decoding: may be set by the decoder in avcodec_open2(),
+ * avcodec_send_packet() and avcodec_receive_frame(). Flags must be
+ * cleared by the user once the event has been handled.
+ * - encoding: may be set by the user after avcodec_open2(), to
+ * indicate a user-triggered event. The encoder will clear the flags
+ * for events it has handled in avcodec_send_frame() and
+ * avcodec_receive_{packet,frame}().
+ */
+ int event_flags;
} AVCodecContext;
/**
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 230d5fa13e..80e2ae630d 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -29,7 +29,7 @@
#include "version_major.h"
-#define LIBAVCODEC_VERSION_MINOR 9
+#define LIBAVCODEC_VERSION_MINOR 10
#define LIBAVCODEC_VERSION_MICRO 100
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
--
2.40.0
More information about the ffmpeg-devel
mailing list