本文整理汇总了C++中OSFactory::createOSTimer方法的典型用法代码示例。如果您正苦于以下问题:C++ OSFactory::createOSTimer方法的具体用法?C++ OSFactory::createOSTimer怎么用?C++ OSFactory::createOSTimer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OSFactory
的用法示例。
在下文中一共展示了OSFactory::createOSTimer方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SkinObject
Tooltip::Tooltip( intf_thread_t *pIntf, const GenericFont &rFont, int delay ):
SkinObject( pIntf ), m_rFont( rFont ), m_delay( delay ), m_pImage( NULL ),
m_xPos( -1 ), m_yPos( -1 ), m_cmdShow( this )
{
OSFactory *pOsFactory = OSFactory::instance( pIntf );
m_pTimer = pOsFactory->createOSTimer( m_cmdShow );
m_pOsTooltip = pOsFactory->createOSTooltip();
// Observe the tooltip text variable
VarManager::instance( pIntf )->getTooltipText().addObserver( this );
}
示例2: SkinObject
AsyncQueue::AsyncQueue( intf_thread_t *pIntf ): SkinObject( pIntf ),
m_cmdFlush( this )
{
// Initialize the mutex
vlc_mutex_init( &m_lock );
// Create a timer
OSFactory *pOsFactory = OSFactory::instance( pIntf );
m_pTimer = pOsFactory->createOSTimer( m_cmdFlush );
// Flush the queue every 10 ms
m_pTimer->start( 10, false );
}
示例3: SkinObject
AnimBitmap::AnimBitmap( intf_thread_t *pIntf, const GenericBitmap &rBitmap ):
SkinObject( pIntf ), m_pImage( NULL ), m_curFrame( 0 ), m_pTimer( NULL ),
m_cmdNextFrame( this ), m_rBitmap( rBitmap )
{
// Build the graphics
OSFactory *pOsFactory = OSFactory::instance( pIntf );
m_pImage = pOsFactory->createOSGraphics( rBitmap.getWidth(),
rBitmap.getHeight() );
m_pImage->drawBitmap( rBitmap, 0, 0 );
m_nbFrames = rBitmap.getNbFrames();
m_frameRate = rBitmap.getFrameRate();
// Create the timer
m_pTimer = pOsFactory->createOSTimer( m_cmdNextFrame );
}
示例4: GenericWindow
VoutWindow::VoutWindow( intf_thread_t *pIntf, vout_window_t* pWnd,
int width, int height, GenericWindow* pParent ) :
GenericWindow( pIntf, 0, 0, false, false, pParent,
GenericWindow::VoutWindow ),
m_pWnd( pWnd ), original_width( width ), original_height( height ),
m_pCtrlVideo( NULL ), m_pParentWindow( pParent ),
mouse_hide_timeout( var_InheritInteger( pWnd, "mouse-hide-timeout" ) ),
m_cmdHideMouse( this )
{
OSFactory *pOsFactory = OSFactory::instance( pIntf );
if( m_pWnd )
{
vlc_object_hold( m_pWnd );
updateWindowConfiguration( m_pWnd );
m_pTimer = pOsFactory->createOSTimer( m_cmdHideMouse );
}
}
示例5: SkinObject
VlcProc::VlcProc( intf_thread_t *pIntf ): SkinObject( pIntf ),
m_varEqBands( pIntf ), m_pVout( NULL ), m_pAout( NULL ),
m_bEqualizer_started( false ), m_cmdManage( this )
{
// Create a timer to poll the status of the vlc
OSFactory *pOsFactory = OSFactory::instance( pIntf );
m_pTimer = pOsFactory->createOSTimer( m_cmdManage );
m_pTimer->start( 100, false );
// Create and register VLC variables
VarManager *pVarManager = VarManager::instance( getIntf() );
#define REGISTER_VAR( var, type, name ) \
var = VariablePtr( new type( getIntf() ) ); \
pVarManager->registerVar( var, name );
REGISTER_VAR( m_cVarRandom, VarBoolImpl, "playlist.isRandom" )
REGISTER_VAR( m_cVarLoop, VarBoolImpl, "playlist.isLoop" )
REGISTER_VAR( m_cVarRepeat, VarBoolImpl, "playlist.isRepeat" )
REGISTER_VAR( m_cPlaytree, Playtree, "playtree" )
pVarManager->registerVar( getPlaytreeVar().getPositionVarPtr(),
"playtree.slider" );
pVarManager->registerVar( m_cVarRandom, "playtree.isRandom" );
pVarManager->registerVar( m_cVarLoop, "playtree.isLoop" );
REGISTER_VAR( m_cVarPlaying, VarBoolImpl, "vlc.isPlaying" )
REGISTER_VAR( m_cVarStopped, VarBoolImpl, "vlc.isStopped" )
REGISTER_VAR( m_cVarPaused, VarBoolImpl, "vlc.isPaused" )
/* Input variables */
pVarManager->registerVar( m_cVarRepeat, "playtree.isRepeat" );
REGISTER_VAR( m_cVarTime, StreamTime, "time" )
REGISTER_VAR( m_cVarSeekable, VarBoolImpl, "vlc.isSeekable" )
REGISTER_VAR( m_cVarDvdActive, VarBoolImpl, "dvd.isActive" )
REGISTER_VAR( m_cVarRecordable, VarBoolImpl, "vlc.canRecord" )
REGISTER_VAR( m_cVarRecording, VarBoolImpl, "vlc.isRecording" )
/* Vout variables */
REGISTER_VAR( m_cVarFullscreen, VarBoolImpl, "vlc.isFullscreen" )
REGISTER_VAR( m_cVarHasVout, VarBoolImpl, "vlc.hasVout" )
/* Aout variables */
REGISTER_VAR( m_cVarHasAudio, VarBoolImpl, "vlc.hasAudio" )
REGISTER_VAR( m_cVarVolume, Volume, "volume" )
REGISTER_VAR( m_cVarMute, VarBoolImpl, "vlc.isMute" )
REGISTER_VAR( m_cVarEqualizer, VarBoolImpl, "equalizer.isEnabled" )
REGISTER_VAR( m_cVarEqPreamp, EqualizerPreamp, "equalizer.preamp" )
#undef REGISTER_VAR
m_cVarStreamName = VariablePtr( new VarText( getIntf(), false ) );
pVarManager->registerVar( m_cVarStreamName, "streamName" );
m_cVarStreamURI = VariablePtr( new VarText( getIntf(), false ) );
pVarManager->registerVar( m_cVarStreamURI, "streamURI" );
m_cVarStreamBitRate = VariablePtr( new VarText( getIntf(), false ) );
pVarManager->registerVar( m_cVarStreamBitRate, "bitrate" );
m_cVarStreamSampleRate = VariablePtr( new VarText( getIntf(), false ) );
pVarManager->registerVar( m_cVarStreamSampleRate, "samplerate" );
m_cVarStreamArt = VariablePtr( new VarString( getIntf() ) );
pVarManager->registerVar( m_cVarStreamArt, "streamArt" );
// Register the equalizer bands
for( int i = 0; i < EqualizerBands::kNbBands; i++)
{
stringstream ss;
ss << "equalizer.band(" << i << ")";
pVarManager->registerVar( m_varEqBands.getBand( i ), ss.str() );
}
// XXX WARNING XXX
// The object variable callbacks are called from other VLC threads,
// so they must put commands in the queue and NOT do anything else
// (X11 calls are not reentrant)
#define ADD_CALLBACK( p_object, var ) \
var_AddCallback( p_object, var, onGenericCallback, this );
ADD_CALLBACK( pIntf->p_sys->p_playlist, "volume-change" )
ADD_CALLBACK( pIntf->p_libvlc, "intf-show" )
ADD_CALLBACK( pIntf->p_sys->p_playlist, "item-current" )
ADD_CALLBACK( pIntf->p_sys->p_playlist, "random" )
ADD_CALLBACK( pIntf->p_sys->p_playlist, "loop" )
ADD_CALLBACK( pIntf->p_sys->p_playlist, "repeat" )
#undef ADD_CALLBACK
// Called when a playlist item is added
var_AddCallback( pIntf->p_sys->p_playlist, "playlist-item-append",
onItemAppend, this );
// Called when a playlist item is deleted
// TODO: properly handle item-deleted
var_AddCallback( pIntf->p_sys->p_playlist, "playlist-item-deleted",
onItemDelete, this );
// Called when the current input changes
var_AddCallback( pIntf->p_sys->p_playlist, "input-current",
onInputNew, this );
// Called when a playlist item changed
var_AddCallback( pIntf->p_sys->p_playlist, "item-change",
onItemChange, this );
//.........这里部分代码省略.........