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
12f88f37
Commit
12f88f37
authored
Jun 03, 2005
by
Derk-Jan Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* backport of [11267]
parent
4e1e5236
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
7 deletions
+15
-7
modules/access/dvdnav.c
modules/access/dvdnav.c
+15
-7
No files found.
modules/access/dvdnav.c
View file @
12f88f37
...
@@ -138,6 +138,9 @@ struct demux_sys_t
...
@@ -138,6 +138,9 @@ struct demux_sys_t
int
i_title
;
int
i_title
;
input_title_t
**
title
;
input_title_t
**
title
;
/* lenght of program group chain */
mtime_t
i_pgc_length
;
};
};
static
int
Control
(
demux_t
*
,
int
,
va_list
);
static
int
Control
(
demux_t
*
,
int
,
va_list
);
...
@@ -211,6 +214,7 @@ static int Open( vlc_object_t *p_this )
...
@@ -211,6 +214,7 @@ static int Open( vlc_object_t *p_this )
ps_track_init
(
p_sys
->
tk
);
ps_track_init
(
p_sys
->
tk
);
p_sys
->
i_aspect
=
-
1
;
p_sys
->
i_aspect
=
-
1
;
p_sys
->
i_mux_rate
=
0
;
p_sys
->
i_mux_rate
=
0
;
p_sys
->
i_pgc_length
=
0
;
if
(
1
)
if
(
1
)
{
{
...
@@ -294,7 +298,10 @@ static int Open( vlc_object_t *p_this )
...
@@ -294,7 +298,10 @@ static int Open( vlc_object_t *p_this )
if
(
dvdnav_menu_call
(
p_sys
->
dvdnav
,
DVD_MENU_Title
)
!=
if
(
dvdnav_menu_call
(
p_sys
->
dvdnav
,
DVD_MENU_Title
)
!=
DVDNAV_STATUS_OK
)
DVDNAV_STATUS_OK
)
{
{
msg_Warn
(
p_demux
,
"cannot go to dvd menu"
);
/* Try going to menu root */
if
(
dvdnav_menu_call
(
p_sys
->
dvdnav
,
DVD_MENU_Root
)
!=
DVDNAV_STATUS_OK
)
msg_Warn
(
p_demux
,
"cannot go to dvd menu"
);
}
}
}
}
...
@@ -411,20 +418,18 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
...
@@ -411,20 +418,18 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
else
if
(
i_query
==
DEMUX_GET_TIME
)
else
if
(
i_query
==
DEMUX_GET_TIME
)
{
{
pi64
=
(
int64_t
*
)
va_arg
(
args
,
int64_t
*
);
pi64
=
(
int64_t
*
)
va_arg
(
args
,
int64_t
*
);
if
(
p_sys
->
i_
mux_rate
>
0
)
if
(
p_sys
->
i_
pgc_length
>
0
)
{
{
*
pi64
=
(
int64_t
)
1000000
*
2048
*
pos
/
50
/
*
pi64
=
(
int64_t
)
(
(
double
)
p_sys
->
i_pgc_length
/
(
double
)
len
)
*
(
double
)
pos
;
p_sys
->
i_mux_rate
;
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
}
}
else
if
(
i_query
==
DEMUX_GET_LENGTH
)
else
if
(
i_query
==
DEMUX_GET_LENGTH
)
{
{
pi64
=
(
int64_t
*
)
va_arg
(
args
,
int64_t
*
);
pi64
=
(
int64_t
*
)
va_arg
(
args
,
int64_t
*
);
if
(
p_sys
->
i_
mux_rate
>
0
)
if
(
p_sys
->
i_
pgc_length
>
0
)
{
{
*
pi64
=
(
int64_t
)
1000000
*
len
*
2048
/
50
/
*
pi64
=
(
int64_t
)
p_sys
->
i_pgc_length
;
p_sys
->
i_mux_rate
;
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
}
}
...
@@ -703,6 +708,9 @@ static int Demux( demux_t *p_demux )
...
@@ -703,6 +708,9 @@ static int Demux( demux_t *p_demux )
msg_Dbg
(
p_demux
,
" - cell_start=%lld"
,
event
->
cell_start
);
msg_Dbg
(
p_demux
,
" - cell_start=%lld"
,
event
->
cell_start
);
msg_Dbg
(
p_demux
,
" - pg_start=%lld"
,
event
->
pg_start
);
msg_Dbg
(
p_demux
,
" - pg_start=%lld"
,
event
->
pg_start
);
/* Store the lenght in time of the current PGC */
p_sys
->
i_pgc_length
=
event
->
pgc_length
/
90
*
1000
;
/* FIXME is it correct or there is better way to know chapter change */
/* FIXME is it correct or there is better way to know chapter change */
if
(
dvdnav_current_title_info
(
p_sys
->
dvdnav
,
&
i_title
,
if
(
dvdnav_current_title_info
(
p_sys
->
dvdnav
,
&
i_title
,
&
i_part
)
==
DVDNAV_STATUS_OK
)
&
i_part
)
==
DVDNAV_STATUS_OK
)
...
...
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