• Home
  • Raw
  • Download

Lines Matching refs:tracks

90     struct Track **tracks;  member
175 static int write_fragments(struct Tracks *tracks, int start_index, in write_fragments() argument
192 for (i = start_index; i < tracks->nb_tracks; i++) { in write_fragments()
193 struct Track *track = tracks->tracks[i]; in write_fragments()
322 static int read_tfra(struct Tracks *tracks, int start_index, AVIOContext *f) in read_tfra() argument
335 for (i = start_index; i < tracks->nb_tracks && !track; i++) in read_tfra()
336 if (tracks->tracks[i]->track_id == track_id) in read_tfra()
337 track = tracks->tracks[i]; in read_tfra()
413 static int read_mfra(struct Tracks *tracks, int start_index, in read_mfra() argument
437 while (!read_tfra(tracks, start_index, f)) { in read_mfra()
442 err = write_fragments(tracks, start_index, f, basename, split, ismf, in read_mfra()
496 static int handle_file(struct Tracks *tracks, const char *file, int split, in handle_file() argument
501 int err = 0, i, orig_tracks = tracks->nb_tracks; in handle_file()
539 temp = av_realloc_array(tracks->tracks, in handle_file()
540 tracks->nb_tracks + 1, in handle_file()
541 sizeof(*tracks->tracks)); in handle_file()
547 tracks->tracks = temp; in handle_file()
548 tracks->tracks[tracks->nb_tracks] = track; in handle_file()
565 av_freep(&tracks->tracks[tracks->nb_tracks]); in handle_file()
569 tracks->duration = FFMAX(tracks->duration, in handle_file()
574 if (tracks->audio_track < 0) in handle_file()
575 tracks->audio_track = tracks->nb_tracks; in handle_file()
576 tracks->nb_audio_tracks++; in handle_file()
591 if (tracks->video_track < 0) in handle_file()
592 tracks->video_track = tracks->nb_tracks; in handle_file()
593 tracks->nb_video_tracks++; in handle_file()
603 tracks->nb_tracks++; in handle_file()
608 err = read_mfra(tracks, orig_tracks, file, split, ismf, basename, in handle_file()
617 static void output_server_manifest(struct Tracks *tracks, const char *basename, in output_server_manifest() argument
640 for (i = 0; i < tracks->nb_tracks; i++) { in output_server_manifest()
641 struct Track *track = tracks->tracks[i]; in output_server_manifest()
655 static void print_track_chunks(FILE *out, struct Tracks *tracks, int main, in print_track_chunks() argument
660 struct Track *track = tracks->tracks[main]; in print_track_chunks()
664 for (j = main + 1; j < tracks->nb_tracks; j++) { in print_track_chunks()
665 if (tracks->tracks[j]->is_audio == track->is_audio) { in print_track_chunks()
666 if (track->offsets[i].duration != tracks->tracks[j]->offsets[i].duration) { in print_track_chunks()
668 type, i, track->name, main, tracks->tracks[j]->name, j); in print_track_chunks()
671 if (track->offsets[i].time != tracks->tracks[j]->offsets[i].time) { in print_track_chunks()
674 type, i, track->name, main, tracks->tracks[j]->name, j); in print_track_chunks()
690 static void output_client_manifest(struct Tracks *tracks, const char *basename, in output_client_manifest() argument
708 "Duration=\"%"PRId64 "\">\n", tracks->duration * 10); in output_client_manifest()
709 if (tracks->video_track >= 0) { in output_client_manifest()
710 struct Track *track = tracks->tracks[tracks->video_track]; in output_client_manifest()
717 tracks->nb_video_tracks, track->chunks); in output_client_manifest()
718 for (i = 0; i < tracks->nb_tracks; i++) { in output_client_manifest()
719 track = tracks->tracks[i]; in output_client_manifest()
735 print_track_chunks(out, tracks, tracks->video_track, "video"); in output_client_manifest()
738 if (tracks->audio_track >= 0) { in output_client_manifest()
739 struct Track *track = tracks->tracks[tracks->audio_track]; in output_client_manifest()
746 tracks->nb_audio_tracks, track->chunks); in output_client_manifest()
747 for (i = 0; i < tracks->nb_tracks; i++) { in output_client_manifest()
748 track = tracks->tracks[i]; in output_client_manifest()
766 print_track_chunks(out, tracks, tracks->audio_track, "audio"); in output_client_manifest()
773 static void clean_tracks(struct Tracks *tracks) in clean_tracks() argument
776 for (i = 0; i < tracks->nb_tracks; i++) { in clean_tracks()
777 av_freep(&tracks->tracks[i]->codec_private); in clean_tracks()
778 av_freep(&tracks->tracks[i]->offsets); in clean_tracks()
779 av_freep(&tracks->tracks[i]); in clean_tracks()
781 av_freep(&tracks->tracks); in clean_tracks()
782 tracks->nb_tracks = 0; in clean_tracks()
792 struct Tracks tracks = { 0, .video_track = -1, .audio_track = -1 }; in main() local
821 if (handle_file(&tracks, argv[i], split, ismf, in main()
826 if (!tracks.nb_tracks || (!basename && !split)) in main()
830 output_server_manifest(&tracks, basename, output_prefix, in main()
832 output_client_manifest(&tracks, basename, output_prefix, split); in main()
834 clean_tracks(&tracks); in main()