[FFmpeg-devel] [RFC] avcodec/bsf: support operations on side data in AVBSFContext
leozhang
leozhang at qiyi.com
Wed May 27 13:50:34 EEST 2020
Signed-off-by: leozhang <leozhang at qiyi.com>
---
Please note that this is not a formal patch firstly. I send this to sincerely request your suggestions/objections.
And why need operating side data in AVBSFContext? Because I'm planning to create a bitstream filter which inject AV_PKT_DATA_SPHERICAL info, and transfer to AVCodecContext/AVStream.
libavcodec/bsf.h | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/libavcodec/bsf.h b/libavcodec/bsf.h
index 7ed5167..740fa78 100644
--- a/libavcodec/bsf.h
+++ b/libavcodec/bsf.h
@@ -93,6 +93,12 @@ typedef struct AVBSFContext {
* filter in av_bsf_init().
*/
AVRational time_base_out;
+
+ /**
+ * Additional data associated with the entire bitstream.
+ */
+ AVPacketSideData *side_data;
+ size_t nb_side_data;
} AVBSFContext;
typedef struct AVBitStreamFilter {
@@ -318,6 +324,18 @@ int av_bsf_list_parse_str(const char *str, AVBSFContext **bsf);
*/
int av_bsf_get_null_filter(AVBSFContext **bsf);
+/*
+ * functions To Be Implement
+int av_bsf_add_side_data(AVBSFContext *bsf, enum AVPacketSideDataType type,
+ uint8_t *data, size_t size);
+
+uint8_t *av_bsf_new_side_data(AVBSFContext *bsf,
+ enum AVPacketSideDataType type, size_t size);
+
+uint8_t *av_bsf_get_side_data(const AVBSFContext *bsf,
+ enum AVPacketSideDataType type, size_t *size);
+ */
+
/**
* @}
*/
--
1.8.3.1
More information about the ffmpeg-devel
mailing list