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
4ef742f3
Commit
4ef742f3
authored
Apr 19, 2005
by
Steve Lhomme
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mkv.cpp: compilation fixes
parent
5e78beb3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
66 additions
and
62 deletions
+66
-62
modules/demux/mkv.cpp
modules/demux/mkv.cpp
+66
-62
No files found.
modules/demux/mkv.cpp
View file @
4ef742f3
...
@@ -340,8 +340,8 @@ public:
...
@@ -340,8 +340,8 @@ public:
void
AddCommand
(
const
KaxChapterProcessCommand
&
command
);
void
AddCommand
(
const
KaxChapterProcessCommand
&
command
);
virtual
bool
Enter
()
const
{
}
virtual
bool
Enter
()
{
return
true
;
}
virtual
bool
Leave
()
const
{
}
virtual
bool
Leave
()
{
return
true
;
}
protected:
protected:
KaxChapterProcessPrivate
m_private_data
;
KaxChapterProcessPrivate
m_private_data
;
...
@@ -353,6 +353,7 @@ protected:
...
@@ -353,6 +353,7 @@ protected:
class
dvd_command_interpretor_c
class
dvd_command_interpretor_c
{
{
public:
dvd_command_interpretor_c
()
dvd_command_interpretor_c
()
{
{
memset
(
p_GPRM
,
0
,
sizeof
(
p_GPRM
)
*
2
);
memset
(
p_GPRM
,
0
,
sizeof
(
p_GPRM
)
*
2
);
...
@@ -369,7 +370,7 @@ class dvd_command_interpretor_c
...
@@ -369,7 +370,7 @@ class dvd_command_interpretor_c
bool
Interpret
(
const
binary
*
p_command
,
size_t
i_size
=
8
);
bool
Interpret
(
const
binary
*
p_command
,
size_t
i_size
=
8
);
protected:
protected:
uint16
GetGPRM
(
size_t
index
)
const
uint16
GetGPRM
(
size_t
index
)
const
{
{
if
(
index
>=
0
&&
index
<
16
)
if
(
index
>=
0
&&
index
<
16
)
...
@@ -411,11 +412,12 @@ class dvd_command_interpretor_c
...
@@ -411,11 +412,12 @@ class dvd_command_interpretor_c
class
dvd_chapter_codec_c
:
public
chapter_codec_cmds_c
class
dvd_chapter_codec_c
:
public
chapter_codec_cmds_c
{
{
bool
Enter
()
const
;
public:
bool
Leave
()
const
;
bool
Enter
();
bool
Leave
();
protected:
protected:
static
dvd_command_interpretor_c
interpretor
;
dvd_command_interpretor_c
interpretor
;
};
};
class
matroska_script_codec_c
:
public
chapter_codec_cmds_c
class
matroska_script_codec_c
:
public
chapter_codec_cmds_c
...
@@ -445,7 +447,7 @@ public:
...
@@ -445,7 +447,7 @@ public:
int64_t
RefreshChapters
(
bool
b_ordered
,
int64_t
i_prev_user_time
);
int64_t
RefreshChapters
(
bool
b_ordered
,
int64_t
i_prev_user_time
);
void
PublishChapters
(
input_title_t
&
title
,
int
i_level
);
void
PublishChapters
(
input_title_t
&
title
,
int
i_level
);
c
onst
chapter_item_c
*
FindTimecode
(
mtime_t
i_timecode
)
const
;
c
hapter_item_c
*
FindTimecode
(
mtime_t
i_timecode
)
;
void
Append
(
const
chapter_item_c
&
edition
);
void
Append
(
const
chapter_item_c
&
edition
);
chapter_item_c
*
FindChapter
(
const
chapter_item_c
&
chapter
);
chapter_item_c
*
FindChapter
(
const
chapter_item_c
&
chapter
);
...
@@ -465,8 +467,8 @@ public:
...
@@ -465,8 +467,8 @@ public:
return
(
i_user_start_time
<
item
.
i_user_start_time
||
(
i_user_start_time
==
item
.
i_user_start_time
&&
i_user_end_time
<
item
.
i_user_end_time
)
);
return
(
i_user_start_time
<
item
.
i_user_start_time
||
(
i_user_start_time
==
item
.
i_user_start_time
&&
i_user_end_time
<
item
.
i_user_end_time
)
);
}
}
bool
Enter
()
const
;
bool
Enter
();
bool
Leave
()
const
;
bool
Leave
();
};
};
class
chapter_edition_c
:
public
chapter_item_c
class
chapter_edition_c
:
public
chapter_item_c
...
@@ -649,7 +651,7 @@ public:
...
@@ -649,7 +651,7 @@ public:
void
PreloadLinked
(
);
void
PreloadLinked
(
);
mtime_t
Duration
(
)
const
;
mtime_t
Duration
(
)
const
;
void
LoadCues
(
);
void
LoadCues
(
);
void
Seek
(
demux_t
&
demuxer
,
mtime_t
i_date
,
mtime_t
i_time_offset
,
c
onst
c
hapter_item_c
*
psz_chapter
);
void
Seek
(
demux_t
&
demuxer
,
mtime_t
i_date
,
mtime_t
i_time_offset
,
chapter_item_c
*
psz_chapter
);
inline
chapter_edition_c
*
Edition
()
inline
chapter_edition_c
*
Edition
()
{
{
...
@@ -695,7 +697,7 @@ protected:
...
@@ -695,7 +697,7 @@ protected:
std
::
vector
<
chapter_edition_c
>
editions
;
std
::
vector
<
chapter_edition_c
>
editions
;
int
i_current_edition
;
int
i_current_edition
;
c
onst
chapter_item_c
*
psz_current_chapter
;
c
hapter_item_c
*
psz_current_chapter
;
void
AppendUID
(
const
EbmlBinary
&
UID
);
void
AppendUID
(
const
EbmlBinary
&
UID
);
};
};
...
@@ -772,7 +774,7 @@ public:
...
@@ -772,7 +774,7 @@ public:
static
int
Demux
(
demux_t
*
);
static
int
Demux
(
demux_t
*
);
static
int
Control
(
demux_t
*
,
int
,
va_list
);
static
int
Control
(
demux_t
*
,
int
,
va_list
);
static
void
Seek
(
demux_t
*
,
mtime_t
i_date
,
double
f_percent
,
c
onst
c
hapter_item_c
*
psz_chapter
);
static
void
Seek
(
demux_t
*
,
mtime_t
i_date
,
double
f_percent
,
chapter_item_c
*
psz_chapter
);
#define MKV_IS_ID( el, C ) ( EbmlId( (*el) ) == C::ClassInfos.GlobalId )
#define MKV_IS_ID( el, C ) ( EbmlId( (*el) ) == C::ClassInfos.GlobalId )
...
@@ -1758,7 +1760,7 @@ void chapter_item_c::PublishChapters( input_title_t & title, int i_level )
...
@@ -1758,7 +1760,7 @@ void chapter_item_c::PublishChapters( input_title_t & title, int i_level )
void
virtual_segment_c
::
UpdateCurrentToChapter
(
demux_t
&
demux
)
void
virtual_segment_c
::
UpdateCurrentToChapter
(
demux_t
&
demux
)
{
{
demux_sys_t
&
sys
=
*
demux
.
p_sys
;
demux_sys_t
&
sys
=
*
demux
.
p_sys
;
c
onst
c
hapter_item_c
*
psz_curr_chapter
;
chapter_item_c
*
psz_curr_chapter
;
/* update current chapter/seekpoint */
/* update current chapter/seekpoint */
if
(
editions
.
size
()
)
if
(
editions
.
size
()
)
...
@@ -1825,7 +1827,7 @@ chapter_item_c * chapter_item_c::FindChapter( const chapter_item_c & chapter )
...
@@ -1825,7 +1827,7 @@ chapter_item_c * chapter_item_c::FindChapter( const chapter_item_c & chapter )
return
NULL
;
return
NULL
;
}
}
static
void
Seek
(
demux_t
*
p_demux
,
mtime_t
i_date
,
double
f_percent
,
c
onst
c
hapter_item_c
*
psz_chapter
)
static
void
Seek
(
demux_t
*
p_demux
,
mtime_t
i_date
,
double
f_percent
,
chapter_item_c
*
psz_chapter
)
{
{
demux_sys_t
*
p_sys
=
p_demux
->
p_sys
;
demux_sys_t
*
p_sys
=
p_demux
->
p_sys
;
virtual_segment_c
*
p_vsegment
=
p_sys
->
p_current_segment
;
virtual_segment_c
*
p_vsegment
=
p_sys
->
p_current_segment
;
...
@@ -3548,15 +3550,15 @@ mtime_t chapter_edition_c::Duration() const
...
@@ -3548,15 +3550,15 @@ mtime_t chapter_edition_c::Duration() const
return
i_result
;
return
i_result
;
}
}
c
onst
chapter_item_c
*
chapter_item_c
::
FindTimecode
(
mtime_t
i_user_timecode
)
const
c
hapter_item_c
*
chapter_item_c
::
FindTimecode
(
mtime_t
i_user_timecode
)
{
{
c
onst
c
hapter_item_c
*
psz_result
=
NULL
;
chapter_item_c
*
psz_result
=
NULL
;
if
(
i_user_timecode
>=
i_user_start_time
&&
if
(
i_user_timecode
>=
i_user_start_time
&&
(
i_user_timecode
<
i_user_end_time
||
(
i_user_timecode
<
i_user_end_time
||
(
i_user_start_time
==
i_user_end_time
&&
i_user_timecode
==
i_user_end_time
)))
(
i_user_start_time
==
i_user_end_time
&&
i_user_timecode
==
i_user_end_time
)))
{
{
std
::
vector
<
chapter_item_c
>::
const_
iterator
index
=
sub_chapters
.
begin
();
std
::
vector
<
chapter_item_c
>::
iterator
index
=
sub_chapters
.
begin
();
while
(
index
!=
sub_chapters
.
end
()
&&
psz_result
==
NULL
)
while
(
index
!=
sub_chapters
.
end
()
&&
psz_result
==
NULL
)
{
{
psz_result
=
(
*
index
).
FindTimecode
(
i_user_timecode
);
psz_result
=
(
*
index
).
FindTimecode
(
i_user_timecode
);
...
@@ -3907,7 +3909,7 @@ void matroska_segment_c::Seek( mtime_t i_date, mtime_t i_time_offset )
...
@@ -3907,7 +3909,7 @@ void matroska_segment_c::Seek( mtime_t i_date, mtime_t i_time_offset )
#undef tk
#undef tk
}
}
void
virtual_segment_c
::
Seek
(
demux_t
&
demuxer
,
mtime_t
i_date
,
mtime_t
i_time_offset
,
c
onst
c
hapter_item_c
*
psz_chapter
)
void
virtual_segment_c
::
Seek
(
demux_t
&
demuxer
,
mtime_t
i_date
,
mtime_t
i_time_offset
,
chapter_item_c
*
psz_chapter
)
{
{
demux_sys_t
*
p_sys
=
demuxer
.
p_sys
;
demux_sys_t
*
p_sys
=
demuxer
.
p_sys
;
size_t
i
;
size_t
i
;
...
@@ -3991,9 +3993,9 @@ void chapter_codec_cmds_c::AddCommand( const KaxChapterProcessCommand & command
...
@@ -3991,9 +3993,9 @@ void chapter_codec_cmds_c::AddCommand( const KaxChapterProcessCommand & command
}
}
}
}
bool
chapter_item_c
::
Enter
()
const
bool
chapter_item_c
::
Enter
()
{
{
std
::
vector
<
chapter_codec_cmds_c
>::
const_
iterator
index
=
codecs
.
begin
();
std
::
vector
<
chapter_codec_cmds_c
>::
iterator
index
=
codecs
.
begin
();
while
(
index
!=
codecs
.
end
()
)
while
(
index
!=
codecs
.
end
()
)
{
{
(
*
index
).
Enter
();
(
*
index
).
Enter
();
...
@@ -4002,9 +4004,9 @@ bool chapter_item_c::Enter() const
...
@@ -4002,9 +4004,9 @@ bool chapter_item_c::Enter() const
return
true
;
return
true
;
}
}
bool
chapter_item_c
::
Leave
()
const
bool
chapter_item_c
::
Leave
()
{
{
std
::
vector
<
chapter_codec_cmds_c
>::
const_
iterator
index
=
codecs
.
begin
();
std
::
vector
<
chapter_codec_cmds_c
>::
iterator
index
=
codecs
.
begin
();
while
(
index
!=
codecs
.
end
()
)
while
(
index
!=
codecs
.
end
()
)
{
{
(
*
index
).
Leave
();
(
*
index
).
Leave
();
...
@@ -4013,17 +4015,17 @@ bool chapter_item_c::Leave() const
...
@@ -4013,17 +4015,17 @@ bool chapter_item_c::Leave() const
return
true
;
return
true
;
}
}
bool
dvd_chapter_codec_c
::
Enter
()
const
bool
dvd_chapter_codec_c
::
Enter
()
{
{
std
::
vector
<
KaxChapterProcessData
>::
const_
iterator
index
=
enter_cmds
.
begin
();
std
::
vector
<
KaxChapterProcessData
>::
iterator
index
=
enter_cmds
.
begin
();
while
(
index
!=
enter_cmds
.
end
()
)
while
(
index
!=
enter_cmds
.
end
()
)
{
{
if
(
*
index
.
GetSize
()
)
if
(
(
*
index
)
.
GetSize
()
)
{
{
binary
*
p_data
=
*
index
.
GetBuffer
();
binary
*
p_data
=
(
*
index
)
.
GetBuffer
();
size_t
i_size
=
*
p_data
++
;
size_t
i_size
=
*
p_data
++
;
// avoid reading too much from the buffer
// avoid reading too much from the buffer
i_size
=
min
(
i_size
,
(
*
index
.
GetSize
()
-
1
)
>>
3
);
i_size
=
min
(
i_size
,
(
(
*
index
)
.
GetSize
()
-
1
)
>>
3
);
for
(
;
i_size
>
0
;
i_size
--
,
p_data
+=
8
)
for
(
;
i_size
>
0
;
i_size
--
,
p_data
+=
8
)
{
{
interpretor
.
Interpret
(
p_data
);
interpretor
.
Interpret
(
p_data
);
...
@@ -4034,17 +4036,17 @@ bool dvd_chapter_codec_c::Enter() const
...
@@ -4034,17 +4036,17 @@ bool dvd_chapter_codec_c::Enter() const
return
true
;
return
true
;
}
}
bool
dvd_chapter_codec_c
::
Leave
()
const
bool
dvd_chapter_codec_c
::
Leave
()
{
{
std
::
vector
<
KaxChapterProcessData
>::
const_
iterator
index
=
leave_cmds
.
begin
();
std
::
vector
<
KaxChapterProcessData
>::
iterator
index
=
leave_cmds
.
begin
();
while
(
index
!=
leave_cmds
.
end
()
)
while
(
index
!=
leave_cmds
.
end
()
)
{
{
if
(
*
index
.
GetSize
()
)
if
(
(
*
index
)
.
GetSize
()
)
{
{
binary
*
p_data
=
*
index
.
GetBuffer
();
binary
*
p_data
=
(
*
index
)
.
GetBuffer
();
size_t
i_size
=
*
p_data
++
;
size_t
i_size
=
*
p_data
++
;
// avoid reading too much from the buffer
// avoid reading too much from the buffer
i_size
=
min
(
i_size
,
(
*
index
.
GetSize
()
-
1
)
>>
3
);
i_size
=
min
(
i_size
,
(
(
*
index
)
.
GetSize
()
-
1
)
>>
3
);
for
(
;
i_size
>
0
;
i_size
--
,
p_data
+=
8
)
for
(
;
i_size
>
0
;
i_size
--
,
p_data
+=
8
)
{
{
interpretor
.
Interpret
(
p_data
);
interpretor
.
Interpret
(
p_data
);
...
@@ -4059,4 +4061,6 @@ bool dvd_command_interpretor_c::Interpret( const binary * p_command, size_t i_si
...
@@ -4059,4 +4061,6 @@ bool dvd_command_interpretor_c::Interpret( const binary * p_command, size_t i_si
{
{
if
(
i_size
!=
8
)
if
(
i_size
!=
8
)
return
false
;
return
false
;
return
true
;
}
}
\ No newline at end of file
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