1 /*****************************************************************************
2 * fragments.h : MP4 fragments
3 *****************************************************************************
4 * Copyright (C) 2001-2015 VLC authors and VideoLAN
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation; either version 2.1 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public License
17 * along with this program; if not, write to the Free Software Foundation,
18 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
19 *****************************************************************************/
20 #ifndef VLC_MP4_FRAGMENTS_H_
21 #define VLC_MP4_FRAGMENTS_H_
23 #include <vlc_common.h>
26 typedef struct mp4_fragments_index_t
29 stime_t
*p_times
; // movie scaled
31 stime_t i_last_time
; // movie scaled
33 } mp4_fragments_index_t
;
35 void MP4_Fragments_Index_Delete( mp4_fragments_index_t
*p_index
);
36 mp4_fragments_index_t
* MP4_Fragments_Index_New( unsigned i_tracks
, unsigned i_num
);
38 stime_t
MP4_Fragment_Index_GetTrackStartTime( mp4_fragments_index_t
*p_index
,
39 unsigned i_track_index
, uint64_t i_moof_pos
);
40 stime_t
MP4_Fragment_Index_GetTrackDuration( mp4_fragments_index_t
*p_index
, unsigned i_track_index
);
42 bool MP4_Fragments_Index_Lookup( mp4_fragments_index_t
*p_index
,
43 stime_t
*pi_time
, uint64_t *pi_pos
, unsigned i_track_index
);
46 void MP4_Fragments_Index_Dump( vlc_object_t
*p_obj
, const mp4_fragments_index_t
*p_index
,
47 uint32_t i_movie_timescale
);