vlc_linux/vlc-3.0.16/modules/access/live555.cpp
/* return true if the RTSP command succeeded */
return true if the RTSP command succeeded
return true if the RTSP command succeeded
static bool wait_Live555_response( demux_t *p_demux, int i_timeout = 0  )
{
    TaskToken task;
    demux_sys_t * p_sys = p_demux->p_sys;
    p_sys->event_rtsp = 0;
    if( i_timeout > 0 )
    {
        task = p_sys->scheduler->scheduleDelayedTask( i_timeout*1000,
                                                      TaskInterruptRTSP,
                                                      p_demux );
    }
    p_sys->event_rtsp = 0;
    p_sys->b_error = true;
    p_sys->i_live555_ret = 0;
    p_sys->scheduler->doEventLoop( &p_sys->event_rtsp );
    if( i_timeout > 0 )
    {
        p_sys->scheduler->unscheduleDelayedTask( task );
    }
    return !p_sys->b_error;
}
static bool wait_Live555_response ( demux_t * p_demux , int i_timeout = 0 ) { TaskToken task ; demux_sys_t * p_sys = p_demux -> p_sys ; p_sys -> event_rtsp = 0 ; if ( i_timeout > 0 ) { task = p_sys -> scheduler -> scheduleDelayedTask ( i_timeout * 1000 , TaskInterruptRTSP , p_demux ) ; } p_sys -> event_rtsp = 0 ; p_sys -> b_error = true ; p_sys -> i_live555_ret = 0 ; p_sys -> scheduler -> doEventLoop ( & p_sys -> event_rtsp ) ; if ( i_timeout > 0 ) { p_sys -> scheduler -> unscheduleDelayedTask ( task ) ; } return ! p_sys -> b_error ; }
return true if the RTSP command succeeded
return true if the RTSP command succeeded
/* ms */ /* Create a task that will be called if we wait more than timeout ms */ //here, if b_error is true and i_live555_ret = 0 we didn't receive a response /* remove the task */