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
30bea6c4
Commit
30bea6c4
authored
May 07, 2005
by
Steve Lhomme
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mkv.cpp: better handling of quitting an ordered edition, add support for the LinkCN DVD command
parent
b471bc4d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
6 deletions
+41
-6
modules/demux/mkv.cpp
modules/demux/mkv.cpp
+41
-6
No files found.
modules/demux/mkv.cpp
View file @
30bea6c4
...
...
@@ -798,6 +798,7 @@ protected:
static
bool
MatchTitleNumber
(
const
chapter_codec_cmds_c
&
data
,
const
void
*
p_cookie
,
size_t
i_cookie_size
);
static
bool
MatchPgcType
(
const
chapter_codec_cmds_c
&
data
,
const
void
*
p_cookie
,
size_t
i_cookie_size
);
static
bool
MatchPgcNumber
(
const
chapter_codec_cmds_c
&
data
,
const
void
*
p_cookie
,
size_t
i_cookie_size
);
static
bool
MatchCellNumber
(
const
chapter_codec_cmds_c
&
data
,
const
void
*
p_cookie
,
size_t
i_cookie_size
);
};
class
dvd_chapter_codec_c
:
public
chapter_codec_cmds_c
...
...
@@ -2632,6 +2633,15 @@ bool virtual_segment_c::UpdateCurrentToChapter( demux_t & demux )
return
true
;
}
else
if
(
psz_curr_chapter
==
NULL
)
{
// out of the scope of the data described by chapters, leave the edition
if
(
(
*
p_editions
)[
i_current_edition
]
->
b_ordered
&&
psz_current_chapter
!=
NULL
)
{
if
(
!
(
*
p_editions
)[
i_current_edition
]
->
EnterAndLeave
(
psz_current_chapter
)
)
psz_current_chapter
=
NULL
;
}
}
}
return
false
;
}
...
...
@@ -5410,7 +5420,7 @@ bool dvd_command_interpretor_c::Interpret( const binary * p_command, size_t i_si
uint16
i_pgcn
=
(
p_command
[
6
]
<<
8
)
+
p_command
[
7
];
msg_Dbg
(
&
sys
.
demuxer
,
"Link PGCN(%d)"
,
i_pgcn
);
p_chapter
=
sys
.
BrowseCodecPrivate
(
1
,
MatchPgcNumber
,
&
i_pgcn
,
1
,
p_segment
);
p_chapter
=
sys
.
BrowseCodecPrivate
(
1
,
MatchPgcNumber
,
&
i_pgcn
,
2
,
p_segment
);
if
(
p_chapter
!=
NULL
)
{
// if the segment is not part of the current segment, select the new one
...
...
@@ -5429,9 +5439,20 @@ bool dvd_command_interpretor_c::Interpret( const binary * p_command, size_t i_si
}
case
CMD_DVD_LINKCN
:
{
msg_Dbg
(
&
sys
.
demuxer
,
"LinkCN (cell %d)"
,
(
p_command
[
6
]
<<
8
)
+
p_command
[
7
]
);
// TODO
f_result
=
true
;
uint8
i_cn
=
p_command
[
7
];
p_chapter
=
sys
.
p_current_segment
->
CurrentChapter
();
msg_Dbg
(
&
sys
.
demuxer
,
"LinkCN (cell %d)"
,
i_cn
);
p_chapter
=
p_chapter
->
BrowseCodecPrivate
(
1
,
MatchCellNumber
,
&
i_cn
,
1
);
if
(
p_chapter
!=
NULL
)
{
p_chapter
->
Enter
(
true
);
// jump to the location in the found segment
sys
.
p_current_segment
->
Seek
(
sys
.
demuxer
,
p_chapter
->
i_user_start_time
,
-
1
,
p_chapter
);
f_result
=
true
;
}
break
;
}
case
CMD_DVD_GOTO_LINE
:
...
...
@@ -5474,7 +5495,7 @@ bool dvd_command_interpretor_c::MatchTitleNumber( const chapter_codec_cmds_c &da
bool
dvd_command_interpretor_c
::
MatchPgcType
(
const
chapter_codec_cmds_c
&
data
,
const
void
*
p_cookie
,
size_t
i_cookie_size
)
{
if
(
i_cookie_size
!=
1
||
data
.
m_private_data
.
GetSize
()
<
7
)
if
(
i_cookie_size
!=
1
||
data
.
m_private_data
.
GetSize
()
<
8
)
return
false
;
if
(
data
.
m_private_data
.
GetBuffer
()[
0
]
!=
MATROSKA_DVD_LEVEL_PGC
)
...
...
@@ -5488,7 +5509,7 @@ bool dvd_command_interpretor_c::MatchPgcType( const chapter_codec_cmds_c &data,
bool
dvd_command_interpretor_c
::
MatchPgcNumber
(
const
chapter_codec_cmds_c
&
data
,
const
void
*
p_cookie
,
size_t
i_cookie_size
)
{
if
(
i_cookie_size
!=
1
||
data
.
m_private_data
.
GetSize
()
<
7
)
if
(
i_cookie_size
!=
2
||
data
.
m_private_data
.
GetSize
()
<
8
)
return
false
;
if
(
data
.
m_private_data
.
GetBuffer
()[
0
]
!=
MATROSKA_DVD_LEVEL_PGC
)
...
...
@@ -5500,6 +5521,20 @@ bool dvd_command_interpretor_c::MatchPgcNumber( const chapter_codec_cmds_c &data
return
(
i_pgc_num
==
*
i_pgc_n
);
}
bool
dvd_command_interpretor_c
::
MatchCellNumber
(
const
chapter_codec_cmds_c
&
data
,
const
void
*
p_cookie
,
size_t
i_cookie_size
)
{
if
(
i_cookie_size
!=
1
||
data
.
m_private_data
.
GetSize
()
<
5
)
return
false
;
if
(
data
.
m_private_data
.
GetBuffer
()[
0
]
!=
MATROSKA_DVD_LEVEL_CN
)
return
false
;
uint8
*
i_cell_n
=
(
uint8
*
)
p_cookie
;
uint8
i_cell_num
=
data
.
m_private_data
.
GetBuffer
()[
3
];
return
(
i_cell_num
==
*
i_cell_n
);
}
bool
matroska_script_codec_c
::
Enter
()
{
bool
f_result
=
false
;
...
...
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