aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/cbs.h
diff options
context:
space:
mode:
authorZhao Zhili <zhilizhao@tencent.com>2023-05-18 05:23:38 +0800
committerZhao Zhili <zhilizhao@tencent.com>2023-06-19 11:52:18 +0800
commita8aeab107e274e8e3764a9004ac5209c8084127e (patch)
tree67cbfe15c58da7740ece54e32c561631364ef191 /libavcodec/cbs.h
parent5e9986fd2d95a294ba6d2256ecff977ad8911112 (diff)
downloadffmpeg-a8aeab107e274e8e3764a9004ac5209c8084127e.tar.gz
avcodec/cbs: add API to discard units by AVDiscard
Diffstat (limited to 'libavcodec/cbs.h')
-rw-r--r--libavcodec/cbs.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/libavcodec/cbs.h b/libavcodec/cbs.h
index ee21623dac..b4131db5fe 100644
--- a/libavcodec/cbs.h
+++ b/libavcodec/cbs.h
@@ -26,6 +26,7 @@
#include "codec_id.h"
#include "codec_par.h"
+#include "defs.h"
#include "packet.h"
@@ -432,5 +433,21 @@ int ff_cbs_make_unit_refcounted(CodedBitstreamContext *ctx,
int ff_cbs_make_unit_writable(CodedBitstreamContext *ctx,
CodedBitstreamUnit *unit);
+enum CbsDiscardFlags {
+ DISCARD_FLAG_NONE = 0,
+
+ /**
+ * keep non-vcl units even if the picture has been dropped.
+ */
+ DISCARD_FLAG_KEEP_NON_VCL = 0x01,
+};
+
+/**
+ * Discard units accroding to 'skip'.
+ */
+void ff_cbs_discard_units(CodedBitstreamContext *ctx,
+ CodedBitstreamFragment *frag,
+ enum AVDiscard skip,
+ int flags);
#endif /* AVCODEC_CBS_H */