Commit 7a15955a authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Add SNR and signal level for access_demux

In particular, V4L is (usually) an access_demux rather than an access.
parent 77a137de
......@@ -159,6 +159,8 @@ enum demux_query_e
DEMUX_SET_RATE, /* arg1= int*pi_rate can fail */
DEMUX_CAN_SEEK, /* arg1= bool* can fail (assume false)*/
DEMUX_GET_SIGNAL, /* arg1= double * arg2= double * can fail */
};
VLC_API int demux_vaControlHelper( stream_t *, int64_t i_start, int64_t i_end, int64_t i_bitrate, int i_align, int i_query, va_list args );
......
......@@ -2253,6 +2253,18 @@ static void UpdateGenericFromDemux( input_thread_t *p_input )
}
p_demux->info.i_update &= ~INPUT_UPDATE_META;
}
if( p_demux->info.i_update & INPUT_UPDATE_SIGNAL )
{
double quality;
double strength;
if( demux_Control( p_demux, DEMUX_GET_SIGNAL, &quality, &strength ) )
quality = strength = -1.;
input_SendEventSignal( p_input, quality, strength );
p_demux->info.i_update &= ~INPUT_UPDATE_SIGNAL;
}
p_demux->info.i_update &= ~INPUT_UPDATE_SIZE;
}
......
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