43 avio_w8(pb, last_block ? 0x81 : 0x01);
50 int last_block,
int bitexact)
59 if (len >= ((1<<24) - 4))
66 bytestream_put_byte(&p, last_block ? 0x84 : 0x04);
67 bytestream_put_be24(&p, len);
100 padding = av_clip_uintp2(padding, 24);
116 "already present, this muxer will not overwrite it.\n");
205 .mime_type =
"audio/x-flac",
206 .extensions =
"flac",
213 .priv_class = &flac_muxer_class,
#define AV_LOG_WARNING
Something somehow does not look correct.
#define LIBAVUTIL_VERSION_INT
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
int ff_flac_is_native_layout(uint64_t channel_layout)
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
AVStream ** streams
A list of all streams in the file.
AVDictionaryEntry * av_dict_get(const AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags)
Get a dictionary entry with matching key.
int flags
Flags modifying the (de)muxer behaviour.
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
void avio_write(AVIOContext *s, const unsigned char *buf, int size)
#define AV_OPT_FLAG_ENCODING_PARAM
a generic parameter which can be set by the user for muxing or encoding
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
AVDictionary * metadata
Metadata that applies to the whole file.
FLAC (Free Lossless Audio Codec) decoder/demuxer common functions.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
uint64_t channel_layout
Audio channel layout.
AVCodecContext * codec
Codec context associated with this stream.
unsigned int nb_streams
Number of elements in AVFormatContext.streams.
int seekable
A combination of AVIO_SEEKABLE_ flags or 0 when the stream is not seekable.
int void avio_flush(AVIOContext *s)
Force flushing of buffered data.
audio channel layout utility functions
void ffio_fill(AVIOContext *s, int b, int count)
static int write_trailer(AVFormatContext *s1)
void avio_wb24(AVIOContext *s, unsigned int val)
#define FLAC_STREAMINFO_SIZE
int ff_flac_write_header(AVIOContext *pb, uint8_t *extradata, int extradata_size, int last_block)
int metadata_header_padding
Number of bytes to be written as padding in a metadata header.
AVIOContext * pb
I/O context.
void avio_w8(AVIOContext *s, int b)
main external API structure.
int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags)
Set the given entry in *pm, overwriting an existing entry.
Describe the class of an AVClass context structure.
void * priv_data
Format private data.
static void write_header(FFV1Context *f)
uint8_t * av_packet_get_side_data(AVPacket *pkt, enum AVPacketSideDataType type, int *size)
Get side information from packet.
This structure stores compressed data.
static int write_packet(AVFormatContext *s1, AVPacket *pkt)