FFmpeg
Data Structures | Functions | Variables
flacenc.c File Reference
#include "libavutil/avstring.h"
#include "libavutil/channel_layout.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "libavcodec/flac.h"
#include "libavcodec/packet_internal.h"
#include "avformat.h"
#include "avio_internal.h"
#include "flacenc.h"
#include "id3v2.h"
#include "internal.h"
#include "vorbiscomment.h"

Go to the source code of this file.

Data Structures

struct  FlacMuxerContext
 

Functions

static int flac_write_block_padding (AVIOContext *pb, unsigned int n_padding_bytes, int last_block)
 
static int flac_write_block_comment (AVIOContext *pb, AVDictionary **m, int last_block, int bitexact)
 
static int flac_write_picture (struct AVFormatContext *s, AVPacket *pkt)
 
static int flac_finish_header (struct AVFormatContext *s)
 
static int flac_init (struct AVFormatContext *s)
 
static int flac_write_header (struct AVFormatContext *s)
 
static int flac_write_audio_packet (struct AVFormatContext *s, AVPacket *pkt)
 
static int flac_queue_flush (AVFormatContext *s)
 
static int flac_write_trailer (struct AVFormatContext *s)
 
static void flac_deinit (struct AVFormatContext *s)
 
static int flac_write_packet (struct AVFormatContext *s, AVPacket *pkt)
 

Variables

static const AVOption flacenc_options []
 
static const AVClass flac_muxer_class
 
const AVOutputFormat ff_flac_muxer
 

Function Documentation

◆ flac_write_block_padding()

static int flac_write_block_padding ( AVIOContext pb,
unsigned int  n_padding_bytes,
int  last_block 
)
static

Definition at line 52 of file flacenc.c.

Referenced by flac_finish_header().

◆ flac_write_block_comment()

static int flac_write_block_comment ( AVIOContext pb,
AVDictionary **  m,
int  last_block,
int  bitexact 
)
static

Definition at line 61 of file flacenc.c.

Referenced by flac_finish_header().

◆ flac_write_picture()

static int flac_write_picture ( struct AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 80 of file flacenc.c.

Referenced by flac_finish_header().

◆ flac_finish_header()

static int flac_finish_header ( struct AVFormatContext s)
static

Definition at line 166 of file flacenc.c.

Referenced by flac_queue_flush(), and flac_write_header().

◆ flac_init()

static int flac_init ( struct AVFormatContext s)
static

Definition at line 201 of file flacenc.c.

◆ flac_write_header()

static int flac_write_header ( struct AVFormatContext s)
static

Definition at line 260 of file flacenc.c.

◆ flac_write_audio_packet()

static int flac_write_audio_packet ( struct AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 280 of file flacenc.c.

Referenced by flac_queue_flush(), and flac_write_packet().

◆ flac_queue_flush()

static int flac_queue_flush ( AVFormatContext s)
static

Definition at line 299 of file flacenc.c.

Referenced by flac_write_packet(), and flac_write_trailer().

◆ flac_write_trailer()

static int flac_write_trailer ( struct AVFormatContext s)
static

Definition at line 318 of file flacenc.c.

◆ flac_deinit()

static void flac_deinit ( struct AVFormatContext s)
static

Definition at line 346 of file flacenc.c.

◆ flac_write_packet()

static int flac_write_packet ( struct AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 355 of file flacenc.c.

Variable Documentation

◆ flacenc_options

const AVOption flacenc_options[]
static
Initial value:
= {
{ "write_header", "Write the file header", 0x42, AV_OPT_TYPE_BOOL, {.i64 = 1}, 0, 1, AV_OPT_FLAG_ENCODING_PARAM },
{ NULL },
}

Definition at line 403 of file flacenc.c.

◆ flac_muxer_class

const AVClass flac_muxer_class
static
Initial value:
= {
.class_name = "flac muxer",
.item_name = av_default_item_name,
.option = flacenc_options,
}

Definition at line 408 of file flacenc.c.

◆ ff_flac_muxer

const AVOutputFormat ff_flac_muxer
Initial value:
= {
.name = "flac",
.long_name = NULL_IF_CONFIG_SMALL("raw FLAC"),
.priv_data_size = sizeof(FlacMuxerContext),
.mime_type = "audio/x-flac",
.extensions = "flac",
.audio_codec = AV_CODEC_ID_FLAC,
.video_codec = AV_CODEC_ID_PNG,
.priv_class = &flac_muxer_class,
}

Definition at line 415 of file flacenc.c.

flac_init
static int flac_init(struct AVFormatContext *s)
Definition: flacenc.c:201
AVFMT_NOTIMESTAMPS
#define AVFMT_NOTIMESTAMPS
Format does not need / have any timestamps.
Definition: avformat.h:475
deinit
static void deinit(AVFormatContext *s)
Definition: chromaprint.c:50
flac_write_header
static int flac_write_header(struct AVFormatContext *s)
Definition: flacenc.c:260
AV_CODEC_ID_FLAC
@ AV_CODEC_ID_FLAC
Definition: codec_id.h:435
init
static int init
Definition: av_tx.c:47
flac_deinit
static void flac_deinit(struct AVFormatContext *s)
Definition: flacenc.c:346
flac_muxer_class
static const AVClass flac_muxer_class
Definition: flacenc.c:408
AV_OPT_FLAG_ENCODING_PARAM
#define AV_OPT_FLAG_ENCODING_PARAM
a generic parameter which can be set by the user for muxing or encoding
Definition: opt.h:277
AV_CODEC_ID_PNG
@ AV_CODEC_ID_PNG
Definition: codec_id.h:111
flac_write_packet
static int flac_write_packet(struct AVFormatContext *s, AVPacket *pkt)
Definition: flacenc.c:355
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:98
av_default_item_name
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:235
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:117
write_packet
static void write_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost, int unqueue)
Definition: ffmpeg.c:727
flacenc_options
static const AVOption flacenc_options[]
Definition: flacenc.c:403
FlacMuxerContext
Definition: flacenc.c:36
flac_write_trailer
static int flac_write_trailer(struct AVFormatContext *s)
Definition: flacenc.c:318
AV_OPT_TYPE_BOOL
@ AV_OPT_TYPE_BOOL
Definition: opt.h:241
flags
#define flags(name, subs,...)
Definition: cbs_av1.c:561
write_header
static void write_header(FFV1Context *f)
Definition: ffv1enc.c:347