[vlc-commits] stream: add the new controls to demux and memory streams
Rémi Denis-Courmont
git at videolan.org
Wed Apr 17 21:57:49 CEST 2013
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Apr 17 22:49:15 2013 +0300| [766ba5cccb68dc590bfc2fb4806315f2448d03d5] | committer: Rémi Denis-Courmont
stream: add the new controls to demux and memory streams
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=766ba5cccb68dc590bfc2fb4806315f2448d03d5
---
src/input/stream_demux.c | 11 ++++-------
src/input/stream_memory.c | 13 ++++++-------
2 files changed, 10 insertions(+), 14 deletions(-)
diff --git a/src/input/stream_demux.c b/src/input/stream_demux.c
index b090219..dbd7eec 100644
--- a/src/input/stream_demux.c
+++ b/src/input/stream_demux.c
@@ -259,7 +259,6 @@ static int DStreamControl( stream_t *s, int i_query, va_list args )
{
stream_sys_t *p_sys = s->p_sys;
uint64_t *p_i64;
- bool *p_b;
switch( i_query )
{
@@ -269,13 +268,10 @@ static int DStreamControl( stream_t *s, int i_query, va_list args )
return VLC_SUCCESS;
case STREAM_CAN_SEEK:
- p_b = (bool*) va_arg( args, bool * );
- *p_b = false;
- return VLC_SUCCESS;
-
case STREAM_CAN_FASTSEEK:
- p_b = (bool*) va_arg( args, bool * );
- *p_b = false;
+ case STREAM_CAN_PAUSE:
+ case STREAM_CAN_CONTROL_PACE:
+ *va_arg( args, bool * ) = false;
return VLC_SUCCESS;
case STREAM_GET_POSITION:
@@ -302,6 +298,7 @@ static int DStreamControl( stream_t *s, int i_query, va_list args )
case STREAM_CONTROL_ACCESS:
case STREAM_GET_CONTENT_TYPE:
+ case STREAM_SET_PAUSE_STATE:
case STREAM_SET_RECORD_STATE:
return VLC_EGENERIC;
diff --git a/src/input/stream_memory.c b/src/input/stream_memory.c
index 43b8f4e..4fce667 100644
--- a/src/input/stream_memory.c
+++ b/src/input/stream_memory.c
@@ -95,7 +95,6 @@ static int Control( stream_t *s, int i_query, va_list args )
{
stream_sys_t *p_sys = s->p_sys;
- bool *p_bool;
uint64_t *pi_64, i_64;
switch( i_query )
@@ -106,13 +105,10 @@ static int Control( stream_t *s, int i_query, va_list args )
break;
case STREAM_CAN_SEEK:
- p_bool = (bool*)va_arg( args, bool * );
- *p_bool = true;
- break;
-
case STREAM_CAN_FASTSEEK:
- p_bool = (bool*)va_arg( args, bool * );
- *p_bool = true;
+ case STREAM_CAN_PAUSE:
+ case STREAM_CAN_CONTROL_PACE:
+ *va_arg( args, bool * ) = true;
break;
case STREAM_GET_POSITION:
@@ -129,6 +125,9 @@ static int Control( stream_t *s, int i_query, va_list args )
case STREAM_GET_CONTENT_TYPE:
return VLC_EGENERIC;
+ case STREAM_SET_PAUSE_STATE:
+ break; /* nothing to do */
+
case STREAM_CONTROL_ACCESS:
msg_Err( s, "Hey, what are you thinking ?"
"DON'T USE STREAM_CONTROL_ACCESS !!!" );
More information about the vlc-commits
mailing list