vlc | branch: master | Jean-Baptiste Kempf <[email protected]> | Sun May 22 00:19:56 2011 +0200| [632d0f8b28ac098eed11d9ced97f59248701e093] | committer: Jean-Baptiste Kempf
MKV: privatize matroska_segment_c methods > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=632d0f8b28ac098eed11d9ced97f59248701e093 --- modules/demux/mkv/matroska_segment.cpp | 38 ++++++++++++++++- modules/demux/mkv/matroska_segment.hpp | 73 ++++++++----------------------- 2 files changed, 56 insertions(+), 55 deletions(-) diff --git a/modules/demux/mkv/matroska_segment.cpp b/modules/demux/mkv/matroska_segment.cpp index 7b24b34..fd63c8e 100644 --- a/modules/demux/mkv/matroska_segment.cpp +++ b/modules/demux/mkv/matroska_segment.cpp @@ -41,7 +41,43 @@ static vlc_fourcc_t __GetFOURCC( uint8_t *p ) return VLC_FOURCC( p[0], p[1], p[2], p[3] ); } -/* Destructor */ +matroska_segment_c::matroska_segment_c( demux_sys_t & demuxer, EbmlStream & estream ) + :segment(NULL) + ,es(estream) + ,i_timescale(MKVD_TIMECODESCALE) + ,i_duration(-1) + ,i_start_time(0) + ,i_seekhead_count(0) + ,i_seekhead_position(-1) + ,i_cues_position(-1) + ,i_tracks_position(-1) + ,i_info_position(-1) + ,i_chapters_position(-1) + ,i_tags_position(-1) + ,i_attachments_position(-1) + ,cluster(NULL) + ,i_block_pos(0) + ,i_cluster_pos(0) + ,i_start_pos(0) + ,p_segment_uid(NULL) + ,p_prev_segment_uid(NULL) + ,p_next_segment_uid(NULL) + ,b_cues(false) + ,i_index(0) + ,i_index_max(1024) + ,psz_muxing_application(NULL) + ,psz_writing_application(NULL) + ,psz_segment_filename(NULL) + ,psz_title(NULL) + ,psz_date_utc(NULL) + ,i_default_edition(0) + ,sys(demuxer) + ,ep(NULL) + ,b_preloaded(false) +{ + p_indexes = (mkv_index_t*)malloc( sizeof( mkv_index_t ) * i_index_max ); +} + matroska_segment_c::~matroska_segment_c() { for( size_t i_track = 0; i_track < tracks.size(); i_track++ ) diff --git a/modules/demux/mkv/matroska_segment.hpp b/modules/demux/mkv/matroska_segment.hpp index 944e64b..a2ed85f 100644 --- a/modules/demux/mkv/matroska_segment.hpp +++ b/modules/demux/mkv/matroska_segment.hpp @@ -37,43 +37,7 @@ class chapter_item_c; class matroska_segment_c { public: - matroska_segment_c( demux_sys_t & demuxer, EbmlStream & estream ) - :segment(NULL) - ,es(estream) - ,i_timescale(MKVD_TIMECODESCALE) - ,i_duration(-1) - ,i_start_time(0) - ,i_seekhead_count(0) - ,i_seekhead_position(-1) - ,i_cues_position(-1) - ,i_tracks_position(-1) - ,i_info_position(-1) - ,i_chapters_position(-1) - ,i_tags_position(-1) - ,i_attachments_position(-1) - ,cluster(NULL) - ,i_block_pos(0) - ,i_cluster_pos(0) - ,i_start_pos(0) - ,p_segment_uid(NULL) - ,p_prev_segment_uid(NULL) - ,p_next_segment_uid(NULL) - ,b_cues(false) - ,i_index(0) - ,i_index_max(1024) - ,psz_muxing_application(NULL) - ,psz_writing_application(NULL) - ,psz_segment_filename(NULL) - ,psz_title(NULL) - ,psz_date_utc(NULL) - ,i_default_edition(0) - ,sys(demuxer) - ,ep(NULL) - ,b_preloaded(false) - { - p_indexes = (mkv_index_t*)malloc( sizeof( mkv_index_t ) * i_index_max ); - } - + matroska_segment_c( demux_sys_t & demuxer, EbmlStream & estream ); virtual ~matroska_segment_c(); KaxSegment *segment; @@ -127,38 +91,39 @@ public: std::vector<chapter_translation_c*> translations; std::vector<KaxSegmentFamily*> families; - + demux_sys_t & sys; EbmlParser *ep; bool b_preloaded; bool Preload( ); - bool LoadSeekHeadItem( const EbmlCallbacks & ClassInfos, int64_t i_element_position ); bool PreloadFamily( const matroska_segment_c & segment ); - void ParseInfo( KaxInfo *info ); - void ParseAttachments( KaxAttachments *attachments ); - void ParseChapters( KaxChapters *chapters ); - void ParseSeekHead( KaxSeekHead *seekhead ); - void ParseTracks( KaxTracks *tracks ); - void ParseChapterAtom( int i_level, KaxChapterAtom *ca, chapter_item_c & chapters ); - void ParseTrackEntry( KaxTrackEntry *m ); - void ParseCluster( ); - void IndexAppendCluster( KaxCluster *cluster ); - void LoadCues( KaxCues *cues ); - void LoadTags( KaxTags *tags ); - void ParseSimpleTags( KaxTagSimple *tag ); - void InformationCreate( ); + void InformationCreate(); void Seek( mtime_t i_date, mtime_t i_time_offset, int64_t i_global_position ); int BlockGet( KaxBlock * &, KaxSimpleBlock * &, bool *, bool *, int64_t *); int BlockFindTrackIndex( size_t *pi_track, const KaxBlock *, const KaxSimpleBlock * ); - bool Select( mtime_t i_start_time ); - void UnSelect( ); + void UnSelect(); static bool CompareSegmentUIDs( const matroska_segment_c * item_a, const matroska_segment_c * item_b ); + +private: + void LoadCues( KaxCues *cues ); + void LoadTags( KaxTags *tags ); + bool LoadSeekHeadItem( const EbmlCallbacks & ClassInfos, int64_t i_element_position ); + void ParseInfo( KaxInfo *info ); + void ParseAttachments( KaxAttachments *attachments ); + void ParseChapters( KaxChapters *chapters ); + void ParseSeekHead( KaxSeekHead *seekhead ); + void ParseTracks( KaxTracks *tracks ); + void ParseChapterAtom( int i_level, KaxChapterAtom *ca, chapter_item_c & chapters ); + void ParseTrackEntry( KaxTrackEntry *m ); + void ParseCluster( ); + void ParseSimpleTags( KaxTagSimple *tag ); + void IndexAppendCluster( KaxCluster *cluster ); }; _______________________________________________ vlc-commits mailing list [email protected] http://mailman.videolan.org/listinfo/vlc-commits
