summaryrefslogtreecommitdiff
path: root/libavcodec/bsf_internal.h
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-03-21 22:25:27 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-03-23 23:45:45 +0100
commitf4098bbc3b10926f618cf89e24780c9e6ae9b8b5 (patch)
treedb7d738eeeefadfc5b2400c4375b2a50d9d07516 /libavcodec/bsf_internal.h
parent1dcd0adedd15f2595d51febbfc171c576c9e080a (diff)
avcodec/bsf: Add FFBitStreamFilter, hide internals of BSFs
This patch is analogous to 20f972701806be20a77f808db332d9489343bb78: It hides the internal part of AVBitStreamFilter by adding a new internal structure FFBitStreamFilter (declared in bsf_internal.h) that has an AVBitStreamFilter as its first member; the internal part of AVBitStreamFilter is moved to this new structure. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/bsf_internal.h')
-rw-r--r--libavcodec/bsf_internal.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/libavcodec/bsf_internal.h b/libavcodec/bsf_internal.h
index 06979fdaa3..922b03c01b 100644
--- a/libavcodec/bsf_internal.h
+++ b/libavcodec/bsf_internal.h
@@ -24,6 +24,19 @@
#include "bsf.h"
#include "packet.h"
+typedef struct FFBitStreamFilter {
+ /**
+ * The public AVBitStreamFilter. See bsf.h for it.
+ */
+ AVBitStreamFilter p;
+
+ int priv_data_size;
+ int (*init)(AVBSFContext *ctx);
+ int (*filter)(AVBSFContext *ctx, AVPacket *pkt);
+ void (*close)(AVBSFContext *ctx);
+ void (*flush)(AVBSFContext *ctx);
+} FFBitStreamFilter;
+
/**
* Called by the bitstream filters to get the next packet for filtering.
* The filter is responsible for either freeing the packet or passing it to the