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
2e56d2ef
Commit
2e56d2ef
authored
May 22, 2011
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MKV: rename functions to match better the actual implementation
parent
c42f4116
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
26 deletions
+26
-26
modules/demux/mkv/demux.cpp
modules/demux/mkv/demux.cpp
+6
-6
modules/demux/mkv/mkv.cpp
modules/demux/mkv/mkv.cpp
+17
-17
modules/demux/mkv/virtual_segment.cpp
modules/demux/mkv/virtual_segment.cpp
+1
-1
modules/demux/mkv/virtual_segment.hpp
modules/demux/mkv/virtual_segment.hpp
+2
-2
No files found.
modules/demux/mkv/demux.cpp
View file @
2e56d2ef
...
...
@@ -718,20 +718,20 @@ bool demux_sys_t::PreparePlayback( virtual_segment_c *p_new_segment )
{
if
(
p_new_segment
!=
NULL
&&
p_new_segment
!=
p_current_segment
)
{
if
(
p_current_segment
!=
NULL
&&
p_current_segment
->
Segment
()
!=
NULL
)
p_current_segment
->
Segment
()
->
UnSelect
();
if
(
p_current_segment
!=
NULL
&&
p_current_segment
->
Current
Segment
()
!=
NULL
)
p_current_segment
->
Current
Segment
()
->
UnSelect
();
p_current_segment
=
p_new_segment
;
i_current_title
=
p_new_segment
->
i_sys_title
;
}
if
(
!
p_current_segment
->
Segment
()
->
b_cues
)
msg_Warn
(
&
p_current_segment
->
Segment
()
->
sys
.
demuxer
,
"no cues/empty cues found->seek won't be precise"
);
if
(
!
p_current_segment
->
Current
Segment
()
->
b_cues
)
msg_Warn
(
&
p_current_segment
->
Current
Segment
()
->
sys
.
demuxer
,
"no cues/empty cues found->seek won't be precise"
);
f_duration
=
p_current_segment
->
Duration
();
/* add information */
p_current_segment
->
Segment
()
->
InformationCreate
(
);
p_current_segment
->
Segment
()
->
Select
(
0
);
p_current_segment
->
Current
Segment
()
->
InformationCreate
(
);
p_current_segment
->
Current
Segment
()
->
Select
(
0
);
return
true
;
}
...
...
modules/demux/mkv/mkv.cpp
View file @
2e56d2ef
...
...
@@ -375,9 +375,9 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
case
DEMUX_GET_FPS
:
pf
=
(
double
*
)
va_arg
(
args
,
double
*
);
*
pf
=
0.0
;
if
(
p_sys
->
p_current_segment
&&
p_sys
->
p_current_segment
->
Segment
()
)
if
(
p_sys
->
p_current_segment
&&
p_sys
->
p_current_segment
->
Current
Segment
()
)
{
const
matroska_segment_c
*
p_segment
=
p_sys
->
p_current_segment
->
Segment
();
const
matroska_segment_c
*
p_segment
=
p_sys
->
p_current_segment
->
Current
Segment
();
for
(
size_t
i
=
0
;
i
<
p_segment
->
tracks
.
size
();
i
++
)
{
mkv_track_t
*
tk
=
p_segment
->
tracks
[
i
];
...
...
@@ -401,7 +401,7 @@ static void Seek( demux_t *p_demux, mtime_t i_date, double f_percent, chapter_it
{
demux_sys_t
*
p_sys
=
p_demux
->
p_sys
;
virtual_segment_c
*
p_vsegment
=
p_sys
->
p_current_segment
;
matroska_segment_c
*
p_segment
=
p_vsegment
->
Segment
();
matroska_segment_c
*
p_segment
=
p_vsegment
->
Current
Segment
();
mtime_t
i_time_offset
=
0
;
int64_t
i_global_position
=
-
1
;
...
...
@@ -471,7 +471,7 @@ void BlockDecode( demux_t *p_demux, KaxBlock *block, KaxSimpleBlock *simpleblock
mtime_t
i_pts
,
mtime_t
i_duration
,
bool
f_mandatory
)
{
demux_sys_t
*
p_sys
=
p_demux
->
p_sys
;
matroska_segment_c
*
p_segment
=
p_sys
->
p_current_segment
->
Segment
();
matroska_segment_c
*
p_segment
=
p_sys
->
p_current_segment
->
Current
Segment
();
if
(
!
p_segment
)
return
;
...
...
@@ -630,7 +630,7 @@ static int Demux( demux_t *p_demux)
vlc_mutex_lock
(
&
p_sys
->
lock_demuxer
);
virtual_segment_c
*
p_vsegment
=
p_sys
->
p_current_segment
;
matroska_segment_c
*
p_segment
=
p_vsegment
->
Segment
();
matroska_segment_c
*
p_segment
=
p_vsegment
->
Current
Segment
();
if
(
p_segment
==
NULL
)
return
0
;
int
i_block_count
=
0
;
int
i_return
=
0
;
...
...
@@ -647,7 +647,7 @@ static int Demux( demux_t *p_demux)
break
;
}
if
(
p_vsegment
->
Edition
()
&&
p_vsegment
->
Edition
()
->
b_ordered
&&
p_vsegment
->
CurrentChapter
()
==
NULL
)
if
(
p_vsegment
->
CurrentEdition
()
&&
p_vsegment
->
Current
Edition
()
->
b_ordered
&&
p_vsegment
->
CurrentChapter
()
==
NULL
)
{
/* nothing left to read in this ordered edition */
if
(
!
p_vsegment
->
SelectNext
()
)
...
...
@@ -657,7 +657,7 @@ static int Demux( demux_t *p_demux)
es_out_Control
(
p_demux
->
out
,
ES_OUT_RESET_PCR
);
/* switch to the next segment */
p_segment
=
p_vsegment
->
Segment
();
p_segment
=
p_vsegment
->
Current
Segment
();
if
(
!
p_segment
->
Select
(
0
)
)
{
msg_Err
(
p_demux
,
"Failed to select new segment"
);
...
...
@@ -673,7 +673,7 @@ static int Demux( demux_t *p_demux)
bool
b_discardable_picture
;
if
(
p_segment
->
BlockGet
(
block
,
simpleblock
,
&
b_key_picture
,
&
b_discardable_picture
,
&
i_block_duration
)
)
{
if
(
p_vsegment
->
Edition
()
&&
p_vsegment
->
Edition
()
->
b_ordered
)
if
(
p_vsegment
->
CurrentEdition
()
&&
p_vsegment
->
Current
Edition
()
->
b_ordered
)
{
const
chapter_item_c
*
p_chap
=
p_vsegment
->
CurrentChapter
();
// check if there are more chapters to read
...
...
@@ -702,7 +702,7 @@ static int Demux( demux_t *p_demux)
if
(
!
p_vsegment
->
SelectNext
()
)
// no more segments in this stream
break
;
p_segment
=
p_vsegment
->
Segment
();
p_segment
=
p_vsegment
->
Current
Segment
();
if
(
!
p_segment
->
Select
(
0
)
)
{
msg_Err
(
p_demux
,
"Failed to select new segment"
);
...
...
@@ -731,7 +731,7 @@ static int Demux( demux_t *p_demux)
}
}
if
(
p_vsegment
->
Edition
()
&&
p_vsegment
->
Edition
()
->
b_ordered
&&
p_vsegment
->
CurrentChapter
()
==
NULL
)
if
(
p_vsegment
->
CurrentEdition
()
&&
p_vsegment
->
Current
Edition
()
->
b_ordered
&&
p_vsegment
->
CurrentChapter
()
==
NULL
)
{
/* nothing left to read in this ordered edition */
if
(
!
p_vsegment
->
SelectNext
()
)
...
...
@@ -744,7 +744,7 @@ static int Demux( demux_t *p_demux)
es_out_Control
(
p_demux
->
out
,
ES_OUT_RESET_PCR
);
/* switch to the next segment */
p_segment
=
p_vsegment
->
Segment
();
p_segment
=
p_vsegment
->
Current
Segment
();
if
(
!
p_segment
->
Select
(
0
)
)
{
msg_Err
(
p_demux
,
"Failed to select new segment"
);
...
...
modules/demux/mkv/virtual_segment.cpp
View file @
2e56d2ef
...
...
@@ -211,7 +211,7 @@ void virtual_segment_c::Seek( demux_t & demuxer, mtime_t i_date, mtime_t i_time_
// find the actual time for an ordered edition
if
(
psz_chapter
==
NULL
)
{
if
(
Edition
()
&&
Edition
()
->
b_ordered
)
if
(
CurrentEdition
()
&&
Current
Edition
()
->
b_ordered
)
{
/* 1st, we need to know in which chapter we are */
psz_chapter
=
(
*
p_editions
)[
i_current_edition
]
->
FindTimecode
(
i_date
,
p_current_chapter
);
...
...
modules/demux/mkv/virtual_segment.hpp
View file @
2e56d2ef
...
...
@@ -55,7 +55,7 @@ public:
mtime_t
Duration
()
const
;
inline
chapter_edition_c
*
Edition
()
inline
chapter_edition_c
*
Current
Edition
()
{
if
(
i_current_edition
>=
0
&&
size_t
(
i_current_edition
)
<
p_editions
->
size
()
)
return
(
*
p_editions
)[
i_current_edition
];
...
...
@@ -63,7 +63,7 @@ public:
}
std
::
vector
<
chapter_edition_c
*>*
Editions
()
const
{
return
p_editions
;
};
matroska_segment_c
*
Segment
()
const
matroska_segment_c
*
Current
Segment
()
const
{
if
(
linked_segments
.
size
()
==
0
||
i_current_segment
>=
linked_segments
.
size
()
)
return
NULL
;
...
...
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