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
6f83a853
Commit
6f83a853
authored
Aug 25, 2013
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
input/stream: factor code
parent
bf91c051
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
27 deletions
+27
-27
src/input/stream.c
src/input/stream.c
+27
-27
No files found.
src/input/stream.c
View file @
6f83a853
...
...
@@ -539,6 +539,9 @@ static void AStreamControlUpdate( stream_t *s )
}
}
#define static_control_match(foo) \
static_assert((unsigned) STREAM_##foo == ACCESS_##foo, "Mismatch")
/****************************************************************************
* AStreamControl:
****************************************************************************/
...
...
@@ -549,8 +552,31 @@ static int AStreamControl( stream_t *s, int i_query, va_list args )
uint64_t
*
pi_64
,
i_64
;
static_control_match
(
CAN_SEEK
);
static_control_match
(
CAN_FASTSEEK
);
static_control_match
(
CAN_PAUSE
);
static_control_match
(
CAN_CONTROL_PACE
);
static_control_match
(
GET_TITLE_INFO
);
static_control_match
(
GET_META
);
static_control_match
(
GET_CONTENT_TYPE
);
static_control_match
(
GET_SIGNAL
);
static_control_match
(
SET_PAUSE_STATE
);
static_control_match
(
SET_TITLE
);
static_control_match
(
SET_SEEKPOINT
);
switch
(
i_query
)
{
case
STREAM_CAN_SEEK
:
case
STREAM_CAN_FASTSEEK
:
case
STREAM_CAN_PAUSE
:
case
STREAM_CAN_CONTROL_PACE
:
case
STREAM_GET_TITLE_INFO
:
case
STREAM_GET_META
:
case
STREAM_GET_CONTENT_TYPE
:
case
STREAM_GET_SIGNAL
:
case
STREAM_SET_PAUSE_STATE
:
return
access_vaControl
(
p_access
,
i_query
,
args
);
case
STREAM_GET_SIZE
:
pi_64
=
va_arg
(
args
,
uint64_t
*
);
if
(
s
->
p_sys
->
i_list
)
...
...
@@ -564,15 +590,6 @@ static int AStreamControl( stream_t *s, int i_query, va_list args )
*
pi_64
=
access_GetSize
(
p_access
);
break
;
case
STREAM_CAN_SEEK
:
return
access_vaControl
(
p_access
,
ACCESS_CAN_SEEK
,
args
);
case
STREAM_CAN_FASTSEEK
:
return
access_vaControl
(
p_access
,
ACCESS_CAN_FASTSEEK
,
args
);
case
STREAM_CAN_PAUSE
:
return
access_vaControl
(
p_access
,
ACCESS_CAN_PAUSE
,
args
);
case
STREAM_CAN_CONTROL_PACE
:
return
access_vaControl
(
p_access
,
ACCESS_CAN_CONTROL_PACE
,
args
);
case
STREAM_GET_POSITION
:
pi_64
=
va_arg
(
args
,
uint64_t
*
);
*
pi_64
=
p_sys
->
i_pos
;
...
...
@@ -609,27 +626,10 @@ static int AStreamControl( stream_t *s, int i_query, va_list args )
AStreamControlUpdate
(
s
);
return
VLC_SUCCESS
;
case
STREAM_GET_TITLE_INFO
:
return
access_vaControl
(
p_access
,
ACCESS_GET_TITLE_INFO
,
args
);
case
STREAM_GET_META
:
return
access_vaControl
(
p_access
,
ACCESS_GET_META
,
args
);
case
STREAM_GET_CONTENT_TYPE
:
return
access_vaControl
(
p_access
,
ACCESS_GET_CONTENT_TYPE
,
args
);
case
STREAM_GET_SIGNAL
:
return
access_vaControl
(
p_access
,
ACCESS_GET_SIGNAL
,
args
);
case
STREAM_SET_PAUSE_STATE
:
return
access_vaControl
(
p_access
,
ACCESS_SET_PAUSE_STATE
,
args
);
case
STREAM_SET_TITLE
:
{
int
ret
=
access_vaControl
(
p_access
,
ACCESS_SET_TITLE
,
args
);
if
(
ret
==
VLC_SUCCESS
)
AStreamControlReset
(
s
);
return
ret
;
}
case
STREAM_SET_SEEKPOINT
:
{
int
ret
=
access_vaControl
(
p_access
,
ACCESS_SET_SEEKPOINT
,
args
);
int
ret
=
access_vaControl
(
p_access
,
i_query
,
args
);
if
(
ret
==
VLC_SUCCESS
)
AStreamControlReset
(
s
);
return
ret
;
...
...
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