diff mbox series

[FFmpeg-devel,1/3] avcodec/avcodec: add an event flags field to AVCodecContext

Message ID 20230411203851.65044-1-jamrial@gmail.com
State New
Headers show
Series [FFmpeg-devel,1/3] avcodec/avcodec: add an event flags field to AVCodecContext | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

James Almer April 11, 2023, 8:38 p.m. UTC
Signed-off-by: James Almer <jamrial@gmail.com>
---
 doc/APIchanges       |  3 +++
 libavcodec/avcodec.h | 14 ++++++++++++++
 libavcodec/version.h |  2 +-
 3 files changed, 18 insertions(+), 1 deletion(-)
diff mbox series

Patch

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, \