Lines Matching defs:cluster
170 if (track->entry > 0 && track->cluster[track->entry - 1].pos + track->data_offset > UINT32_MAX)
205 if (!track->cluster[i].chunkNum)
208 avio_wb64(pb, track->cluster[i].pos + track->data_offset);
210 avio_wb32(pb, track->cluster[i].pos + track->data_offset);
227 tst = track->cluster[i].size / track->cluster[i].entries;
231 entries += track->cluster[i].entries;
234 int sSize = track->entry ? track->cluster[0].size / track->cluster[0].entries : 0;
242 for (j = 0; j < track->cluster[i].entries; j++) {
243 avio_wb32(pb, track->cluster[i].size /
244 track->cluster[i].entries);
264 if (oldval != track->cluster[i].samples_in_chunk && track->cluster[i].chunkNum) {
265 avio_wb32(pb, track->cluster[i].chunkNum); // first chunk
266 avio_wb32(pb, track->cluster[i].samples_in_chunk); // samples per chunk
268 oldval = track->cluster[i].samples_in_chunk;
292 if (track->cluster[i].flags & flag) {
316 if (track->cluster[i].flags & MOV_DISPOSABLE_SAMPLE) {
319 } else if (track->cluster[i].flags & MOV_DISPOSABLE_EXT_SAMPLE) {
323 if (track->cluster[i].flags & MOV_SYNC_SAMPLE) {
677 size += track->cluster[i].size;
1147 next_dts = track->cluster[cluster_idx + 1].dts;
1149 next_dts -= track->cluster[cluster_idx].dts;
2679 ctts_entries[0].duration = track->cluster[0].cts;
2681 if (track->cluster[i].cts == ctts_entries[entries].duration) {
2685 ctts_entries[entries].duration = track->cluster[i].cts;
3607 if (start_dts != track->cluster[0].dts || start_ct != track->cluster[0].cts) {
3611 track->cluster[0].dts, track->cluster[0].cts,
3613 start_dts = track->cluster[0].dts;
3614 start_ct = track->cluster[0].cts;
3860 else if ((track->entry && track->cluster[0].dts) || track->mode == MODE_PSP || is_clcp_track(track))
4814 MOVIentry *chunk = &trk->cluster[0];
4821 if (chunk->pos + chunkSize == trk->cluster[i].pos &&
4822 chunkSize + trk->cluster[i].size < (1<<20)){
4823 chunkSize += trk->cluster[i].size;
4824 chunk->samples_in_chunk += trk->cluster[i].entries;
4826 trk->cluster[i].chunkNum = chunk->chunkNum+1;
4827 chunk=&trk->cluster[i];
5197 track->default_size = track->entry ? track->cluster[0].size : 1;
5206 track->default_sample_flags = get_sample_flags(track, &track->cluster[1]);
5229 if (track->cluster[i].size != track->default_size)
5231 if (i > first && get_sample_flags(track, &track->cluster[i]) != track->default_sample_flags)
5235 get_sample_flags(track, &track->cluster[0]) != track->default_sample_flags)
5255 track->cluster[first].pos); /* data offset */
5257 avio_wb32(pb, get_sample_flags(track, &track->cluster[first]));
5263 avio_wb32(pb, track->cluster[i].size);
5265 avio_wb32(pb, get_sample_flags(track, &track->cluster[i]));
5267 avio_wb32(pb, track->cluster[i].cts);
5287 avio_wb64(pb, track->cluster[0].dts + track->cluster[0].cts);
5289 (track->cluster[0].dts + track->cluster[0].cts));
5366 info->time = track->cluster[0].dts + track->cluster[0].cts;
5368 (track->cluster[0].dts + track->cluster[0].cts);
5404 avio_wb64(pb, track->cluster[0].dts - track->start_dts);
5421 if (track->cluster[i].pos != track->cluster[i - 1].pos + track->cluster[i - 1].size) {
5480 presentation_time = track->cluster[0].dts + track->cluster[0].cts -
5483 (track->cluster[0].dts + track->cluster[0].cts);
5484 starts_with_SAP = track->cluster[0].flags & MOV_SYNC_SAMPLE;
5587 if (first_track->cluster[0].pts == AV_NOPTS_VALUE) {
5593 if (first_track->cluster[0].prft.wallclock) {
5595 ntp_ts = ff_get_formatted_ntp_time((first_track->cluster[0].prft.wallclock / 1000) * 1000 +
5597 flags = first_track->cluster[0].prft.flags;
5601 pts_us = av_rescale_q(first_track->cluster[0].pts,
5616 avio_wb64(pb, first_track->cluster[0].pts); //media time
6020 trk->cluster[i].flags &= ~MOV_SYNC_SAMPLE;
6032 trk->cluster[0].flags |= MOV_SYNC_SAMPLE;
6044 trk->cluster[trk->entry].flags |= MOV_SYNC_SAMPLE;
6061 trk->cluster[trk->entry].flags |= MOV_SYNC_SAMPLE;
6088 track->cluster[i].pos += offset;
6295 starts_with_key = track->cluster[0].flags & MOV_SYNC_SAMPLE;
6311 av_rescale(mov->tracks[first_track].cluster[0].dts, AV_TIME_BASE, mov->tracks[first_track].timescale),
6312 (has_video ? starts_with_key : mov->tracks[first_track].cluster[0].flags & MOV_SYNC_SAMPLE) ? AVIO_DATA_MARKER_SYNC_POINT : AVIO_DATA_MARKER_BOUNDARY_POINT);
6385 ref = trk->cluster[trk->entry - 1].dts;
6621 void *cluster = av_realloc_array(trk->cluster, new_capacity, sizeof(*trk->cluster));
6622 if (!cluster) {
6626 trk->cluster = cluster;
6630 trk->cluster[trk->entry].pos = avio_tell(pb) - size;
6631 trk->cluster[trk->entry].samples_in_chunk = samples_in_chunk;
6632 trk->cluster[trk->entry].chunkNum = 0;
6633 trk->cluster[trk->entry].size = size;
6634 trk->cluster[trk->entry].entries = samples_in_chunk;
6635 trk->cluster[trk->entry].dts = pkt->dts;
6636 trk->cluster[trk->entry].pts = pkt->pts;
6644 trk->cluster[trk->entry].dts = trk->start_dts + trk->track_duration;
6653 pkt->pts = pkt->dts + trk->end_pts - trk->cluster[trk->entry].dts;
6670 trk->cluster[trk->entry].dts = trk->start_dts = 0;
6702 trk->cluster[trk->entry].cts = pkt->pts - pkt->dts;
6703 trk->cluster[trk->entry].flags = 0;
6707 trk->end_pts = trk->cluster[trk->entry].dts +
6708 trk->cluster[trk->entry].cts + pkt->duration;
6710 trk->end_pts = FFMAX(trk->end_pts, trk->cluster[trk->entry].dts +
6711 trk->cluster[trk->entry].cts +
6721 mov_parse_mpeg2_frame(pkt, &trk->cluster[trk->entry].flags);
6722 if (trk->cluster[trk->entry].flags & MOV_PARTIAL_SYNC_SAMPLE)
6725 trk->cluster[trk->entry].flags = MOV_SYNC_SAMPLE;
6727 if (trk->cluster[trk->entry].flags & MOV_SYNC_SAMPLE)
6731 trk->cluster[trk->entry].flags |= MOV_DISPOSABLE_SAMPLE;
6737 trk->cluster[trk->entry].flags |= MOV_DISPOSABLE_EXT_SAMPLE;
6744 memcpy(&trk->cluster[trk->entry].prft, prft, prft_size);
6746 memset(&trk->cluster[trk->entry].prft, 0, sizeof(AVProducerReferenceTime));
6822 frag_duration = av_rescale_q(pkt->dts - trk->cluster[0].dts,
7252 av_freep(&track->cluster);