Commit 60106b74 authored by Antoine Cellerier's avatar Antoine Cellerier

Allow use of inputs without DEMUX_GET/SET_*TIME in input-slave.

This is commit is necessary to split the audio and video capture accesses.
Example use with current git master to record screen and webcam:
./vlc screen:// --screen-fps 25 --screen-width 100 --screen-height 100 -I dummy --screen-follow-mouse --input-slave v4l2://:audio-method=0 -vv --sout '#transcode{vcodec=mp2v,vb=1024}:std{access=file,mux=ts,dst=/tmp/a.ts}' --run-time 10
parent 7ad836c7
......@@ -2515,11 +2515,12 @@ static void SlaveDemux( input_thread_t *p_input )
{
int64_t i_time;
int i;
bool b_set_time = true;
if( demux_Control( p_input->p->input.p_demux, DEMUX_GET_TIME, &i_time ) )
{
msg_Err( p_input, "demux doesn't like DEMUX_GET_TIME" );
return;
/* msg_Err( p_input, "demux doesn't like DEMUX_GET_TIME" ); */
b_set_time = false;
}
for( i = 0; i < p_input->p->i_slave; i++ )
......@@ -2530,7 +2531,7 @@ static void SlaveDemux( input_thread_t *p_input )
if( in->b_eof )
continue;
if( demux_Control( in->p_demux, DEMUX_SET_NEXT_DEMUX_TIME, i_time ) )
if( b_set_time && demux_Control( in->p_demux, DEMUX_SET_NEXT_DEMUX_TIME, i_time ) )
{
for( ;; )
{
......
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