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
76ed22f1
Commit
76ed22f1
authored
Jun 14, 2005
by
Derk-Jan Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Accurate GET_TIME for dvdread
parent
f1205b99
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
8 deletions
+25
-8
modules/access/dvdread.c
modules/access/dvdread.c
+25
-8
No files found.
modules/access/dvdread.c
View file @
76ed22f1
...
...
@@ -139,11 +139,14 @@ struct demux_sys_t
int
i_title_end_block
;
int
i_title_blocks
;
int
i_title_offset
;
mtime_t
i_title_cur_time
;
int
i_title_start_cell
;
int
i_title_end_cell
;
int
i_cur_cell
;
int
i_next_cell
;
mtime_t
i_cell_cur_time
;
mtime_t
i_cell_duration
;
/* Track */
ps_track_t
tk
[
PS_TK_COUNT
];
...
...
@@ -250,6 +253,9 @@ static int Open( vlc_object_t *p_this )
ps_track_init
(
p_sys
->
tk
);
p_sys
->
i_aspect
=
-
1
;
p_sys
->
i_mux_rate
=
0
;
p_sys
->
i_title_cur_time
=
(
mtime_t
)
0
;
p_sys
->
i_cell_cur_time
=
(
mtime_t
)
0
;
p_sys
->
i_cell_duration
=
(
mtime_t
)
0
;
p_sys
->
p_dvdread
=
p_dvdread
;
p_sys
->
p_vmg_file
=
p_vmg_file
;
...
...
@@ -380,10 +386,9 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
}
case
DEMUX_GET_TIME
:
pi64
=
(
int64_t
*
)
va_arg
(
args
,
int64_t
*
);
if
(
p_sys
->
i_
mux_rat
e
>
0
)
if
(
p_sys
->
i_
title_cur_tim
e
>
0
)
{
*
pi64
=
(
int64_t
)
1000000
*
DVD_VIDEO_LB_LEN
*
p_sys
->
i_title_offset
/
50
/
p_sys
->
i_mux_rate
;
*
pi64
=
(
int64_t
)
p_sys
->
i_title_cur_time
;
return
VLC_SUCCESS
;
}
*
pi64
=
0
;
...
...
@@ -394,7 +399,6 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
if
(
p_demux
->
info
.
i_title
>=
0
&&
p_demux
->
info
.
i_title
<
p_sys
->
i_titles
)
{
*
pi64
=
dvdtime_to_time
(
&
p_sys
->
p_cur_pgc
->
playback_time
,
0
);
p_sys
->
i_mux_rate
=
p_sys
->
i_title_blocks
*
DVD_VIDEO_LB_LEN
/
(
*
pi64
/
20000
);
return
VLC_SUCCESS
;
}
*
pi64
=
0
;
...
...
@@ -1127,6 +1131,12 @@ static void DvdReadHandleDSI( demux_t *p_demux, uint8_t *p_data )
p_sys
->
i_cur_block
=
p_sys
->
dsi_pack
.
dsi_gi
.
nv_pck_lbn
;
p_sys
->
i_pack_len
=
p_sys
->
dsi_pack
.
dsi_gi
.
vobu_ea
;
/*
* Store the timecodes so we can get the current time
*/
p_sys
->
i_title_cur_time
=
(
mtime_t
)
p_sys
->
dsi_pack
.
dsi_gi
.
nv_pck_scr
/
90
*
1000
;
p_sys
->
i_cell_cur_time
=
(
mtime_t
)
dvdtime_to_time
(
&
p_sys
->
dsi_pack
.
dsi_gi
.
c_eltm
,
0
);
/*
* If we're not at the end of this cell, we can determine the next
* VOBU to display using the VOBU_SRI information section of the
...
...
@@ -1192,23 +1202,30 @@ static void DvdReadHandleDSI( demux_t *p_demux, uint8_t *p_data )
p_sys
->
i_next_vobu
=
p_sys
->
p_cur_pgc
->
cell_playback
[
p_sys
->
i_cur_cell
].
first_sector
;
p_sys
->
i_cell_duration
=
(
mtime_t
)
dvdtime_to_time
(
&
p_sys
->
p_cur_pgc
->
cell_playback
[
p_sys
->
i_cur_cell
].
playback_time
,
0
);
}
#if 0
msg_Dbg( p_demux,
12, "scr %d lbn 0x%02x vobu_ea %d vob_id %d c_id %
d",
msg_Dbg( p_demux,
"scr %d lbn 0x%02x vobu_ea %d vob_id %d c_id %d c_time %ll
d",
p_sys->dsi_pack.dsi_gi.nv_pck_scr,
p_sys->dsi_pack.dsi_gi.nv_pck_lbn,
p_sys->dsi_pack.dsi_gi.vobu_ea,
p_sys->dsi_pack.dsi_gi.vobu_vob_idn,
p_sys->dsi_pack.dsi_gi.vobu_c_idn );
p_sys->dsi_pack.dsi_gi.vobu_c_idn,
dvdtime_to_time( &p_sys->dsi_pack.dsi_gi.c_eltm, 0 ) );
msg_Dbg( p_demux, "cell duration: %lld",
(mtime_t)dvdtime_to_time( &p_sys->p_cur_pgc->cell_playback[p_sys->i_cur_cell].playback_time, 0 ) );
msg_Dbg( p_demux,
12,
"cat 0x%02x ilvu_ea %d ilvu_sa %d size %d",
msg_Dbg( p_demux, "cat 0x%02x ilvu_ea %d ilvu_sa %d size %d",
p_sys->dsi_pack.sml_pbi.category,
p_sys->dsi_pack.sml_pbi.ilvu_ea,
p_sys->dsi_pack.sml_pbi.ilvu_sa,
p_sys->dsi_pack.sml_pbi.size );
msg_Dbg( p_demux,
12,
"next_vobu %d next_ilvu1 %d next_ilvu2 %d",
msg_Dbg( p_demux, "next_vobu %d next_ilvu1 %d next_ilvu2 %d",
p_sys->dsi_pack.vobu_sri.next_vobu & 0x7fffffff,
p_sys->dsi_pack.sml_agli.data[ p_sys->i_angle - 1 ].address,
p_sys->dsi_pack.sml_agli.data[ p_sys->i_angle ].address);
...
...
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