Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
44a1c7bd
Commit
44a1c7bd
authored
Apr 03, 2005
by
Steve Lhomme
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mkv.cpp: chapter merging works + small fixes
parent
10b8c360
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
9 deletions
+21
-9
modules/demux/mkv.cpp
modules/demux/mkv.cpp
+21
-9
No files found.
modules/demux/mkv.cpp
View file @
44a1c7bd
...
...
@@ -339,6 +339,8 @@ public:
int64_t
RefreshChapters
(
bool
b_ordered
,
int64_t
i_prev_user_time
);
void
PublishChapters
(
input_title_t
&
title
,
int
i_level
);
const
chapter_item_t
*
FindTimecode
(
mtime_t
i_timecode
)
const
;
void
Append
(
const
chapter_item_t
&
edition
);
chapter_item_t
*
FindChapter
(
const
chapter_item_t
&
chapter
);
int64_t
i_start_time
,
i_end_time
;
int64_t
i_user_start_time
,
i_user_end_time
;
/* the time in the stream when an edition is ordered */
...
...
@@ -369,8 +371,6 @@ public:
void
RefreshChapters
(
);
mtime_t
Duration
()
const
;
void
PublishChapters
(
input_title_t
&
title
);
void
Append
(
const
chapter_edition_t
&
edition
);
chapter_item_t
*
FindChapter
(
const
chapter_item_t
&
chapter
)
const
;
bool
b_ordered
;
};
...
...
@@ -1604,7 +1604,6 @@ bool virtual_segment_t::Select( input_title_t & title )
// copy editions from the first segment
p_segment
=
linked_segments
[
0
];
editions
=
p_segment
->
stored_editions
;
i_current_edition
=
p_segment
->
i_default_edition
;
for
(
i
=
1
;
i
<
linked_segments
.
size
();
i
++
)
{
...
...
@@ -1641,10 +1640,10 @@ void chapter_item_t::PublishChapters( input_title_t & title, int i_level )
title
.
i_seekpoint
++
;
title
.
seekpoint
=
(
seekpoint_t
**
)
realloc
(
title
.
seekpoint
,
title
.
i_seekpoint
*
sizeof
(
seekpoint_t
*
)
);
title
.
seekpoint
[
title
.
i_seekpoint
-
1
]
=
sk
;
i_seekpoint_num
=
title
.
i_seekpoint
;
}
i_seekpoint_num
=
title
.
i_seekpoint
;
for
(
size_t
i
=
0
;
i
<
sub_chapters
.
size
()
;
i
++
)
{
sub_chapters
[
i
].
PublishChapters
(
title
,
i_level
+
1
);
...
...
@@ -1687,25 +1686,37 @@ void virtual_segment_t::UpdateCurrentToChapter( demux_t & demux )
}
}
void
chapter_
edition_t
::
Append
(
const
chapter_edition_t
&
edition
)
void
chapter_
item_t
::
Append
(
const
chapter_item_t
&
chapter
)
{
// we are appending content for the same chapter UID
size_t
i
;
chapter_item_t
*
p_chapter
;
for
(
i
=
0
;
i
<
edition
.
sub_chapters
.
size
();
i
++
)
for
(
i
=
0
;
i
<
chapter
.
sub_chapters
.
size
();
i
++
)
{
p_chapter
=
FindChapter
(
edition
.
sub_chapters
[
i
]
);
p_chapter
=
FindChapter
(
chapter
.
sub_chapters
[
i
]
);
if
(
p_chapter
!=
NULL
)
{
p_chapter
->
Append
(
chapter
.
sub_chapters
[
i
]
);
}
else
{
sub_chapters
.
push_back
(
chapter
.
sub_chapters
[
i
]
);
}
}
i_user_start_time
=
min
(
i_user_start_time
,
chapter
.
i_user_start_time
);
i_user_end_time
=
max
(
i_user_end_time
,
chapter
.
i_user_end_time
);
}
chapter_item_t
*
chapter_
edition_t
::
FindChapter
(
const
chapter_item_t
&
chapter
)
const
chapter_item_t
*
chapter_
item_t
::
FindChapter
(
const
chapter_item_t
&
chapter
)
{
size_t
i
;
for
(
i
=
0
;
i
<
sub_chapters
.
size
();
i
++
)
{
if
(
sub_chapters
[
i
].
i_uid
==
chapter
.
i_uid
)
return
&
sub_chapters
[
i
];
}
return
NULL
;
}
...
...
@@ -3587,6 +3598,7 @@ void virtual_segment_t::PreloadLinked( )
{
linked_segments
[
i
]
->
Preload
(
);
}
i_current_edition
=
linked_segments
[
0
]
->
i_default_edition
;
}
mtime_t
virtual_segment_t
::
Duration
()
const
...
...
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