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
32d45977
Commit
32d45977
authored
Mar 05, 2005
by
Steve Lhomme
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
input.c, vlc_demux.h: allow seeking back in the same chapter
mkv.cpp: handle the new DEMUX_GET_SEEKPOINT_TIME
parent
27220f26
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
2 deletions
+25
-2
include/vlc_demux.h
include/vlc_demux.h
+1
-0
modules/demux/mkv.cpp
modules/demux/mkv.cpp
+11
-1
src/input/input.c
src/input/input.c
+13
-1
No files found.
include/vlc_demux.h
View file @
32d45977
...
...
@@ -82,6 +82,7 @@ enum demux_query_e
/* TITLE/SEEKPOINT, only when TITLE_INFO succeed */
DEMUX_SET_TITLE
,
/* arg1= int can fail */
DEMUX_SET_SEEKPOINT
,
/* arg1= int can fail */
DEMUX_GET_SEEKPOINT_TIME
,
/* arg1= int arg2 = mtime_t * res = can fail */
/* DEMUX_SET_GROUP only a hit for demuxer (mainly DVB) to allow not
* reading everything (you should not use this to call es_out_Control)
...
...
modules/demux/mkv.cpp
View file @
32d45977
...
...
@@ -1130,6 +1130,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
int64_t
*
pi64
;
double
*
pf
,
f
;
int
i_skp
;
mtime_t
*
i_sk_time
;
vlc_meta_t
**
pp_meta
;
...
...
@@ -1206,6 +1207,15 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
}
return
VLC_EGENERIC
;
case
DEMUX_GET_SEEKPOINT_TIME
:
i_skp
=
(
int
)
va_arg
(
args
,
int
);
i_sk_time
=
(
mtime_t
*
)
va_arg
(
args
,
mtime_t
*
);
if
(
p_sys
->
title
&&
i_skp
<
p_sys
->
title
->
i_seekpoint
)
{
*
i_sk_time
=
p_sys
->
title
->
seekpoint
[
i_skp
]
->
i_time_offset
;
return
VLC_SUCCESS
;
}
return
VLC_EGENERIC
;
case
DEMUX_SET_TIME
:
case
DEMUX_GET_FPS
:
...
...
src/input/input.c
View file @
32d45977
...
...
@@ -1493,9 +1493,21 @@ static vlc_bool_t Control( input_thread_t *p_input, int i_type,
{
demux_t
*
p_demux
=
p_input
->
input
.
p_demux
;
int
i_seekpoint
;
mtime_t
i_input_time
;
mtime_t
i_seekpoint_time
;
if
(
i_type
==
INPUT_CONTROL_SET_SEEKPOINT_PREV
)
i_seekpoint
=
p_demux
->
info
.
i_seekpoint
-
1
;
{
i_seekpoint
=
p_demux
->
info
.
i_seekpoint
;
if
(
demux2_Control
(
p_demux
,
DEMUX_GET_SEEKPOINT_TIME
,
p_demux
->
info
.
i_seekpoint
,
&
i_seekpoint_time
)
==
VLC_SUCCESS
)
{
demux2_Control
(
p_demux
,
INPUT_GET_TIME
,
&
i_input_time
);
if
(
i_input_time
<
i_seekpoint_time
+
3000000
)
i_seekpoint
--
;
}
else
i_seekpoint
--
;
}
else
if
(
i_type
==
INPUT_CONTROL_SET_SEEKPOINT_NEXT
)
i_seekpoint
=
p_demux
->
info
.
i_seekpoint
+
1
;
else
...
...
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