Commit 766ba5cc authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

stream: add the new controls to demux and memory streams

parent d8100367
......@@ -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;
......
......@@ -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 !!!" );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment