FFmpeg
Data Structures | Macros | Functions | Variables
cafenc.c File Reference
#include "avformat.h"
#include "caf.h"
#include "isom.h"
#include "avio_internal.h"
#include "mux.h"
#include "libavutil/intfloat.h"
#include "libavutil/dict.h"

Go to the source code of this file.

Data Structures

struct  CAFContext
 

Macros

#define FRAME_SIZE_OFFSET   40
 

Functions

static uint32_t codec_flags (enum AVCodecID codec_id)
 
static uint32_t samples_per_packet (const AVCodecParameters *par)
 
static int caf_write_header (AVFormatContext *s)
 
static int caf_write_packet (AVFormatContext *s, AVPacket *pkt)
 
static int caf_write_trailer (AVFormatContext *s)
 

Variables

const FFOutputFormat ff_caf_muxer
 

Macro Definition Documentation

◆ FRAME_SIZE_OFFSET

#define FRAME_SIZE_OFFSET   40

Definition at line 30 of file cafenc.c.

Function Documentation

◆ codec_flags()

static uint32_t codec_flags ( enum AVCodecID  codec_id)
static

Definition at line 39 of file cafenc.c.

Referenced by caf_write_header().

◆ samples_per_packet()

static uint32_t samples_per_packet ( const AVCodecParameters par)
static

Definition at line 56 of file cafenc.c.

Referenced by bonk_decode(), caf_write_header(), and caf_write_trailer().

◆ caf_write_header()

static int caf_write_header ( AVFormatContext s)
static

Definition at line 111 of file cafenc.c.

◆ caf_write_packet()

static int caf_write_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 213 of file cafenc.c.

◆ caf_write_trailer()

static int caf_write_trailer ( AVFormatContext s)
static

< mNumberPackets

< mNumberValidFrames

< mPrimingFrames

< mRemainderFrames

Definition at line 242 of file cafenc.c.

Variable Documentation

◆ ff_caf_muxer

const FFOutputFormat ff_caf_muxer
Initial value:
= {
.p.name = "caf",
.p.long_name = NULL_IF_CONFIG_SMALL("Apple CAF (Core Audio Format)"),
.p.mime_type = "audio/x-caf",
.p.extensions = "caf",
.priv_data_size = sizeof(CAFContext),
.p.audio_codec = AV_CODEC_ID_PCM_S16BE,
.p.video_codec = AV_CODEC_ID_NONE,
.p.subtitle_codec = AV_CODEC_ID_NONE,
.flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH,
.write_header = caf_write_header,
.write_packet = caf_write_packet,
.write_trailer = caf_write_trailer,
.p.codec_tag = ff_caf_codec_tags_list,
}

Definition at line 274 of file cafenc.c.

caf_write_packet
static int caf_write_packet(AVFormatContext *s, AVPacket *pkt)
Definition: cafenc.c:213
AV_CODEC_ID_PCM_S16BE
@ AV_CODEC_ID_PCM_S16BE
Definition: codec_id.h:329
caf_write_header
static int caf_write_header(AVFormatContext *s)
Definition: cafenc.c:111
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:106
AV_CODEC_ID_NONE
@ AV_CODEC_ID_NONE
Definition: codec_id.h:50
FF_OFMT_FLAG_MAX_ONE_OF_EACH
#define FF_OFMT_FLAG_MAX_ONE_OF_EACH
If this flag is set, it indicates that for each codec type whose corresponding default codec (i....
Definition: mux.h:50
caf_write_trailer
static int caf_write_trailer(AVFormatContext *s)
Definition: cafenc.c:242
ff_caf_codec_tags_list
const AVCodecTag *const ff_caf_codec_tags_list[]
Definition: caf.c:82
CAFContext
Definition: cafenc.c:32