diff options
author | Marvin Scholz <epirat07@gmail.com> | 2024-05-30 03:16:56 +0200 |
---|---|---|
committer | Zhao Zhili <zhilizhao@tencent.com> | 2024-07-05 19:13:43 +0800 |
commit | b4f9fcc63c29827f3bd2822f0d6ba6af098c9cb7 (patch) | |
tree | 071e1a55c70e12740c2779a1113a03aaa8d8656b | |
parent | 1fa7554bd6cc35b008045d33f9e948a92e7b901c (diff) | |
download | ffmpeg-b4f9fcc63c29827f3bd2822f0d6ba6af098c9cb7.tar.gz |
avutil/hwcontext_videotoolbox: Update documentation
The documentation was not clear at all what specifically the
function does, so it was left unspecified if it will unset or
not touch attachments it could not map from the AVFrame.
The documentation of the return value was wrong as well.
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
-rw-r--r-- | libavutil/hwcontext_videotoolbox.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/libavutil/hwcontext_videotoolbox.h b/libavutil/hwcontext_videotoolbox.h index 600e9f2c8d..d35cfbb6c1 100644 --- a/libavutil/hwcontext_videotoolbox.h +++ b/libavutil/hwcontext_videotoolbox.h @@ -90,8 +90,15 @@ CFStringRef av_map_videotoolbox_color_primaries_from_av(enum AVColorPrimaries pr CFStringRef av_map_videotoolbox_color_trc_from_av(enum AVColorTransferCharacteristic trc); /** - * Update a CVPixelBufferRef's metadata to based on an AVFrame. - * Returns 0 if no known equivalent was found. + * Set CVPixelBufferRef's metadata based on an AVFrame. + * + * Sets/unsets the CVPixelBuffer attachments to match as closely as possible the + * AVFrame metadata. To prevent inconsistent attachments, the attachments for properties + * that could not be matched or are unspecified in the given AVFrame are unset. So if + * any attachments already covered by AVFrame metadata need to be set to a specific + * value, this should happen after calling this function. + * + * Returns < 0 in case of an error. */ int av_vt_pixbuf_set_attachments(void *log_ctx, CVPixelBufferRef pixbuf, const struct AVFrame *src); |