Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
bfb66860
Commit
bfb66860
authored
Mar 07, 2005
by
Steve Lhomme
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make the previous-chapter "intelligent" seek more general, remove DEMUX_GET_SEEKPOINT_TIME
parent
c258eaba
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
25 deletions
+13
-25
include/vlc_demux.h
include/vlc_demux.h
+0
-1
include/vlc_input.h
include/vlc_input.h
+1
-1
modules/demux/mkv.cpp
modules/demux/mkv.cpp
+0
-10
src/input/control.c
src/input/control.c
+2
-2
src/input/input.c
src/input/input.c
+10
-11
No files found.
include/vlc_demux.h
View file @
bfb66860
...
...
@@ -82,7 +82,6 @@ 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)
...
...
include/vlc_input.h
View file @
bfb66860
...
...
@@ -176,7 +176,7 @@ static inline seekpoint_t *vlc_seekpoint_New( void )
{
seekpoint_t
*
point
=
(
seekpoint_t
*
)
malloc
(
sizeof
(
seekpoint_t
)
);
point
->
i_byte_offset
=
point
->
i_time_offset
=
0
;
point
->
i_time_offset
=
-
1
;
point
->
i_level
=
0
;
point
->
psz_name
=
NULL
;
return
point
;
...
...
modules/demux/mkv.cpp
View file @
bfb66860
...
...
@@ -1197,16 +1197,6 @@ 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
:
default:
...
...
src/input/control.c
View file @
bfb66860
...
...
@@ -384,12 +384,12 @@ int input_vaControl( input_thread_t *p_input, int i_query, va_list args )
vlc_value_t
pos
;
int
i_ret
;
if
(
p_input
->
bookmark
[
i_bkmk
]
->
i_time_offset
)
if
(
p_input
->
bookmark
[
i_bkmk
]
->
i_time_offset
!=
-
1
)
{
pos
.
i_time
=
p_input
->
bookmark
[
i_bkmk
]
->
i_time_offset
;
i_ret
=
var_Set
(
p_input
,
"time"
,
pos
);
}
else
if
(
p_input
->
bookmark
[
i_bkmk
]
->
i_byte_offset
)
else
if
(
p_input
->
bookmark
[
i_bkmk
]
->
i_byte_offset
!=
-
1
)
{
// don't crash on bookmarks in live streams
if
(
stream_Size
(
p_input
->
input
.
p_stream
)
==
0
)
...
...
src/input/input.c
View file @
bfb66860
...
...
@@ -183,7 +183,7 @@ input_thread_t *__input_CreateThread( vlc_object_t *p_parent,
psz_parser
=
val
.
psz_string
;
while
(
(
psz_start
=
strchr
(
psz_parser
,
'{'
)
)
)
{
seekpoint_t
seekpoint
;
seekpoint_t
*
p_seekpoint
=
vlc_seekpoint_New
()
;
char
backup
;
psz_start
++
;
psz_end
=
strchr
(
psz_start
,
'}'
);
...
...
@@ -193,30 +193,28 @@ input_thread_t *__input_CreateThread( vlc_object_t *p_parent,
*
psz_parser
=
0
;
*
psz_end
=
','
;
seekpoint
.
psz_name
=
0
;
seekpoint
.
i_byte_offset
=
0
;
seekpoint
.
i_time_offset
=
0
;
while
(
(
psz_end
=
strchr
(
psz_start
,
','
)
)
)
{
*
psz_end
=
0
;
if
(
!
strncmp
(
psz_start
,
"name="
,
5
)
)
{
seekpoint
.
psz_name
=
psz_start
+
5
;
p_seekpoint
->
psz_name
=
psz_start
+
5
;
}
else
if
(
!
strncmp
(
psz_start
,
"bytes="
,
6
)
)
{
seekpoint
.
i_byte_offset
=
atoll
(
psz_start
+
6
);
p_seekpoint
->
i_byte_offset
=
atoll
(
psz_start
+
6
);
}
else
if
(
!
strncmp
(
psz_start
,
"time="
,
5
)
)
{
seekpoint
.
i_time_offset
=
atoll
(
psz_start
+
5
)
*
1000000
;
p_seekpoint
->
i_time_offset
=
atoll
(
psz_start
+
5
)
*
1000000
;
}
psz_start
=
psz_end
+
1
;
}
msg_Dbg
(
p_input
,
"adding bookmark: %s, bytes="
I64Fd
", time="
I64Fd
,
seekpoint
.
psz_name
,
seekpoint
.
i_byte_offset
,
seekpoint
.
i_time_offset
);
input_Control
(
p_input
,
INPUT_ADD_BOOKMARK
,
&
seekpoint
);
p_seekpoint
->
psz_name
,
p_seekpoint
->
i_byte_offset
,
p_seekpoint
->
i_time_offset
);
input_Control
(
p_input
,
INPUT_ADD_BOOKMARK
,
p_seekpoint
);
vlc_seekpoint_Delete
(
p_seekpoint
);
*
psz_parser
=
backup
;
}
free
(
val
.
psz_string
);
...
...
@@ -1499,7 +1497,8 @@ static vlc_bool_t Control( input_thread_t *p_input, int i_type,
if
(
i_type
==
INPUT_CONTROL_SET_SEEKPOINT_PREV
)
{
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
)
i_seekpoint_time
=
p_input
->
input
.
title
[
p_demux
->
info
.
i_title
]
->
seekpoint
[
i_seekpoint
]
->
i_time_offset
;
if
(
i_seekpoint_time
!=
-
1
)
{
demux2_Control
(
p_demux
,
INPUT_GET_TIME
,
&
i_input_time
);
if
(
i_input_time
<
i_seekpoint_time
+
3000000
)
...
...
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