vlc_linux/vlc-3.0.16/modules/access/dshow/filter.cpp
/**
 * Returns a sample from its sample queue. Proper locking must be done prior
 * to this call. Current dshow code protects the access to any sample queue
 * (audio and video) with the p_sys->lock
 * @param vlc_sample [out] Address of a sample if sucessfull. Undefined
 * otherwise.
 * @return S_OK if a sample was available, S_FALSE if no sample was
 * available
 */
Returns a sample from its sample queue. Proper locking must be done prior
to this call. Current dshow code protects the access to any sample queue
(audio and video) with the p_sys->lock
@param vlc_sample [out] Address of a sample if sucessfull. Undefined
otherwise.
@return S_OK if a sample was available, S_FALSE if no sample was
available
Returns a sample from its sample queue . Proper locking must be done prior to this call . Current dshow code protects the access to any sample queue ( audio and video ) with the p_sys - > lock @param vlc_sample [ out ] Address of a sample if sucessfull . Undefined otherwise . @return S_OK if a sample was available S_FALSE if no sample was available
HRESULT CapturePin::CustomGetSample( VLCMediaSample *vlc_sample )
{
#if 0 
    msg_Dbg( p_input, "CapturePin::CustomGetSample" );
#endif
    if( !samples_queue.empty() )
    {
        *vlc_sample = samples_queue.back();
        samples_queue.pop_back();
        return S_OK;
    }
    return S_FALSE;
}
HRESULT CapturePin :: CustomGetSample ( VLCMediaSample * vlc_sample ) { #if 0 msg_Dbg ( p_input , " " ) ; #endif if ( ! samples_queue . empty ( ) ) { * vlc_sample = samples_queue . back ( ) ; samples_queue . pop_back ( ) ; return S_OK ; } return S_FALSE ; }
Returns a sample from its sample queue.
Returns a sample from its sample queue .
//def DEBUG_DSHOW