mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-06-16 04:32:47 +02:00
avcodec/exif.h: fix documentation on av_exif_get_entry and similar
Add additional documentation to av_exif_get_entry and also to av_exif_set_entry that was already part of the existing ABI but was insufficiently documented before this commit. Also clarifies that av_fast_realloc is used, instead of av_realloc on av_exif_set_entry. Signed-off-by: Leo Izen <leo.izen@gmail.com>
This commit is contained in:
+18
-4
@@ -138,7 +138,7 @@ int32_t av_exif_get_tag_id(const char *name);
|
||||
* ID, it will set the existing one to have the other information provided. Otherwise, it
|
||||
* will allocate a new entry.
|
||||
*
|
||||
* This function reallocates ifd->entries using av_realloc and allocates (using av_malloc)
|
||||
* This function reallocates ifd->entries using av_fast_realloc and allocates (using av_malloc)
|
||||
* a new value member of the entry, then copies the contents of value into that buffer.
|
||||
*/
|
||||
int av_exif_set_entry(void *logctx, AVExifMetadata *ifd, uint16_t id, enum AVTiffDataType type,
|
||||
@@ -154,8 +154,14 @@ int av_exif_set_entry(void *logctx, AVExifMetadata *ifd, uint16_t id, enum AVTif
|
||||
* will be written into *value.
|
||||
*
|
||||
* If the entry was present and returned successfully, a positive number is returned.
|
||||
*
|
||||
* The positive number is equal to 1 plus the offset at which the entry was found. If the
|
||||
* entry was found at the top level, this will be in the range of 1 to the number of entries
|
||||
* in the IFD (inclusive). If the entry was found in a sub-IFD, then it will be a number greater
|
||||
* than the number of entries in the top-level IFD.
|
||||
*
|
||||
* If the entry was not found, *value is left untouched and zero is returned.
|
||||
* If an error occurred, a negative number is returned.
|
||||
* If an error occurred, a negative AVERROR is returned.
|
||||
*/
|
||||
int av_exif_get_entry(void *logctx, AVExifMetadata *ifd, uint16_t id, int flags, AVExifEntry **value);
|
||||
|
||||
@@ -163,8 +169,16 @@ int av_exif_get_entry(void *logctx, AVExifMetadata *ifd, uint16_t id, int flags,
|
||||
* Remove an entry from the provided EXIF metadata struct.
|
||||
*
|
||||
* If the entry was present and removed successfully, a positive number is returned.
|
||||
* If the entry was not found, zero is returned.
|
||||
* If an error occurred, a negative number is returned.
|
||||
*
|
||||
* The positive number is equal to 1 plus the offset at which the entry was found. If the
|
||||
* entry was found at the top level, this will be in the range of 1 to the number of entries
|
||||
* in the IFD (inclusive). If the entry was found in a sub-IFD, then it will be a number greater
|
||||
* than the number of entries in the top-level IFD. This refers to the state of the IFD before
|
||||
* the entry was removed, e.g. if the last entry is removed, a 1 is returned, but the IFD has
|
||||
* no entries anymore.
|
||||
*
|
||||
* If the entry was not found, zero is returned and the IFD is left untouched.
|
||||
* If an error occurred, a negative AVERROR is returned.
|
||||
*/
|
||||
int av_exif_remove_entry(void *logctx, AVExifMetadata *ifd, uint16_t id, int flags);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user