FFmpeg
Loading...
Searching...
No Matches
aiffenc.c File Reference
#include <stdint.h>
#include "libavutil/intfloat.h"
#include "libavutil/opt.h"
#include "packet_internal.h"
#include "avformat.h"
#include "internal.h"
#include "aiff.h"
#include "avio_internal.h"
#include "isom.h"
#include "id3v2.h"
#include "mux.h"

Go to the source code of this file.

Data Structures

struct  AIFFOutputContext
 

Macros

#define OFFSET(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)
 
static void aiff_deinit (AVFormatContext *s)
 

Variables

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

Macro Definition Documentation

◆ OFFSET

#define OFFSET ( x)
Value:

Definition at line 275 of file aiffenc.c.

◆ ENC

#define ENC   AV_OPT_FLAG_ENCODING_PARAM

Definition at line 276 of file aiffenc.c.

Function Documentation

◆ put_id3v2_tags()

static int put_id3v2_tags ( AVFormatContext * s,
AIFFOutputContext * aiff )
static

Definition at line 46 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 84 of file aiffenc.c.

Referenced by aiff_write_header().

◆ aiff_write_header()

static int aiff_write_header ( AVFormatContext * s)
static

Definition at line 102 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 232 of file aiffenc.c.

◆ aiff_deinit()

static void aiff_deinit ( AVFormatContext * s)
static

Definition at line 268 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 },
}
#define ENC
Definition caca.c:198
#define NULL
Definition coverity.c:32
#define OFFSET(x)
@ AV_OPT_TYPE_INT
Underlying C type is int.
Definition opt.h:258
@ AV_OPT_TYPE_BOOL
Underlying C type is int.
Definition opt.h:326

Definition at line 277 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,
}
const char * av_default_item_name(void *ptr)
Return the context name.
Definition log.c:241
#define LIBAVUTIL_VERSION_INT
Definition version.h:85

Definition at line 285 of file aiffenc.c.

◆ ff_aiff_muxer

const FFOutputFormat ff_aiff_muxer
Initial value:
= {
.p.name = "aiff",
.p.long_name = NULL_IF_CONFIG_SMALL("Audio IFF"),
.p.mime_type = "audio/aiff",
.p.extensions = "aif,aiff,afc,aifc",
.priv_data_size = sizeof(AIFFOutputContext),
.p.audio_codec = AV_CODEC_ID_PCM_S16BE,
.p.video_codec = AV_CODEC_ID_PNG,
.write_header = aiff_write_header,
.write_packet = aiff_write_packet,
.write_trailer = aiff_write_trailer,
.deinit = aiff_deinit,
.p.codec_tag = ff_aiff_codec_tags_list,
.p.priv_class = &aiff_muxer_class,
}
const AVCodecTag *const ff_aiff_codec_tags_list[]
Definition aiff.c:57
static int aiff_write_header(AVFormatContext *s)
Definition aiffenc.c:102
static const AVClass aiff_muxer_class
Definition aiffenc.c:285
static int aiff_write_packet(AVFormatContext *s, AVPacket *pkt)
Definition aiffenc.c:211
static int aiff_write_trailer(AVFormatContext *s)
Definition aiffenc.c:232
static void aiff_deinit(AVFormatContext *s)
Definition aiffenc.c:268
@ AV_CODEC_ID_PNG
Definition codec_id.h:111
@ AV_CODEC_ID_PCM_S16BE
Definition codec_id.h:331
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition internal.h:88

Definition at line 292 of file aiffenc.c.