Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
e9493d32
Commit
e9493d32
authored
Feb 24, 2005
by
Steve Lhomme
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fill more data in the chapter classes
parent
9abc1276
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
4 deletions
+20
-4
modules/demux/mkv.cpp
modules/demux/mkv.cpp
+20
-4
No files found.
modules/demux/mkv.cpp
View file @
e9493d32
...
...
@@ -332,6 +332,7 @@ public:
std
::
vector
<
chapter_item_t
>
sub_chapters
;
int
i_current_sub_chapter
;
int
i_seekpoint_num
;
int64_t
i_uid
;
};
class
chapter_edition_t
...
...
@@ -343,6 +344,7 @@ public:
{}
void
RefreshChapters
();
double
Duration
()
const
;
std
::
vector
<
chapter_item_t
>
chapters
;
int64_t
i_uid
;
...
...
@@ -2735,9 +2737,8 @@ static void ParseChapterAtom( demux_t *p_demux, int i_level, EbmlMaster *ca, cha
if
(
MKV_IS_ID
(
l
,
KaxChapterUID
)
)
{
KaxChapterUID
&
uid
=
*
(
KaxChapterUID
*
)
l
;
uint32_t
i_uid
=
uint32
(
uid
);
msg_Dbg
(
p_demux
,
"| | | | + ChapterUID: 0x%x"
,
i_uid
);
chapters
.
i_uid
=
uint64_t
(
*
(
KaxChapterUID
*
)
l
);
msg_Dbg
(
p_demux
,
"| | | | + ChapterUID: %lld"
,
chapters
.
i_uid
);
}
else
if
(
MKV_IS_ID
(
l
,
KaxChapterFlagHidden
)
)
{
...
...
@@ -2810,7 +2811,7 @@ static void ParseChapterAtom( demux_t *p_demux, int i_level, EbmlMaster *ca, cha
if
(
b_display_seekpoint
)
{
// A start time of '0' is ok. A missing ChapterTime element is ok, too, because '0' is its default value.
p_sys
->
title
->
i_seekpoint
++
;
chapters
.
i_seekpoint_num
=
p_sys
->
title
->
i_seekpoint
++
;
p_sys
->
title
->
seekpoint
=
(
seekpoint_t
**
)
realloc
(
p_sys
->
title
->
seekpoint
,
p_sys
->
title
->
i_seekpoint
*
sizeof
(
seekpoint_t
*
)
);
p_sys
->
title
->
seekpoint
[
p_sys
->
title
->
i_seekpoint
-
1
]
=
sk
;
}
...
...
@@ -2893,6 +2894,7 @@ static void ParseChapters( demux_t *p_demux, EbmlElement *chapters )
if
(
p_sys
->
editions
[
i_default_edition
].
b_ordered
)
{
/* update the duration of the segment according to the sum of all sub chapters */
p_sys
->
f_duration
=
p_sys
->
editions
[
i_default_edition
].
Duration
();
}
}
...
...
@@ -3066,3 +3068,17 @@ int64_t chapter_item_t::RefreshChapters( bool b_ordered, int64_t i_prev_user_tim
return
i_user_end_time
;
}
double
chapter_edition_t
::
Duration
()
const
{
double
f_result
=
0.0
;
if
(
chapters
.
size
()
)
{
std
::
vector
<
chapter_item_t
>::
const_iterator
index
=
chapters
.
end
();
index
--
;
f_result
=
(
*
index
).
i_user_end_time
;
}
return
f_result
;
}
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