Lines Matching refs:sample
68 * Remove the first sample from the sample queue.
81 * Empty the sample queue, releasing all memory.
95 * Add a reference to the sample data to the sample queue. The data is
100 int sample)
116 queue->samples[queue->len].sample_number = sample;
123 * Make local copies of all referenced sample data in the queue.
129 HintSample *sample = &queue->samples[i];
130 if (!sample->own_data) {
131 uint8_t *ptr = av_malloc(sample->size);
139 memcpy(ptr, sample->data, sample->size);
140 sample->data = ptr;
141 sample->own_data = 1;
201 * Look for segments in samples in the sample queue matching the data
206 * @param data data to find matches for in the sample queue
210 * @param match_sample the number of the sample that contained the match
211 * @param match_offset the offset of the matched segment within the sample
221 HintSample *sample = &queue->samples[0];
222 /* If looking for matches in a new sample, skip the first 5 bytes,
224 if (sample->offset == 0 && sample->size > 5)
225 sample->offset = 5;
227 if (match_segments(data, len, sample->data, sample->offset,
228 sample->size, pos, match_offset, match_len) == 0) {
229 *match_sample = sample->sample_number;
232 sample->offset = *match_offset + *match_len + 5;
233 if (sample->offset + 10 >= sample->size)
238 if (sample->offset < 10 && sample->size > 20) {
239 /* No match found from the start of the sample,
240 * try from the middle of the sample instead. */
241 sample->offset = sample->size/2;
243 /* No match for this sample, remove it */
272 avio_w8(out, 2); /* sample constructor */
401 int track_index, int sample,
419 sample_queue_push(&trk->sample_queue, sample_data, sample_size, sample);
421 sample_queue_push(&trk->sample_queue, pkt->data, pkt->size, sample);