FFmpeg
Data Structures | Macros | Functions | Variables
aiffenc.c File Reference
#include <stdint.h>
#include "libavutil/intfloat.h"
#include "libavutil/opt.h"
#include "avformat.h"
#include "internal.h"
#include "aiff.h"
#include "avio_internal.h"
#include "isom.h"
#include "id3v2.h"

Go to the source code of this file.

Data Structures

struct  AIFFOutputContext
 

Macros

#define OFFSET(x)   offsetof(AIFFOutputContext, x)
 
#define ENC   AV_OPT_FLAG_ENCODING_PARAM
 

Functions

static int put_id3v2_tags (AVFormatContext *s, AIFFOutputContext *aiff)
 
static void put_meta (AVFormatContext *s, const char *key, uint32_t id)
 
static int aiff_write_header (AVFormatContext *s)
 
static int aiff_write_packet (AVFormatContext *s, AVPacket *pkt)
 
static int aiff_write_trailer (AVFormatContext *s)
 

Variables

static const AVOption options []
 
static const AVClass aiff_muxer_class
 
AVOutputFormat ff_aiff_muxer
 

Macro Definition Documentation

◆ OFFSET

#define OFFSET (   x)    offsetof(AIFFOutputContext, x)

Definition at line 306 of file aiffenc.c.

◆ ENC

#define ENC   AV_OPT_FLAG_ENCODING_PARAM

Definition at line 307 of file aiffenc.c.

Function Documentation

◆ put_id3v2_tags()

static int put_id3v2_tags ( AVFormatContext s,
AIFFOutputContext aiff 
)
static

Definition at line 44 of file aiffenc.c.

Referenced by aiff_write_trailer().

◆ put_meta()

static void put_meta ( AVFormatContext s,
const char *  key,
uint32_t  id 
)
static

Definition at line 85 of file aiffenc.c.

Referenced by aiff_write_header().

◆ aiff_write_header()

static int aiff_write_header ( AVFormatContext s)
static

Definition at line 101 of file aiffenc.c.

◆ aiff_write_packet()

static int aiff_write_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 211 of file aiffenc.c.

◆ aiff_write_trailer()

static int aiff_write_trailer ( AVFormatContext s)
static

Definition at line 255 of file aiffenc.c.

Variable Documentation

◆ options

const AVOption options[]
static
Initial value:
= {
{ "write_id3v2", "Enable ID3 tags writing.",
OFFSET(write_id3v2), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, ENC },
{ "id3v2_version", "Select ID3v2 version to write. Currently 3 and 4 are supported.",
OFFSET(id3v2_version), AV_OPT_TYPE_INT, {.i64 = 4}, 3, 4, ENC },
{ NULL },
}

Definition at line 308 of file aiffenc.c.

◆ aiff_muxer_class

const AVClass aiff_muxer_class
static
Initial value:
= {
.class_name = "AIFF muxer",
.item_name = av_default_item_name,
.option = options,
}

Definition at line 316 of file aiffenc.c.

◆ ff_aiff_muxer

AVOutputFormat ff_aiff_muxer
Initial value:
= {
.name = "aiff",
.long_name = NULL_IF_CONFIG_SMALL("Audio IFF"),
.mime_type = "audio/aiff",
.extensions = "aif,aiff,afc,aifc",
.priv_data_size = sizeof(AIFFOutputContext),
.audio_codec = AV_CODEC_ID_PCM_S16BE,
.video_codec = AV_CODEC_ID_PNG,
.codec_tag = (const AVCodecTag* const []){ ff_codec_aiff_tags, 0 },
.priv_class = &aiff_muxer_class,
}

Definition at line 323 of file aiffenc.c.

aiff_write_packet
static int aiff_write_packet(AVFormatContext *s, AVPacket *pkt)
Definition: aiffenc.c:211
AV_CODEC_ID_PCM_S16BE
@ AV_CODEC_ID_PCM_S16BE
Definition: avcodec.h:464
ENC
#define ENC
Definition: aiffenc.c:307
AVCodecTag
Definition: internal.h:44
options
static const AVOption options[]
Definition: aiffenc.c:308
AV_CODEC_ID_PNG
@ AV_CODEC_ID_PNG
Definition: avcodec.h:279
LIBAVUTIL_VERSION_INT
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
NULL
#define NULL
Definition: coverity.c:32
write_trailer
static int write_trailer(AVFormatContext *s1)
Definition: v4l2enc.c:94
av_default_item_name
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:191
ff_codec_aiff_tags
static const AVCodecTag ff_codec_aiff_tags[]
Definition: aiff.h:33
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:188
aiff_write_trailer
static int aiff_write_trailer(AVFormatContext *s)
Definition: aiffenc.c:255
write_packet
static void write_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost, int unqueue)
Definition: ffmpeg.c:690
OFFSET
#define OFFSET(x)
Definition: aiffenc.c:306
AIFFOutputContext
Definition: aiffenc.c:33
aiff_write_header
static int aiff_write_header(AVFormatContext *s)
Definition: aiffenc.c:101
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:223
aiff_muxer_class
static const AVClass aiff_muxer_class
Definition: aiffenc.c:316
AV_OPT_TYPE_BOOL
@ AV_OPT_TYPE_BOOL
Definition: opt.h:240
write_header
static void write_header(FFV1Context *f)
Definition: ffv1enc.c:337