diff options
Diffstat (limited to 'media/ffvpx/libavcodec/decode.h')
-rw-r--r-- | media/ffvpx/libavcodec/decode.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/media/ffvpx/libavcodec/decode.h b/media/ffvpx/libavcodec/decode.h index daf1a67444..4ffbd9db8e 100644 --- a/media/ffvpx/libavcodec/decode.h +++ b/media/ffvpx/libavcodec/decode.h @@ -155,4 +155,45 @@ int ff_hwaccel_frame_priv_alloc(AVCodecContext *avctx, void **hwaccel_picture_pr const AVPacketSideData *ff_get_coded_side_data(const AVCodecContext *avctx, enum AVPacketSideDataType type); +/** + * Wrapper around av_frame_new_side_data, which rejects side data overridden by + * the demuxer. Returns 0 on success, and a negative error code otherwise. + * If successful and sd is not NULL, *sd may either contain a pointer to the new + * side data, or NULL in case the side data was already present. + */ +int ff_frame_new_side_data(const AVCodecContext *avctx, AVFrame *frame, + enum AVFrameSideDataType type, size_t size, + AVFrameSideData **sd); + +/** + * Similar to `ff_frame_new_side_data`, but using an existing buffer ref. + * + * *buf is ALWAYS consumed by this function and NULL written in its place, even + * on failure. + */ +int ff_frame_new_side_data_from_buf(const AVCodecContext *avctx, + AVFrame *frame, enum AVFrameSideDataType type, + AVBufferRef **buf, AVFrameSideData **sd); + +struct AVMasteringDisplayMetadata; +struct AVContentLightMetadata; + +/** + * Wrapper around av_mastering_display_metadata_create_side_data(), which + * rejects side data overridden by the demuxer. Returns 0 on success, and a + * negative error code otherwise. If successful, *mdm may either be a pointer to + * the new side data, or NULL in case the side data was already present. + */ +int ff_decode_mastering_display_new(const AVCodecContext *avctx, AVFrame *frame, + struct AVMasteringDisplayMetadata **mdm); + +/** + * Wrapper around av_content_light_metadata_create_side_data(), which + * rejects side data overridden by the demuxer. Returns 0 on success, and a + * negative error code otherwise. If successful, *clm may either be a pointer to + * the new side data, or NULL in case the side data was already present. + */ +int ff_decode_content_light_new(const AVCodecContext *avctx, AVFrame *frame, + struct AVContentLightMetadata **clm); + #endif /* AVCODEC_DECODE_H */ |