Go to the documentation of this file.
31 #define SEEKPOINT_SIZE 18
50 int ret, metadata_last=0, metadata_type, metadata_size, found_streaminfo=0;
74 switch (metadata_type) {
101 if (found_streaminfo) {
107 found_streaminfo = 1;
118 if (samplerate > 0) {
127 int i, chapters, track, ti;
128 if (metadata_size < 431)
131 chapters = bytestream_get_byte(&
offset) - 1;
134 for (
i = 0;
i < chapters;
i++) {
137 start = bytestream_get_be64(&
offset);
138 track = bytestream_get_byte(&
offset);
142 ti = bytestream_get_byte(&
offset);
160 for(
i=0;
i<seek_point_count;
i++) {
161 int64_t timestamp = bytestream_get_be64(&seekpoint);
162 int64_t
pos = bytestream_get_be64(&seekpoint);
164 bytestream_get_be16(&seekpoint);
173 if (!found_streaminfo) {
183 }
else if (
ret > 0) {
188 chmask =
av_dict_get(
s->metadata,
"WAVEFORMATEXTENSIBLE_CHANNEL_MASK",
NULL, 0);
193 "Invalid value of WAVEFORMATEXTENSIBLE_CHANNEL_MASK\n");
218 if ((p->
buf[2] & 0xF0) == 0)
220 if ((p->
buf[2] & 0x0F) == 0x0F)
225 if ((p->
buf[3] & 0x06) == 0x06)
227 if ((p->
buf[3] & 0x01) == 0x01)
245 if (memcmp(p->
buf,
"fLaC", 4))
249 min_block_size >= 16 &&
250 max_block_size >= min_block_size &&
260 int64_t *ppos, int64_t pos_limit)
322 if(index<0 || index >=
s->streams[0]->nb_index_entries)
325 e =
s->streams[0]->index_entries[
index];
343 .extensions =
"flac",
346 .priv_class = &flac_demuxer_class,
AVIndexEntry * index_entries
Only used if the format does not support seeking natively.
void av_packet_unref(AVPacket *pkt)
Wipe the packet.
#define AV_LOG_WARNING
Something somehow does not look correct.
uint8_t * extradata
Extra binary data needed for initializing the decoder, codec-dependent.
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
Add a new stream to a media file.
enum AVMediaType codec_type
General type of the encoded data.
AVCodecContext * avctx
The codec context used by avformat_find_stream_info, the parser, etc.
int ff_replaygain_export(AVStream *st, AVDictionary *metadata)
Parse replaygain tags and export them as per-stream side data.
#define MKTAG(a, b, c, d)
AVStreamInternal * internal
An opaque field for libavformat internal usage.
FFmpeg Automated Testing Environment ************************************Introduction Using FATE from your FFmpeg source directory Submitting the results to the FFmpeg result aggregation server Uploading new samples to the fate suite FATE makefile targets and variables Makefile targets Makefile variables Examples Introduction **************FATE is an extended regression suite on the client side and a means for results aggregation and presentation on the server side The first part of this document explains how you can use FATE from your FFmpeg source directory to test your ffmpeg binary The second part describes how you can run FATE to submit the results to FFmpeg’s FATE server In any way you can have a look at the publicly viewable FATE results by visiting this as it can be seen if some test on some platform broke with their recent contribution This usually happens on the platforms the developers could not test on The second part of this document describes how you can run FATE to submit your results to FFmpeg’s FATE server If you want to submit your results be sure to check that your combination of OS and compiler is not already listed on the above mentioned website In the third part you can find a comprehensive listing of FATE makefile targets and variables Using FATE from your FFmpeg source directory **********************************************If you want to run FATE on your machine you need to have the samples in place You can get the samples via the build target fate rsync Use this command from the top level source this will cause FATE to fail NOTE To use a custom wrapper to run the pass ‘ target exec’ to ‘configure’ or set the TARGET_EXEC Make variable Submitting the results to the FFmpeg result aggregation server ****************************************************************To submit your results to the server you should run fate through the shell script ‘tests fate sh’ from the FFmpeg sources This script needs to be invoked with a configuration file as its first argument tests fate sh path to fate_config A configuration file template with comments describing the individual configuration variables can be found at ‘doc fate_config sh template’ Create a configuration that suits your based on the configuration template The ‘slot’ configuration variable can be any string that is not yet but it is suggested that you name it adhering to the following pattern ‘ARCH OS COMPILER COMPILER VERSION’ The configuration file itself will be sourced in a shell therefore all shell features may be used This enables you to setup the environment as you need it for your build For your first test runs the ‘fate_recv’ variable should be empty or commented out This will run everything as normal except that it will omit the submission of the results to the server The following files should be present in $workdir as specified in the configuration it may help to try out the ‘ssh’ command with one or more ‘ v’ options You should get detailed output concerning your SSH configuration and the authentication process The only thing left is to automate the execution of the fate sh script and the synchronisation of the samples directory Uploading new samples to the fate suite *****************************************If you need a sample uploaded send a mail to samples request This is for developers who have an account on the fate suite server If you upload new samples
int buf_size
Size of buf except extra allocated bytes.
@ FLAC_METADATA_TYPE_STREAMINFO
int av_add_index_entry(AVStream *st, int64_t pos, int64_t timestamp, int size, int distance, int flags)
Add an index entry into a sorted list.
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf type
AVCodecParserContext * av_parser_init(int codec_id)
int64_t duration
Decoding: duration of the stream, in stream time base.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static const uint16_t mask[17]
AVDictionaryEntry * av_dict_get(const AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags)
Get a dictionary entry with matching key.
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
enum AVStreamParseType need_parsing
void * av_mallocz(size_t size)
Allocate a memory block with alignment suitable for all memory accesses (including vectors if availab...
AVCodecParameters * codecpar
Codec parameters associated with this stream.
Describe the class of an AVClass context structure.
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented.
static av_always_inline void flac_parse_block_header(const uint8_t *block_header, int *last, int *type, int *size)
Parse the metadata block parameters from the header.
This structure contains the data a format has to probe a file.
#define FLAC_STREAMINFO_SIZE
@ FLAC_METADATA_TYPE_PICTURE
int extradata_size
Size of the extradata content in bytes.
unsigned int avio_rl32(AVIOContext *s)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
int64_t next_frame_offset
#define AV_NOPTS_VALUE
Undefined timestamp value.
static const uint8_t header[24]
int64_t dts
Decompression timestamp in AVStream->time_base units; the time at which the packet is decompressed.
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf offset
@ FLAC_METADATA_TYPE_CUESHEET
#define RETURN_ERROR(code)
@ FLAC_METADATA_TYPE_SEEKTABLE
#define i(width, name, range_min, range_max)
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...
#define av_assert1(cond)
assert() equivalent, that does not lie in speed critical code.
static av_always_inline unsigned int bytestream_get_buffer(const uint8_t **b, uint8_t *dst, unsigned int size)
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
#define AV_INPUT_BUFFER_PADDING_SIZE
#define FLAC_MAX_CHANNELS
the frame and frame reference mechanism is intended to as much as expensive copies of that data while still allowing the filters to produce correct results The data is stored in buffers represented by AVFrame structures Several references can point to the same frame buffer
int avio_read(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
#define PARSER_FLAG_USE_CODEC_TS
int64_t avio_skip(AVIOContext *s, int64_t offset)
Skip given number of bytes forward.
int ff_flac_parse_picture(AVFormatContext *s, uint8_t *buf, int buf_size, int truncate_workaround)
int av_parser_parse2(AVCodecParserContext *s, AVCodecContext *avctx, uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size, int64_t pts, int64_t dts, int64_t pos)
Parse a packet.
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
This structure stores compressed data.
int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags)
Set the given entry in *pm, overwriting an existing entry.
uint64_t channel_layout
Audio only.
#define flags(name, subs,...)
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
int ff_vorbis_comment(AVFormatContext *ms, AVDictionary **m, const uint8_t *buf, int size, int parse_picture)
@ FLAC_METADATA_TYPE_VORBIS_COMMENT
void av_parser_close(AVCodecParserContext *s)
void av_init_packet(AVPacket *pkt)
Initialize optional fields of a packet with default values.
int av_index_search_timestamp(AVStream *st, int64_t timestamp, int flags)
Get the index for a specific timestamp.
int avio_feof(AVIOContext *s)
Similar to feof() but also returns nonzero on read errors.
#define FF_RAW_DEMUXER_CLASS(name)