mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-08-09 09:32:43 +00:00
avcodec/decode: Move exif declarations to exif_internal.h
It is (arguably) a slightly better place for them and avoids a forward declaration of enum AVExifHeaderMode which is not possible in ISO C before C23 (and requires specifying the underlying type with C23). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
committed by
James Almer
parent
ba825ce85f
commit
447a07fc12
@@ -49,6 +49,7 @@
|
||||
#include "codec_internal.h"
|
||||
#include "decode.h"
|
||||
#include "exif.h"
|
||||
#include "exif_internal.h"
|
||||
#include "hwaccel_internal.h"
|
||||
#include "hwconfig.h"
|
||||
#include "internal.h"
|
||||
|
||||
@@ -230,33 +230,4 @@ int ff_decode_content_light_new_ext(const AVCodecContext *avctx,
|
||||
AVFrameSideData ***sd, int *nb_sd,
|
||||
struct AVContentLightMetadata **clm);
|
||||
|
||||
enum AVExifHeaderMode;
|
||||
|
||||
/**
|
||||
* Attach the data buffer to the frame. This is mostly a wrapper for
|
||||
* av_side_data_new_from_buffer, but it checks if the orientation tag is
|
||||
* present in the provided EXIF buffer. If it is, it zeroes it out and
|
||||
* attaches that information as an AV_FRAME_DATA_DISPLAYMATRIX instead
|
||||
* of including it in the AV_FRAME_DATA_EXIF side data buffer.
|
||||
*
|
||||
* *buf is ALWAYS consumed by this function and NULL written in its place, even
|
||||
* on failure.
|
||||
*/
|
||||
int ff_decode_exif_attach_buffer(AVCodecContext *avctx, AVFrame *frame, AVBufferRef **buf,
|
||||
enum AVExifHeaderMode header_mode);
|
||||
|
||||
struct AVExifMetadata;
|
||||
|
||||
/**
|
||||
* Attach an already-parsed EXIF metadata struct to the frame as a side data
|
||||
* buffer. It writes the EXIF IFD into the buffer and attaches the buffer to
|
||||
* the frame.
|
||||
*
|
||||
* If the metadata struct contains an orientation tag, it will be zeroed before
|
||||
* writing, and instead, an AV_FRAME_DATA_DISPLAYMATRIX will be attached in
|
||||
* addition to the AV_FRAME_DATA_EXIF side data.
|
||||
*/
|
||||
int ff_decode_exif_attach_ifd(AVCodecContext *avctx, AVFrame *frame,
|
||||
const struct AVExifMetadata *ifd);
|
||||
|
||||
#endif /* AVCODEC_DECODE_H */
|
||||
|
||||
@@ -65,4 +65,30 @@ int ff_exif_sanitize_ifd(void *logctx, const AVFrame *frame, AVExifMetadata *ifd
|
||||
*/
|
||||
int ff_exif_get_buffer(void *logctx, const AVFrame *frame, AVBufferRef **buffer, enum AVExifHeaderMode header_mode);
|
||||
|
||||
struct AVCodecContext;
|
||||
/**
|
||||
* Attach the data buffer to the frame. This is mostly a wrapper for
|
||||
* av_side_data_new_from_buffer, but it checks if the orientation tag is
|
||||
* present in the provided EXIF buffer. If it is, it zeroes it out and
|
||||
* attaches that information as an AV_FRAME_DATA_DISPLAYMATRIX instead
|
||||
* of including it in the AV_FRAME_DATA_EXIF side data buffer.
|
||||
*
|
||||
* *buf is ALWAYS consumed by this function and NULL written in its place, even
|
||||
* on failure.
|
||||
*/
|
||||
int ff_decode_exif_attach_buffer(struct AVCodecContext *avctx, AVFrame *frame, AVBufferRef **buf,
|
||||
enum AVExifHeaderMode header_mode);
|
||||
|
||||
/**
|
||||
* Attach an already-parsed EXIF metadata struct to the frame as a side data
|
||||
* buffer. It writes the EXIF IFD into the buffer and attaches the buffer to
|
||||
* the frame.
|
||||
*
|
||||
* If the metadata struct contains an orientation tag, it will be zeroed before
|
||||
* writing, and instead, an AV_FRAME_DATA_DISPLAYMATRIX will be attached in
|
||||
* addition to the AV_FRAME_DATA_EXIF side data.
|
||||
*/
|
||||
int ff_decode_exif_attach_ifd(struct AVCodecContext *avctx, AVFrame *frame,
|
||||
const struct AVExifMetadata *ifd);
|
||||
|
||||
#endif /* AVCODEC_EXIF_INTERNAL_H */
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
#include "copy_block.h"
|
||||
#include "decode.h"
|
||||
#include "exif.h"
|
||||
#include "exif_internal.h"
|
||||
#include "hwaccel_internal.h"
|
||||
#include "hwconfig.h"
|
||||
#include "idctdsp.h"
|
||||
|
||||
Reference in New Issue
Block a user