vlc_linux/vlc-3.0.16/modules/demux/adaptive/plumbing/FakeESOut.cpp
/* Static callbacks */
/* Always pass Fake ES ID to slave demuxes, it is just an opaque struct to them */
Static callbacks
Always pass Fake ES ID to slave demuxes, it is just an opaque struct to them
Static callbacks Always pass Fake ES ID to slave demuxes it is just an opaque struct to them
es_out_id_t * FakeESOut::esOutAdd(const es_format_t *p_fmt)
{
    vlc_mutex_locker locker(&lock);
    if( p_fmt->i_cat != VIDEO_ES && p_fmt->i_cat != AUDIO_ES && p_fmt->i_cat != SPU_ES )
        return NULL;
    FakeESOutID *es_id = createNewID( p_fmt );
    if( likely(es_id) )
    {
        assert(!es_id->scheduledForDeletion());
        AbstractCommand *command = commandsqueue->factory()->createEsOutAddCommand( es_id );
        if( likely(command) )
        {
            fakeesidlist.push_back(es_id);
            commandsqueue->Schedule( command );
            return reinterpret_cast<es_out_id_t *>(es_id);
        }
        else
        {
            delete es_id;
        }
    }
    return NULL;
}
es_out_id_t * FakeESOut :: esOutAdd ( const es_format_t * p_fmt ) { vlc_mutex_locker locker ( & lock ) ; if ( p_fmt -> i_cat != VIDEO_ES && p_fmt -> i_cat != AUDIO_ES && p_fmt -> i_cat != SPU_ES ) return NULL ; FakeESOutID * es_id = createNewID ( p_fmt ) ; if ( likely ( es_id ) ) { assert ( ! es_id -> scheduledForDeletion ( ) ) ; AbstractCommand * command = commandsqueue -> factory ( ) -> createEsOutAddCommand ( es_id ) ; if ( likely ( command ) ) { fakeesidlist . push_back ( es_id ) ; commandsqueue -> Schedule ( command ) ; return reinterpret_cast < es_out_id_t * > ( es_id ) ; } else { delete es_id ; } } return NULL ; }
Static callbacks
Always pass Fake ES ID to slave demuxes, it is just an opaque struct to them
Static callbacks Always pass Fake ES ID to slave demuxes it is just an opaque struct to them
/* Feed the slave demux/stream_Demux with FakeESOutID struct,
     * we'll create real ES later on main demux on execution */