FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Functions | Variables
flacenc.c File Reference
#include "libavutil/channel_layout.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "libavcodec/flac.h"
#include "avformat.h"
#include "avio_internal.h"
#include "flacenc.h"
#include "id3v2.h"
#include "internal.h"
#include "vorbiscomment.h"
#include "libavcodec/bytestream.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 int flac_write_packet (struct AVFormatContext *s, AVPacket *pkt)
 

Variables

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

Function Documentation

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

Definition at line 50 of file flacenc.c.

Referenced by flac_finish_header().

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

Definition at line 59 of file flacenc.c.

Referenced by flac_finish_header().

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

Definition at line 87 of file flacenc.c.

Referenced by 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().

static int flac_init ( struct AVFormatContext s)
static

Definition at line 202 of file flacenc.c.

static int flac_write_header ( struct AVFormatContext s)
static

Definition at line 261 of file flacenc.c.

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().

static int flac_queue_flush ( AVFormatContext s)
static

Definition at line 304 of file flacenc.c.

Referenced by flac_write_packet(), and flac_write_trailer().

static int flac_write_trailer ( struct AVFormatContext s)
static

Definition at line 323 of file flacenc.c.

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

Definition at line 356 of file flacenc.c.

Variable Documentation

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 },
}
#define NULL
Definition: coverity.c:32
#define AV_OPT_FLAG_ENCODING_PARAM
a generic parameter which can be set by the user for muxing or encoding
Definition: opt.h:276

Definition at line 404 of file flacenc.c.

const AVClass flac_muxer_class
static
Initial value:
= {
.class_name = "flac muxer",
.item_name = av_default_item_name,
.option = flacenc_options,
}
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:191
static const AVOption flacenc_options[]
Definition: flacenc.c:404

Definition at line 409 of file flacenc.c.

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,
}
static void write_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost, int unqueue)
Definition: ffmpeg.c:689
static int flac_init(struct AVFormatContext *s)
Definition: flacenc.c:202
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
static int flac_write_header(struct AVFormatContext *s)
Definition: flacenc.c:261
static int flac_write_trailer(struct AVFormatContext *s)
Definition: flacenc.c:323
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
static int write_trailer(AVFormatContext *s1)
Definition: v4l2enc.c:94
#define AVFMT_NOTIMESTAMPS
Format does not need / have any timestamps.
Definition: avformat.h:469
static const AVClass flac_muxer_class
Definition: flacenc.c:409
#define flags(name, subs,...)
Definition: cbs_av1.c:596
static int flac_write_packet(struct AVFormatContext *s, AVPacket *pkt)
Definition: flacenc.c:356
static void write_header(FFV1Context *f)
Definition: ffv1enc.c:337

Definition at line 416 of file flacenc.c.