FFmpeg
Functions
iamf_writer.c File Reference
#include "libavutil/channel_layout.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/iamf.h"
#include "libavutil/mem.h"
#include "libavcodec/get_bits.h"
#include "libavcodec/put_bits.h"
#include "avformat.h"
#include "avio_internal.h"
#include "iamf.h"
#include "iamf_writer.h"

Go to the source code of this file.

Functions

static int update_extradata (IAMFCodecConfig *codec_config)
 
static int populate_audio_roll_distance (IAMFCodecConfig *codec_config)
 
static int fill_codec_config (IAMFContext *iamf, const AVStreamGroup *stg, IAMFCodecConfig *codec_config)
 
static int add_param_definition (IAMFContext *iamf, AVIAMFParamDefinition *param, const IAMFAudioElement *audio_element, void *log_ctx)
 
int ff_iamf_add_audio_element (IAMFContext *iamf, const AVStreamGroup *stg, void *log_ctx)
 
int ff_iamf_add_mix_presentation (IAMFContext *iamf, const AVStreamGroup *stg, void *log_ctx)
 
static int iamf_write_codec_config (const IAMFContext *iamf, const IAMFCodecConfig *codec_config, AVIOContext *pb)
 
static int rescale_rational (AVRational q, int b)
 
static int scalable_channel_layout_config (const IAMFAudioElement *audio_element, AVIOContext *dyn_bc)
 
static int ambisonics_config (const IAMFAudioElement *audio_element, AVIOContext *dyn_bc)
 
static int param_definition (const IAMFContext *iamf, const IAMFParamDefinition *param_def, AVIOContext *dyn_bc, void *log_ctx)
 
static int iamf_write_audio_element (const IAMFContext *iamf, const IAMFAudioElement *audio_element, AVIOContext *pb, void *log_ctx)
 
static int iamf_write_mixing_presentation (const IAMFContext *iamf, const IAMFMixPresentation *mix_presentation, AVIOContext *pb, void *log_ctx)
 
int ff_iamf_write_descriptors (const IAMFContext *iamf, AVIOContext *pb, void *log_ctx)
 
static int write_parameter_block (const IAMFContext *iamf, AVIOContext *pb, const AVIAMFParamDefinition *param, void *log_ctx)
 
int ff_iamf_write_parameter_blocks (const IAMFContext *iamf, AVIOContext *pb, const AVPacket *pkt, void *log_ctx)
 
static IAMFAudioElementget_audio_element (const IAMFContext *c, unsigned int audio_substream_id)
 
int ff_iamf_write_audio_frame (const IAMFContext *iamf, AVIOContext *pb, unsigned audio_substream_id, const AVPacket *pkt)
 

Function Documentation

◆ update_extradata()

static int update_extradata ( IAMFCodecConfig codec_config)
static

Definition at line 34 of file iamf_writer.c.

Referenced by ff_iamf_write_audio_frame(), and fill_codec_config().

◆ populate_audio_roll_distance()

static int populate_audio_roll_distance ( IAMFCodecConfig codec_config)
static

Definition at line 79 of file iamf_writer.c.

Referenced by fill_codec_config().

◆ fill_codec_config()

static int fill_codec_config ( IAMFContext iamf,
const AVStreamGroup stg,
IAMFCodecConfig codec_config 
)
static

Definition at line 107 of file iamf_writer.c.

Referenced by ff_iamf_add_audio_element().

◆ add_param_definition()

static int add_param_definition ( IAMFContext iamf,
AVIAMFParamDefinition param,
const IAMFAudioElement audio_element,
void *  log_ctx 
)
static

Definition at line 160 of file iamf_writer.c.

Referenced by ff_iamf_add_audio_element(), and ff_iamf_add_mix_presentation().

◆ ff_iamf_add_audio_element()

int ff_iamf_add_audio_element ( IAMFContext iamf,
const AVStreamGroup stg,
void *  log_ctx 
)

Definition at line 203 of file iamf_writer.c.

Referenced by iamf_init().

◆ ff_iamf_add_mix_presentation()

int ff_iamf_add_mix_presentation ( IAMFContext iamf,
const AVStreamGroup stg,
void *  log_ctx 
)

Definition at line 369 of file iamf_writer.c.

Referenced by iamf_init().

◆ iamf_write_codec_config()

static int iamf_write_codec_config ( const IAMFContext iamf,
const IAMFCodecConfig codec_config,
AVIOContext pb 
)
static

Definition at line 444 of file iamf_writer.c.

Referenced by ff_iamf_write_descriptors().

◆ rescale_rational()

static int rescale_rational ( AVRational  q,
int  b 
)
inlinestatic

◆ scalable_channel_layout_config()

static int scalable_channel_layout_config ( const IAMFAudioElement audio_element,
AVIOContext dyn_bc 
)
static

Definition at line 528 of file iamf_writer.c.

Referenced by iamf_write_audio_element().

◆ ambisonics_config()

static int ambisonics_config ( const IAMFAudioElement audio_element,
AVIOContext dyn_bc 
)
static

Definition at line 566 of file iamf_writer.c.

Referenced by iamf_write_audio_element().

◆ param_definition()

static int param_definition ( const IAMFContext iamf,
const IAMFParamDefinition param_def,
AVIOContext dyn_bc,
void *  log_ctx 
)
static

◆ iamf_write_audio_element()

static int iamf_write_audio_element ( const IAMFContext iamf,
const IAMFAudioElement audio_element,
AVIOContext pb,
void *  log_ctx 
)
static

Definition at line 627 of file iamf_writer.c.

Referenced by ff_iamf_write_descriptors().

◆ iamf_write_mixing_presentation()

static int iamf_write_mixing_presentation ( const IAMFContext iamf,
const IAMFMixPresentation mix_presentation,
AVIOContext pb,
void *  log_ctx 
)
static

Definition at line 730 of file iamf_writer.c.

Referenced by ff_iamf_write_descriptors().

◆ ff_iamf_write_descriptors()

int ff_iamf_write_descriptors ( const IAMFContext iamf,
AVIOContext pb,
void *  log_ctx 
)

Definition at line 866 of file iamf_writer.c.

Referenced by iamf_write_header(), and iamf_write_trailer().

◆ write_parameter_block()

static int write_parameter_block ( const IAMFContext iamf,
AVIOContext pb,
const AVIAMFParamDefinition param,
void *  log_ctx 
)
static

Definition at line 899 of file iamf_writer.c.

Referenced by ff_iamf_write_parameter_blocks().

◆ ff_iamf_write_parameter_blocks()

int ff_iamf_write_parameter_blocks ( const IAMFContext iamf,
AVIOContext pb,
const AVPacket pkt,
void *  log_ctx 
)

Definition at line 1024 of file iamf_writer.c.

Referenced by iamf_write_packet().

◆ get_audio_element()

static IAMFAudioElement* get_audio_element ( const IAMFContext c,
unsigned int  audio_substream_id 
)
static

Definition at line 1059 of file iamf_writer.c.

Referenced by ff_iamf_write_audio_frame().

◆ ff_iamf_write_audio_frame()

int ff_iamf_write_audio_frame ( const IAMFContext iamf,
AVIOContext pb,
unsigned  audio_substream_id,
const AVPacket pkt 
)

Definition at line 1074 of file iamf_writer.c.

Referenced by iamf_write_packet().