Go to the documentation of this file.
60 "Unable to initialize hinting of stream %d\n", src_index);
86 for (
i = 0;
i < queue->
len;
i++)
128 for (
i = 0;
i < queue->
len; ) {
164 const uint8_t *needle,
int n_pos,
int n_len,
165 int *match_h_offset_ptr,
int *match_n_offset_ptr,
169 for (h_pos = 0; h_pos < h_len; h_pos++) {
171 int match_h_pos, match_n_pos;
174 while (h_pos + match_len < h_len && n_pos + match_len < n_len &&
175 needle[n_pos + match_len] == haystack[h_pos + match_len])
184 while (match_n_pos > 0 && match_h_pos > 0 &&
185 needle[match_n_pos - 1] == haystack[match_h_pos - 1]) {
192 *match_h_offset_ptr = match_h_pos;
193 *match_n_offset_ptr = match_n_pos;
194 *match_len_ptr = match_len;
217 int *match_sample,
int *match_offset,
220 while (queue->
len > 0) {
228 sample->size,
pos, match_offset, match_len) == 0) {
229 *match_sample =
sample->sample_number;
232 sample->offset = *match_offset + *match_len + 5;
271 int match_offset,
int match_len,
int *entries)
289 int match_sample, match_offset, match_len,
pos;
291 &match_offset, &match_len) < 0)
319 int64_t count_pos, entries_pos;
320 int count = 0, entries;
335 if (packet_len >
size || packet_len <= 12)
403 uint8_t *sample_data,
int sample_size)
447 hint_pkt.
pts = hint_pkt.
dts;
static void sample_queue_free(HintSampleQueue *queue)
Empty the sample queue, releasing all memory.
static void sample_queue_pop(HintSampleQueue *queue)
Remove the first sample from the sample queue.
#define AV_LOG_WARNING
Something somehow does not look correct.
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
enum AVMediaType codec_type
General type of the encoded data.
static int track_index(VividasDemuxContext *viv, AVFormatContext *s, uint8_t *buf, unsigned size)
#define MKTAG(a, b, c, d)
void ff_mov_close_hinting(MOVTrack *track)
AVStream ** streams
A list of all streams in the file.
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
uint32_t codec_tag
Additional information about the codec (corresponds to the AVI FOURCC).
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
static void describe_payload(const uint8_t *data, int size, AVIOContext *out, int *entries, HintSampleQueue *queue)
void avcodec_parameters_free(AVCodecParameters **par)
Free an AVCodecParameters instance and everything associated with it and write NULL to the supplied p...
int ff_mov_add_hinted_packet(AVFormatContext *s, AVPacket *pkt, int track_index, int sample, uint8_t *sample_data, int sample_size)
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
int64_t cur_rtp_ts_unwrapped
int avio_close_dyn_buf(AVIOContext *s, uint8_t **pbuffer)
Return the written size and a pointer to the buffer.
int avio_open_dyn_buf(AVIOContext **s)
Open a write only memory stream.
HintSampleQueue sample_queue
void * av_realloc_array(void *ptr, size_t nmemb, size_t size)
Allocate, reallocate, or free an array.
@ AVMEDIA_TYPE_DATA
Opaque data information usually continuous.
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented.
int src_track
the track that this hint (or tmcd) track describes
static void sample_queue_push(HintSampleQueue *queue, uint8_t *data, int size, int sample)
Add a reference to the sample data to the sample queue.
AVIOContext * pb
I/O context.
static int write_hint_packets(AVIOContext *out, const uint8_t *data, int size, MOVTrack *trk, int64_t *dts)
Write an RTP hint (that may contain one or more RTP packets) for the packets in data.
void avio_w8(AVIOContext *s, int b)
#define RTP_PT_IS_RTCP(x)
#define AV_NOPTS_VALUE
Undefined timestamp value.
int64_t dts
Decompression timestamp in AVStream->time_base units; the time at which the packet is decompressed.
void avio_write(AVIOContext *s, const unsigned char *buf, int size)
void avio_wb32(AVIOContext *s, unsigned int val)
int ffio_open_dyn_packet_buf(AVIOContext **s, int max_packet_size)
Open a write only packetized memory stream with a maximum packet size of 'max_packet_size'.
int flags
A combination of AV_PKT_FLAG values.
static void sample_queue_retain(HintSampleQueue *queue)
Make local copies of all referenced sample data in the queue.
static int match_segments(const uint8_t *haystack, int h_len, const uint8_t *needle, int n_pos, int n_len, int *match_h_offset_ptr, int *match_n_offset_ptr, int *match_len_ptr)
Find matches of needle[n_pos ->] within haystack.
int hint_track
the track that hints this track, -1 if no hint track is set
int av_write_trailer(AVFormatContext *s)
Write the stream trailer to an output media file and free the file private data.
#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...
int ff_mov_write_packet(AVFormatContext *s, AVPacket *pkt)
AVFormatContext * rtp_ctx
the format context for the hinting rtp muxer
int ff_mov_init_hinting(AVFormatContext *s, int index, int src_index)
void ffio_free_dyn_buf(AVIOContext **s)
Free a dynamic buffer.
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
AVCodecParameters * avcodec_parameters_alloc(void)
Allocate a new AVCodecParameters and set its fields to default values (unknown/invalid/0).
int ff_rtp_chain_mux_open(AVFormatContext **out, AVFormatContext *s, AVStream *st, URLContext *handle, int packet_size, int idx)
void avformat_free_context(AVFormatContext *s)
Free an AVFormatContext and all its streams.
static void output_match(AVIOContext *out, int match_sample, int match_offset, int match_len, int *entries)
static void output_immediate(const uint8_t *data, int size, AVIOContext *out, int *entries)
static int find_sample_match(const uint8_t *data, int len, HintSampleQueue *queue, int *pos, int *match_sample, int *match_offset, int *match_len)
Look for segments in samples in the sample queue matching the data in ptr.
This structure stores compressed data.
void avio_wb16(AVIOContext *s, unsigned int val)
#define RTP_MAX_PACKET_SIZE
void av_init_packet(AVPacket *pkt)
Initialize optional fields of a packet with default values.