FFmpeg
|
#include "libavutil/buffer.h"
#include "libavutil/frame.h"
#include "exif.h"
#include "version_major.h"
Go to the source code of this file.
Functions | |
int | avpriv_exif_decode_ifd (void *logctx, const uint8_t *buf, int size, int le, int depth, AVDictionary **metadata) |
int | ff_exif_sanitize_ifd (void *logctx, const AVFrame *frame, AVExifMetadata *ifd) |
Compares values in the IFD with data in the provided AVFrame and sets the values in that IFD to match the ones in that AVFrame. More... | |
int | ff_exif_get_buffer (void *logctx, const AVFrame *frame, AVBufferRef **buffer, enum AVExifHeaderMode header_mode) |
Gets all relevant side data, collects it into an IFD, and writes it into the corresponding buffer pointer. More... | |
EXIF metadata parser - internal functions
Definition in file exif_internal.h.
int avpriv_exif_decode_ifd | ( | void * | logctx, |
const uint8_t * | buf, | ||
int | size, | ||
int | le, | ||
int | depth, | ||
AVDictionary ** | metadata | ||
) |
int ff_exif_sanitize_ifd | ( | void * | logctx, |
const AVFrame * | frame, | ||
AVExifMetadata * | ifd | ||
) |
Compares values in the IFD with data in the provided AVFrame and sets the values in that IFD to match the ones in that AVFrame.
This is mostly useful for an encoder that wishes to use ff_exif_get_buffer, but would prefer to modify the IFD after it is sanitized and call av_exif_write afterward.
Definition at line 1230 of file exif.c.
Referenced by ff_exif_get_buffer(), and libjxl_preprocess_stream().
int ff_exif_get_buffer | ( | void * | logctx, |
const AVFrame * | frame, | ||
AVBufferRef ** | buffer, | ||
enum AVExifHeaderMode | header_mode | ||
) |
Gets all relevant side data, collects it into an IFD, and writes it into the corresponding buffer pointer.
This includes both AV_FRAME_DATA_EXIF and other side data types that are included in the frame data, such as possibly an instance of AV_FRAME_DATA_DISPLAYMATRIX. It also sets width and height tags to match those of the AVFrame if they are different.
Upon error, *buffer will be NULL. The buffer becomes owned by the caller upon success. The *buffer argument must be NULL before calling. If *buffer is NULL upon return then a negative return value indicates an error, and a zero return value indicates that there was no EXIF data to write.
Definition at line 1355 of file exif.c.
Referenced by encode_headers().