Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
ae721f0a
Commit
ae721f0a
authored
Aug 26, 2013
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vdr: switch to ACCESS_GET_SEEKPOINT
parent
a025357e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
13 deletions
+17
-13
modules/access/vdr.c
modules/access/vdr.c
+17
-13
No files found.
modules/access/vdr.c
View file @
ae721f0a
...
@@ -125,6 +125,7 @@ struct access_sys_t
...
@@ -125,6 +125,7 @@ struct access_sys_t
/* cut marks */
/* cut marks */
input_title_t
*
p_marks
;
input_title_t
*
p_marks
;
unsigned
cur_seekpoint
;
float
fps
;
float
fps
;
/* file format: true=TS, false=PES */
/* file format: true=TS, false=PES */
...
@@ -192,6 +193,7 @@ static int Open( vlc_object_t *p_this )
...
@@ -192,6 +193,7 @@ static int Open( vlc_object_t *p_this )
access_sys_t
*
p_sys
;
access_sys_t
*
p_sys
;
STANDARD_READ_ACCESS_INIT
;
STANDARD_READ_ACCESS_INIT
;
p_sys
->
fd
=
-
1
;
p_sys
->
fd
=
-
1
;
p_sys
->
cur_seekpoint
=
0
;
p_sys
->
fps
=
var_InheritFloat
(
p_access
,
"vdr-fps"
);
p_sys
->
fps
=
var_InheritFloat
(
p_access
,
"vdr-fps"
);
ARRAY_INIT
(
p_sys
->
file_sizes
);
ARRAY_INIT
(
p_sys
->
file_sizes
);
...
@@ -296,13 +298,20 @@ static int Control( access_t *p_access, int i_query, va_list args )
...
@@ -296,13 +298,20 @@ static int Control( access_t *p_access, int i_query, va_list args )
**
ppp_title
=
vlc_input_title_Duplicate
(
p_sys
->
p_marks
);
**
ppp_title
=
vlc_input_title_Duplicate
(
p_sys
->
p_marks
);
break
;
break
;
case
ACCESS_GET_TITLE
:
*
va_arg
(
args
,
unsigned
*
)
=
0
;
break
;
case
ACCESS_GET_SEEKPOINT
:
*
va_arg
(
args
,
unsigned
*
)
=
p_sys
->
cur_seekpoint
;
break
;
case
ACCESS_SET_TITLE
:
case
ACCESS_SET_TITLE
:
/* ignore - only one title */
/* ignore - only one title */
break
;
break
;
case
ACCESS_SET_SEEKPOINT
:
case
ACCESS_SET_SEEKPOINT
:
i
=
va_arg
(
args
,
int
);
i
=
va_arg
(
args
,
int
);
/* Seek updates p_access->info */
return
Seek
(
p_access
,
p_sys
->
p_marks
->
seekpoint
[
i
]
->
i_byte_offset
);
return
Seek
(
p_access
,
p_sys
->
p_marks
->
seekpoint
[
i
]
->
i_byte_offset
);
case
ACCESS_GET_META
:
case
ACCESS_GET_META
:
...
@@ -408,28 +417,23 @@ static void FindSeekpoint( access_t *p_access )
...
@@ -408,28 +417,23 @@ static void FindSeekpoint( access_t *p_access )
if
(
!
p_sys
->
p_marks
)
if
(
!
p_sys
->
p_marks
)
return
;
return
;
int
i_new_seekpoint
=
p_access
->
info
.
i
_seekpoint
;
int
new_seekpoint
=
p_sys
->
cur
_seekpoint
;
if
(
p_access
->
info
.
i_pos
<
(
uint64_t
)
p_sys
->
p_marks
->
if
(
p_access
->
info
.
i_pos
<
(
uint64_t
)
p_sys
->
p_marks
->
seekpoint
[
p_access
->
info
.
i_seekpoint
]
->
i_byte_offset
)
seekpoint
[
p_sys
->
cur_seekpoint
]
->
i_byte_offset
)
{
{
/* i_pos moved backwards, start fresh */
/* i_pos moved backwards, start fresh */
i_
new_seekpoint
=
0
;
new_seekpoint
=
0
;
}
}
/* only need to check the following seekpoints */
/* only need to check the following seekpoints */
while
(
i_
new_seekpoint
+
1
<
p_sys
->
p_marks
->
i_seekpoint
&&
while
(
new_seekpoint
+
1
<
p_sys
->
p_marks
->
i_seekpoint
&&
p_access
->
info
.
i_pos
>=
(
uint64_t
)
p_sys
->
p_marks
->
p_access
->
info
.
i_pos
>=
(
uint64_t
)
p_sys
->
p_marks
->
seekpoint
[
i_new_seekpoint
+
1
]
->
i_byte_offset
)
seekpoint
[
new_seekpoint
+
1
]
->
i_byte_offset
)
{
{
i_
new_seekpoint
++
;
new_seekpoint
++
;
}
}
/* avoid unnecessary events */
p_sys
->
cur_seekpoint
=
new_seekpoint
;
if
(
p_access
->
info
.
i_seekpoint
!=
i_new_seekpoint
)
{
p_access
->
info
.
i_seekpoint
=
i_new_seekpoint
;
p_access
->
info
.
i_update
|=
INPUT_UPDATE_SEEKPOINT
;
}
}
}
/*****************************************************************************
/*****************************************************************************
...
...
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