Commit e82fce44 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

demux: Implement legacy fallbacks in the modules

This is a pre-requisite to revert
a2beb67e
parent 6f3d97f9
......@@ -344,6 +344,14 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
}
case DEMUX_SET_TIME:
case DEMUX_GET_FPS:
return VLC_EGENERIC;
case DEMUX_CAN_PAUSE:
case DEMUX_SET_PAUSE_STATE:
case DEMUX_CAN_CONTROL_PACE:
case DEMUX_GET_PTS_DELAY:
return demux_vaControlHelper( p_demux->s, 0, -1, 0, 1, i_query, args );
default:
return VLC_EGENERIC;
}
......
......@@ -1167,7 +1167,11 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
return VLC_EGENERIC;
*va_arg( args, int * ) = p_sys->i_seekpoint;
return VLC_SUCCESS;
case DEMUX_CAN_PAUSE:
case DEMUX_SET_PAUSE_STATE:
case DEMUX_CAN_CONTROL_PACE:
case DEMUX_GET_PTS_DELAY:
return demux_vaControlHelper( p_demux->s, 0, -1, 0, 1, i_query, args );
default:
return VLC_EGENERIC;
}
......
......@@ -1792,6 +1792,12 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
return VLC_EGENERIC;
}
case DEMUX_CAN_PAUSE:
case DEMUX_SET_PAUSE_STATE:
case DEMUX_CAN_CONTROL_PACE:
case DEMUX_GET_PTS_DELAY:
return demux_vaControlHelper( p_demux->s, 0, -1, 0, 1, i_query, args );
default:
return VLC_EGENERIC;
}
......
......@@ -1046,6 +1046,13 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
case DEMUX_GET_META:
return vlc_stream_Control( p_demux->s, STREAM_GET_META, args );
case DEMUX_CAN_PAUSE:
case DEMUX_SET_PAUSE_STATE:
case DEMUX_CAN_CONTROL_PACE:
case DEMUX_GET_PTS_DELAY:
return demux_vaControlHelper( p_demux->s, p_sys->i_data_offset,
p_sys->i_data_size, 0, 1, i_query, args );
default:
return VLC_EGENERIC;
}
......
......@@ -333,6 +333,15 @@ static int Control (demux_t *demux, int query, va_list args)
case DEMUX_GET_TITLE:
*va_arg(args, int *) = sys->track_id;
return VLC_SUCCESS;
case DEMUX_CAN_PAUSE:
case DEMUX_SET_PAUSE_STATE:
case DEMUX_CAN_CONTROL_PACE:
case DEMUX_GET_PTS_DELAY:
return demux_vaControlHelper( demux->s, 0, -1, 0, 1, query, args );
default:
return VLC_EGENERIC;
}
return VLC_EGENERIC;
......
......@@ -283,8 +283,17 @@ static int Control(demux_t *demux, int query, va_list args)
case DEMUX_GET_META:
case DEMUX_HAS_UNSUPPORTED_META:
case DEMUX_GET_ATTACHMENTS:
return VLC_EGENERIC;
case DEMUX_CAN_PAUSE:
case DEMUX_SET_PAUSE_STATE:
case DEMUX_CAN_CONTROL_PACE:
case DEMUX_GET_PTS_DELAY:
return demux_vaControlHelper( demux->s, 0, -1, 0, 1, query, args );
default:
return VLC_EGENERIC;
}
}
......
......@@ -459,6 +459,13 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
b = va_arg( args, int ); /* precise? */
msg_Dbg(p_demux,"SET_TIME to %" PRId64, i64 );
return Seek( p_demux, i64, -1, NULL, b );
case DEMUX_CAN_PAUSE:
case DEMUX_SET_PAUSE_STATE:
case DEMUX_CAN_CONTROL_PACE:
case DEMUX_GET_PTS_DELAY:
return demux_vaControlHelper( p_demux->s, 0, -1, 0, 1, i_query, args );
default:
return VLC_EGENERIC;
}
......
......@@ -428,8 +428,17 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
}
case DEMUX_GET_FPS: /* meaningless */
return VLC_EGENERIC;
case DEMUX_CAN_PAUSE:
case DEMUX_CAN_CONTROL_PACE:
case DEMUX_GET_PTS_DELAY:
case DEMUX_SET_PAUSE_STATE:
return demux_vaControlHelper( p_demux->s, 0, -1, 0, 1, i_query, args );
default:
return VLC_EGENERIC;
}
}
......
......@@ -2139,6 +2139,13 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
case DEMUX_SET_GROUP:
case DEMUX_HAS_UNSUPPORTED_META:
case DEMUX_CAN_RECORD:
return VLC_EGENERIC;
case DEMUX_CAN_PAUSE:
case DEMUX_SET_PAUSE_STATE:
case DEMUX_CAN_CONTROL_PACE:
return demux_vaControlHelper( p_demux->s, 0, -1, 0, 1, i_query, args );
default:
return VLC_EGENERIC;
}
......
......@@ -387,6 +387,12 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
}
return VLC_EGENERIC;
case DEMUX_CAN_PAUSE:
case DEMUX_SET_PAUSE_STATE:
case DEMUX_CAN_CONTROL_PACE:
case DEMUX_GET_PTS_DELAY:
return demux_vaControlHelper( p_demux->s, 0, -1, 0, 1, i_query, args );
default:
return VLC_EGENERIC;
}
......
......@@ -785,8 +785,17 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
return vlc_stream_vaControl( p_demux->s, STREAM_GET_META, args );
case DEMUX_GET_FPS:
break;
case DEMUX_CAN_PAUSE:
case DEMUX_SET_PAUSE_STATE:
case DEMUX_CAN_CONTROL_PACE:
case DEMUX_GET_PTS_DELAY:
return demux_vaControlHelper( p_demux->s, 0, -1, 0, 1, i_query, args );
default:
break;
}
return VLC_EGENERIC;
}
......
......@@ -1175,6 +1175,12 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
return VLC_SUCCESS;
}
case DEMUX_CAN_PAUSE:
case DEMUX_SET_PAUSE_STATE:
case DEMUX_CAN_CONTROL_PACE:
case DEMUX_GET_PTS_DELAY:
return demux_vaControlHelper( p_demux->s, 0, -1, 0, 1, i_query, args );
default:
break;
}
......
......@@ -417,6 +417,14 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
case DEMUX_SET_TIME:
return VLC_EGENERIC;
case DEMUX_CAN_PAUSE:
case DEMUX_SET_PAUSE_STATE:
case DEMUX_CAN_CONTROL_PACE:
case DEMUX_GET_PTS_DELAY:
return demux_vaControlHelper( p_demux->s, 0, -1, 0, 1, i_query, args );
default:
return VLC_EGENERIC;
}
......
......@@ -545,6 +545,14 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
return VLC_SUCCESS;
case DEMUX_GET_META:
return VLC_EGENERIC;
case DEMUX_CAN_PAUSE:
case DEMUX_SET_PAUSE_STATE:
case DEMUX_CAN_CONTROL_PACE:
case DEMUX_GET_PTS_DELAY:
return demux_vaControlHelper( p_demux->s, 0, -1, 0, 1, i_query, args );
default:
return VLC_EGENERIC;
......
......@@ -346,6 +346,12 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
*pf = (double)1000000.0 / (double)p_sys->i_pcr_inc;
return VLC_SUCCESS;
#endif
case DEMUX_CAN_PAUSE:
case DEMUX_SET_PAUSE_STATE:
case DEMUX_CAN_CONTROL_PACE:
case DEMUX_GET_PTS_DELAY:
return demux_vaControlHelper( p_demux->s, 0, -1, 0, 1, i_query, args );
case DEMUX_SET_TIME:
default:
return VLC_EGENERIC;
......
......@@ -390,7 +390,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
case DEMUX_GET_POSITION:
pf = va_arg( args, double * );
/* read stream size maybe failed in rtsp streaming,
/* read stream size maybe failed in rtsp streaming,
so use duration to determin the position at first */
if( p_sys->i_our_duration > 0 )
{
......@@ -457,7 +457,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
case DEMUX_GET_LENGTH:
pi64 = va_arg( args, int64_t * );
if( p_sys->i_our_duration <= 0 )
{
*pi64 = 0;
......@@ -485,6 +485,13 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
return VLC_SUCCESS;
}
case DEMUX_CAN_PAUSE:
case DEMUX_SET_PAUSE_STATE:
case DEMUX_CAN_CONTROL_PACE:
case DEMUX_GET_PTS_DELAY:
return demux_vaControlHelper( p_demux->s, p_sys->i_data_offset,
p_sys->i_data_size, 0, 1, i_query, args );
case DEMUX_GET_FPS:
default:
return VLC_EGENERIC;
......@@ -1252,7 +1259,7 @@ static void HeaderINDX( demux_t *p_demux )
}
real_index_t *p_idx = &p_sys->p_index[i];
p_idx->i_time_offset = GetDWBE( &p_entry[2] );
p_idx->i_file_offset = GetDWBE( &p_entry[6] );
p_idx->i_frame_index = GetDWBE( &p_entry[10] );
......
......@@ -288,6 +288,13 @@ static int Control (demux_t *demux, int query, va_list args)
case DEMUX_GET_TITLE:
*va_arg(args, int *) = sys->last_title;
return VLC_SUCCESS;
case DEMUX_CAN_PAUSE:
case DEMUX_SET_PAUSE_STATE:
case DEMUX_CAN_CONTROL_PACE:
case DEMUX_GET_PTS_DELAY:
return demux_vaControlHelper( demux->s, 0, -1, 0,
sys->bytes_per_frame, query, args );
}
return VLC_EGENERIC;
......
......@@ -524,6 +524,13 @@ static int Control (demux_t *demux, int i_query, va_list args)
break;
case DEMUX_SET_TIME:
return Seek (demux, va_arg (args, int64_t));
case DEMUX_CAN_PAUSE:
case DEMUX_SET_PAUSE_STATE:
case DEMUX_CAN_CONTROL_PACE:
case DEMUX_GET_PTS_DELAY:
return demux_vaControlHelper( demux->s, 0, -1, 0, 1, i_query, args );
default:
return VLC_EGENERIC;
}
......
......@@ -162,6 +162,12 @@ static int Control(demux_t *demux, int query, va_list args)
}
return VLC_SUCCESS;
}
case DEMUX_CAN_PAUSE:
case DEMUX_SET_PAUSE_STATE:
case DEMUX_CAN_CONTROL_PACE:
case DEMUX_GET_PTS_DELAY: {
return demux_vaControlHelper( demux->s, 0, -1, 0, 1, query, args );
}
default:
break;
}
......
......@@ -830,6 +830,11 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
p_sys->i_next_demux_date = va_arg( args, int64_t ) - VLC_TS_0;
return VLC_SUCCESS;
case DEMUX_CAN_PAUSE:
case DEMUX_SET_PAUSE_STATE:
case DEMUX_CAN_CONTROL_PACE:
return demux_vaControlHelper( p_demux->s, 0, -1, 0, 1, i_query, args );
case DEMUX_GET_PTS_DELAY:
case DEMUX_GET_FPS:
case DEMUX_GET_META:
......
......@@ -273,6 +273,13 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
*pi64 = INT64_C(1000000) * p_sys->i_currentframe * TTA_FRAMETIME;
return VLC_SUCCESS;
case DEMUX_CAN_PAUSE:
case DEMUX_SET_PAUSE_STATE:
case DEMUX_CAN_CONTROL_PACE:
case DEMUX_GET_PTS_DELAY:
return demux_vaControlHelper( p_demux->s, 0, p_sys->i_datalength,
0, p_sys->i_framelength, i_query, args );
default:
return VLC_EGENERIC;
}
......
......@@ -277,6 +277,11 @@ static int Control( demux_t* p_demux, int i_query, va_list args )
return VLC_SUCCESS;
}
break;
case DEMUX_CAN_PAUSE:
case DEMUX_SET_PAUSE_STATE:
case DEMUX_CAN_CONTROL_PACE:
return demux_vaControlHelper( p_demux->s, 0, -1, 0, 1, i_query, args );
case DEMUX_GET_PTS_DELAY:
case DEMUX_GET_FPS:
case DEMUX_GET_META:
......
......@@ -533,6 +533,11 @@ static int Control(demux_t *p_demux, int i_query, va_list args)
case DEMUX_SET_TIME: /* arg is time in microsecs */
i64 = va_arg( args, int64_t );
return ty_stream_seek_time(p_demux, i64 * 1000);
case DEMUX_CAN_PAUSE:
case DEMUX_SET_PAUSE_STATE:
case DEMUX_CAN_CONTROL_PACE:
case DEMUX_GET_PTS_DELAY:
return demux_vaControlHelper( p_demux->s, 0, -1, 0, 1, i_query, args );
case DEMUX_GET_FPS:
default:
return VLC_EGENERIC;
......
......@@ -330,6 +330,11 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
p_sys->i_next_demux_date = va_arg( args, int64_t );
return VLC_SUCCESS;
case DEMUX_CAN_PAUSE:
case DEMUX_SET_PAUSE_STATE:
case DEMUX_CAN_CONTROL_PACE:
return demux_vaControlHelper( p_demux->s, 0, -1, 0, 1, i_query, args );
case DEMUX_GET_PTS_DELAY:
case DEMUX_GET_FPS:
case DEMUX_GET_META:
......
......@@ -481,6 +481,11 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
p_sys->i_next_demux_time = va_arg( args, int64_t ) - VLC_TS_0;
return VLC_SUCCESS;
case DEMUX_CAN_PAUSE:
case DEMUX_SET_PAUSE_STATE:
case DEMUX_CAN_CONTROL_PACE:
return demux_vaControlHelper( p_demux->s, 0, -1, 0, 1, i_query, args );
case DEMUX_GET_PTS_DELAY:
case DEMUX_GET_FPS:
case DEMUX_GET_META:
......
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