avcodec/cbs: add API to discard units by AVDiscard

This commit is contained in:
Zhao Zhili
2023-05-18 05:23:38 +08:00
parent 5e9986fd2d
commit a8aeab107e
3 changed files with 44 additions and 0 deletions

View File

@@ -133,6 +133,12 @@ typedef struct CodedBitstreamType {
CodedBitstreamUnit *unit,
PutBitContext *pbc);
// Return 1 when the unit should be dropped according to 'skip',
// 0 otherwise.
int (*discarded_unit)(CodedBitstreamContext *ctx,
const CodedBitstreamUnit *unit,
enum AVDiscard skip);
// Read the data from all of frag->units and assemble it into
// a bitstream for the whole fragment.
int (*assemble_fragment)(CodedBitstreamContext *ctx,