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 "version.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 53 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 62 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 81 of file flacenc.c.

Referenced by flac_finish_header().

◆ flac_finish_header()

static int flac_finish_header ( struct AVFormatContext s)
static

Definition at line 167 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 202 of file flacenc.c.

◆ flac_write_header()

static int flac_write_header ( struct AVFormatContext s)
static

Definition at line 261 of file flacenc.c.

◆ flac_write_audio_packet()

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

Definition at line 281 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 300 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 319 of file flacenc.c.

◆ flac_deinit()

static void flac_deinit ( struct AVFormatContext s)
static

Definition at line 347 of file flacenc.c.

◆ flac_write_packet()

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

Definition at line 356 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 404 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 409 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 416 of file flacenc.c.

flac_init
static int flac_init(struct AVFormatContext *s)
Definition: flacenc.c:202
AVFMT_NOTIMESTAMPS
#define AVFMT_NOTIMESTAMPS
Format does not need / have any timestamps.
Definition: avformat.h:481
deinit
static void deinit(AVFormatContext *s)
Definition: chromaprint.c:49
flac_write_header
static int flac_write_header(struct AVFormatContext *s)
Definition: flacenc.c:261
AV_CODEC_ID_FLAC
@ AV_CODEC_ID_FLAC
Definition: codec_id.h:439
init
static int init
Definition: av_tx.c:47
flac_deinit
static void flac_deinit(struct AVFormatContext *s)
Definition: flacenc.c:347
flac_muxer_class
static const AVClass flac_muxer_class
Definition: flacenc.c:409
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:281
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:356
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:100
av_default_item_name
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:237
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
flacenc_options
static const AVOption flacenc_options[]
Definition: flacenc.c:404
FlacMuxerContext
Definition: flacenc.c:37
flac_write_trailer
static int flac_write_trailer(struct AVFormatContext *s)
Definition: flacenc.c:319
AV_OPT_TYPE_BOOL
@ AV_OPT_TYPE_BOOL
Definition: opt.h:244
flags
#define flags(name, subs,...)
Definition: cbs_av1.c:561
write_packet
static int write_packet(AVFormatContext *s1, AVPacket *pkt)
Definition: v4l2enc.c:92
write_header
static void write_header(FFV1Context *f)
Definition: ffv1enc.c:346