FFmpeg
Functions
itut35.c File Reference
#include "libavutil/buffer.h"
#include "libavutil/frame.h"
#include "libavutil/hdr_dynamic_metadata.h"
#include "libavutil/internal.h"
#include "libavutil/mem.h"
#include "avcodec.h"
#include "atsc_a53.h"
#include "bytestream.h"
#include "decode.h"
#include "dynamic_hdr_vivid.h"
#include "dovi_rpu.h"
#include "itut35.h"
#include "version.h"

Go to the source code of this file.

Functions

int ff_itut_t35_parse_buffer (FFITUTT35 *const itut_t35, const uint8_t *buf, size_t buf_size, int flags)
 Parse a raw ITU-T T35 buffer to get the country code, provider code, and set them plus the pointer and size in the FFITUTT35 struct to the start of the actual payload. More...
 
int ff_itut_t35_parse_payload_to_struct (FFITUTT35 *const itut_t35, FFITUTT35Aux *const aux, FFITUTT35Meta *metadata, int err_recognition)
 Parse a pre-processed ITU-T T35 payload to fill the metadata struct. More...
 
int ff_itut_t35_parse_payload_to_frame (FFITUTT35 *const itut_t35, FFITUTT35Aux *const aux, AVCodecContext *const avctx, AVFrame *const frame)
 Parse a pre-processed ITU-T T35 payload to fill a frame's side data. More...
 
void ff_itut_t35_unref (FFITUTT35Meta *metadata)
 Unref all references in metadata. More...
 

Function Documentation

◆ ff_itut_t35_parse_buffer()

int ff_itut_t35_parse_buffer ( FFITUTT35 itut_t35,
const uint8_t *  buf,
size_t  size,
int  flags 
)

Parse a raw ITU-T T35 buffer to get the country code, provider code, and set them plus the pointer and size in the FFITUTT35 struct to the start of the actual payload.

Parameters
itut_t35The struct to fill
bufThe input buffer
sizeSize of the input buffer
flagsA combination of FF_ITUT_T35_FLAG_*
Returns
0 if nothing was done (e.g. the payload is of an unsupported type), 1 on success, or a negative AVERROR code on failure
Note
buf will remain owned by the caller, and no new allocations will be made. Any pointer in the resulting struct will be valid as long as buf is valid.

Definition at line 34 of file itut35.c.

Referenced by decode_metadata_itu_t_t35(), decode_registered_user_data(), export_itut_t35(), and parse_itut_t35_metadata().

◆ ff_itut_t35_parse_payload_to_struct()

int ff_itut_t35_parse_payload_to_struct ( FFITUTT35 itut_t35,
FFITUTT35Aux aux,
FFITUTT35Meta metadata,
int  err_recognition 
)

Parse a pre-processed ITU-T T35 payload to fill the metadata struct.

Parameters
itut_t35The pre-filled struct
auxA struct containing extra contexts required by certain payload types. Any pointer present is owned by the caller. May be NULL, in which case the relevant payloads will not be parsed.
metadataA metadata struct. All the allocated buffer references are owned by the caller and must be freed accordingly.
err_recognitionA combination of AV_EF_* flags
Returns
0 on success, or a negative AVERROR code on failure

Definition at line 163 of file itut35.c.

Referenced by decode_registered_user_data(), and ff_itut_t35_parse_payload_to_frame().

◆ ff_itut_t35_parse_payload_to_frame()

int ff_itut_t35_parse_payload_to_frame ( FFITUTT35 itut_t35,
FFITUTT35Aux aux,
AVCodecContext avctx,
AVFrame frame 
)

Parse a pre-processed ITU-T T35 payload to fill a frame's side data.

Parameters
itut_t35The pre-filled struct
auxA struct containing extra contexts required by certain payload types. Any pointer present is owned by the caller. May be NULL, in which case the relevant payloads will not be parsed.
avctxThe context that generated the frame
frameA frame
Returns
0 on success, or a negative AVERROR code on failure

Definition at line 318 of file itut35.c.

Referenced by decode_metadata_itu_t_t35(), export_itut_t35(), and parse_itut_t35_metadata().

◆ ff_itut_t35_unref()

void ff_itut_t35_unref ( FFITUTT35Meta metadata)

Unref all references in metadata.

Definition at line 395 of file itut35.c.

Referenced by ff_h2645_sei_reset(), and ff_itut_t35_parse_payload_to_frame().