Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
632d0f8b
Commit
632d0f8b
authored
May 22, 2011
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MKV: privatize matroska_segment_c methods
parent
c9f85df6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
55 deletions
+56
-55
modules/demux/mkv/matroska_segment.cpp
modules/demux/mkv/matroska_segment.cpp
+37
-1
modules/demux/mkv/matroska_segment.hpp
modules/demux/mkv/matroska_segment.hpp
+19
-54
No files found.
modules/demux/mkv/matroska_segment.cpp
View file @
632d0f8b
...
@@ -41,7 +41,43 @@ static vlc_fourcc_t __GetFOURCC( uint8_t *p )
...
@@ -41,7 +41,43 @@ static vlc_fourcc_t __GetFOURCC( uint8_t *p )
return
VLC_FOURCC
(
p
[
0
],
p
[
1
],
p
[
2
],
p
[
3
]
);
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
()
matroska_segment_c
::~
matroska_segment_c
()
{
{
for
(
size_t
i_track
=
0
;
i_track
<
tracks
.
size
();
i_track
++
)
for
(
size_t
i_track
=
0
;
i_track
<
tracks
.
size
();
i_track
++
)
...
...
modules/demux/mkv/matroska_segment.hpp
View file @
632d0f8b
...
@@ -37,43 +37,7 @@ class chapter_item_c;
...
@@ -37,43 +37,7 @@ class chapter_item_c;
class
matroska_segment_c
class
matroska_segment_c
{
{
public:
public:
matroska_segment_c
(
demux_sys_t
&
demuxer
,
EbmlStream
&
estream
)
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
);
}
virtual
~
matroska_segment_c
();
virtual
~
matroska_segment_c
();
KaxSegment
*
segment
;
KaxSegment
*
segment
;
...
@@ -127,38 +91,39 @@ public:
...
@@ -127,38 +91,39 @@ public:
std
::
vector
<
chapter_translation_c
*>
translations
;
std
::
vector
<
chapter_translation_c
*>
translations
;
std
::
vector
<
KaxSegmentFamily
*>
families
;
std
::
vector
<
KaxSegmentFamily
*>
families
;
demux_sys_t
&
sys
;
demux_sys_t
&
sys
;
EbmlParser
*
ep
;
EbmlParser
*
ep
;
bool
b_preloaded
;
bool
b_preloaded
;
bool
Preload
(
);
bool
Preload
(
);
bool
LoadSeekHeadItem
(
const
EbmlCallbacks
&
ClassInfos
,
int64_t
i_element_position
);
bool
PreloadFamily
(
const
matroska_segment_c
&
segment
);
bool
PreloadFamily
(
const
matroska_segment_c
&
segment
);
void
ParseInfo
(
KaxInfo
*
info
);
void
InformationCreate
();
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
Seek
(
mtime_t
i_date
,
mtime_t
i_time_offset
,
int64_t
i_global_position
);
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
BlockGet
(
KaxBlock
*
&
,
KaxSimpleBlock
*
&
,
bool
*
,
bool
*
,
int64_t
*
);
int
BlockFindTrackIndex
(
size_t
*
pi_track
,
int
BlockFindTrackIndex
(
size_t
*
pi_track
,
const
KaxBlock
*
,
const
KaxSimpleBlock
*
);
const
KaxBlock
*
,
const
KaxSimpleBlock
*
);
bool
Select
(
mtime_t
i_start_time
);
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
);
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
);
};
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment