这篇教程C++ CmdGenericPtr函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中CmdGenericPtr函数的典型用法代码示例。如果您正苦于以下问题:C++ CmdGenericPtr函数的具体用法?C++ CmdGenericPtr怎么用?C++ CmdGenericPtr使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了CmdGenericPtr函数的22个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: CmdChangeSkin/// Callback called when a new skin is chosenvoid Dialogs::showChangeSkinCB( intf_dialog_args_t *pArg ){ intf_thread_t *pIntf = (intf_thread_t *)pArg->p_arg; if( pArg->i_results ) { if( pArg->psz_results[0] ) { // Create a change skin command CmdChangeSkin *pCmd = new CmdChangeSkin( pIntf, sFromLocale( pArg->psz_results[0] ) ); // Push the command in the asynchronous command queue AsyncQueue *pQueue = AsyncQueue::instance( pIntf ); pQueue->push( CmdGenericPtr( pCmd ) ); } } else if( !pIntf->p_sys->p_theme ) { // If no theme is already loaded, it's time to quit! CmdQuit *pCmd = new CmdQuit( pIntf ); AsyncQueue *pQueue = AsyncQueue::instance( pIntf ); pQueue->push( CmdGenericPtr( pCmd ) ); }}
开发者ID:AsamQi,项目名称:vlc,代码行数:26,
示例2: onTaskBarChange/// Callback for the systray configuration optionstatic int onTaskBarChange( vlc_object_t *pObj, const char *pVariable, vlc_value_t oldVal, vlc_value_t newVal, void *pParam ){ intf_thread_t *pIntf; vlc_mutex_lock( &skin_load.mutex ); pIntf = skin_load.intf; if( pIntf ) vlc_object_hold( pIntf ); vlc_mutex_unlock( &skin_load.mutex ); if( pIntf == NULL ) { return VLC_EGENERIC; } AsyncQueue *pQueue = AsyncQueue::instance( pIntf ); if( newVal.b_bool ) { CmdAddInTaskBar *pCmd = new CmdAddInTaskBar( pIntf ); pQueue->push( CmdGenericPtr( pCmd ) ); } else { CmdRemoveFromTaskBar *pCmd = new CmdRemoveFromTaskBar( pIntf ); pQueue->push( CmdGenericPtr( pCmd ) ); } vlc_object_release( pIntf ); return VLC_SUCCESS;}
开发者ID:FLYKingdom,项目名称:vlc,代码行数:33,
示例3: WindowControlstatic int WindowControl( vout_window_t *pWnd, int query, va_list args ){ vout_window_sys_t* sys = pWnd->sys; intf_thread_t *pIntf = sys->pIntf; AsyncQueue *pQueue = AsyncQueue::instance( pIntf ); switch( query ) { case VOUT_WINDOW_SET_SIZE: { unsigned int i_width = va_arg( args, unsigned int ); unsigned int i_height = va_arg( args, unsigned int ); if( i_width && i_height ) { // Post a vout resize command CmdResizeVout *pCmd = new CmdResizeVout( pIntf, pWnd, (int)i_width, (int)i_height ); pQueue->push( CmdGenericPtr( pCmd ) ); } return VLC_EGENERIC; } case VOUT_WINDOW_SET_FULLSCREEN: { bool b_fullscreen = va_arg( args, int ); // Post a set fullscreen command CmdSetFullscreen* pCmd = new CmdSetFullscreen( pIntf, pWnd, b_fullscreen ); pQueue->push( CmdGenericPtr( pCmd ) ); return VLC_SUCCESS; } case VOUT_WINDOW_SET_STATE: { unsigned i_arg = va_arg( args, unsigned ); unsigned on_top = i_arg & VOUT_WINDOW_STATE_ABOVE; // Post a SetOnTop command CmdSetOnTop* pCmd = new CmdSetOnTop( pIntf, on_top ); pQueue->push( CmdGenericPtr( pCmd ) ); return VLC_SUCCESS; } default: msg_Dbg( pIntf, "control query not supported" ); return VLC_EGENERIC; }}
开发者ID:vlcchina,项目名称:vlc-player-experimental,代码行数:52,
示例4: Close//---------------------------------------------------------------------------// Close: destroy interface//---------------------------------------------------------------------------static void Close( vlc_object_t *p_this ){ intf_thread_t *p_intf = (intf_thread_t *)p_this; msg_Dbg( p_intf, "closing skins2 module" ); /* Terminate input to ensure that our window provider is released. */ playlist_Deactivate( p_intf->p_sys->p_playlist ); vlc_mutex_lock( &skin_load.mutex ); skin_load.intf = NULL; vlc_mutex_unlock( &skin_load.mutex); AsyncQueue *pQueue = p_intf->p_sys->p_queue; if( pQueue ) { CmdGeneric *pCmd = new CmdExitLoop( p_intf ); if( pCmd ) pQueue->push( CmdGenericPtr( pCmd ) ); } else { msg_Err( p_intf, "thread found already stopped (weird!)" ); } vlc_join( p_intf->p_sys->thread, NULL ); vlc_mutex_destroy( &p_intf->p_sys->init_lock ); vlc_cond_destroy( &p_intf->p_sys->init_wait ); // Destroy structure free( p_intf->p_sys );}
开发者ID:371816210,项目名称:vlc_vlc,代码行数:36,
示例5: getFullscreenVarvoid VlcProc::on_intf_show_changed( vlc_object_t* p_obj, vlc_value_t newVal ){ (void)p_obj; (void)newVal; bool b_fullscreen = getFullscreenVar().get(); if( !b_fullscreen ) { if( newVal.b_bool ) { // Create a raise all command CmdRaiseAll *pCmd = new CmdRaiseAll( getIntf(), getIntf()->p_sys->p_theme->getWindowManager() ); // Push the command in the asynchronous command queue AsyncQueue *pQueue = AsyncQueue::instance( getIntf() ); pQueue->push( CmdGenericPtr( pCmd ) ); } } else { VoutManager* pVoutManager = VoutManager::instance( getIntf() ); FscWindow *pWin = pVoutManager->getFscWindow(); if( pWin ) { bool b_visible = pWin->getVisibleVar().get(); AsyncQueue *pQueue = AsyncQueue::instance( getIntf() ); if( !b_visible ) { CmdShowWindow* pCmd = new CmdShowWindow( getIntf(), getIntf()->p_sys->p_theme->getWindowManager(), *pWin ); pQueue->push( CmdGenericPtr( pCmd ) ); } else { CmdHideWindow* pCmd = new CmdHideWindow( getIntf(), getIntf()->p_sys->p_theme->getWindowManager(), *pWin ); pQueue->push( CmdGenericPtr( pCmd ) ); } } }}
开发者ID:RodrigoNieves,项目名称:vlc,代码行数:44,
示例6: CmdInteractionint VlcProc::onInteraction( vlc_object_t *pObj, const char *pVariable, vlc_value_t oldVal, vlc_value_t newVal, void *pParam ){ VlcProc *pThis = (VlcProc*)pParam; interaction_dialog_t *p_dialog = (interaction_dialog_t *)(newVal.p_address); CmdInteraction *pCmd = new CmdInteraction( pThis->getIntf(), p_dialog ); AsyncQueue *pQueue = AsyncQueue::instance( pThis->getIntf() ); pQueue->push( CmdGenericPtr( pCmd ) ); return VLC_SUCCESS;}
开发者ID:banketree,项目名称:faplayer,代码行数:12,
示例7: getIntfvoid CmdUpdateItem::execute(){ playlist_t *pPlaylist = getIntf()->p_sys->p_playlist; if( pPlaylist == NULL ) return; input_thread_t *p_input = playlist_CurrentInput( pPlaylist ); if( !p_input ) return; // Get playlist item information input_item_t *pItem = input_GetItem( p_input ); char *pszName = input_item_GetName( pItem ); char *pszUri = input_item_GetURI( pItem ); string name = pszName; // XXX: This should be done in VLC core, not here... // Remove path information if any OSFactory *pFactory = OSFactory::instance( getIntf() ); string::size_type pos = name.rfind( pFactory->getDirSeparator() ); if( pos != string::npos ) { name = name.substr( pos + 1, name.size() - pos + 1 ); } UString srcName( getIntf(), name.c_str() ); UString srcURI( getIntf(), pszUri ); free( pszName ); free( pszUri ); // Create commands to update the stream variables CmdSetText *pCmd1 = new CmdSetText( getIntf(), m_rStreamName, srcName ); CmdSetText *pCmd2 = new CmdSetText( getIntf(), m_rStreamURI, srcURI ); // Push the commands in the asynchronous command queue AsyncQueue *pQueue = AsyncQueue::instance( getIntf() ); pQueue->push( CmdGenericPtr( pCmd1 ), false ); pQueue->push( CmdGenericPtr( pCmd2 ), false ); vlc_object_release( p_input );}
开发者ID:FLYKingdom,项目名称:vlc,代码行数:40,
示例8: WindowClosestatic void WindowClose( vout_window_t *pWnd ){ vout_window_sys_t* sys = pWnd->sys; intf_thread_t *pIntf = sys->pIntf; // force execution in the skins2 thread context CmdExecuteBlock* cmd = new CmdExecuteBlock( pIntf, VLC_OBJECT( pWnd ), WindowCloseLocal ); CmdExecuteBlock::executeWait( CmdGenericPtr( cmd ) ); vlc_object_release( sys->pIntf ); free( sys );}
开发者ID:vlcchina,项目名称:vlc-player-experimental,代码行数:13,
示例9: switchint VlcProc::onGenericCallback2( vlc_object_t *pObj, const char *pVariable, vlc_value_t oldVal, vlc_value_t newVal, void *pParam ){ (void)oldVal; VlcProc *pThis = (VlcProc*)pParam; AsyncQueue *pQueue = AsyncQueue::instance( pThis->getIntf() ); /** * For intf-event, commands are labeled based on the value of newVal. * * For some values (e.g position), only keep the latest command * when there are multiple pending commands (remove=true). * * for others, don't discard commands (remove=false) **/ if( strcmp( pVariable, "intf-event" ) == 0 ) { stringstream label; bool b_remove; switch( newVal.i_int ) { case INPUT_EVENT_STATE: case INPUT_EVENT_POSITION: case INPUT_EVENT_RATE: case INPUT_EVENT_ES: case INPUT_EVENT_CHAPTER: case INPUT_EVENT_RECORD: b_remove = true; break; case INPUT_EVENT_VOUT: case INPUT_EVENT_AOUT: case INPUT_EVENT_DEAD: b_remove = false; break; default: return VLC_SUCCESS; } label << pVariable << "_" << newVal.i_int; CmdGeneric *pCmd = new CmdCallback( pThis->getIntf(), pObj, newVal, &VlcProc::on_intf_event_changed, label.str() ); if( pCmd ) pQueue->push( CmdGenericPtr( pCmd ), b_remove ); return VLC_SUCCESS; } msg_Err( pThis->getIntf(), "no callback entry for %s", pVariable ); return VLC_EGENERIC;}
开发者ID:RodrigoNieves,项目名称:vlc,代码行数:51,
示例10: WindowOpenstatic int WindowOpen( vout_window_t *pWnd, const vout_window_cfg_t *cfg ){ vout_window_sys_t* sys; vlc_mutex_lock( &skin_load.mutex ); intf_thread_t *pIntf = skin_load.intf; if( pIntf ) vlc_object_hold( pIntf ); vlc_mutex_unlock( &skin_load.mutex ); if( pIntf == NULL ) return VLC_EGENERIC; if( !vlc_object_alive( pIntf ) || !var_InheritBool( pIntf, "skinned-video") || cfg->is_standalone ) { vlc_object_release( pIntf ); return VLC_EGENERIC; } sys = (vout_window_sys_t*)calloc( 1, sizeof( *sys ) ); if( !sys ) { vlc_object_release( pIntf ); return VLC_ENOMEM; } pWnd->sys = sys; pWnd->sys->cfg = *cfg; pWnd->sys->pIntf = pIntf; pWnd->control = WindowControl; // force execution in the skins2 thread context CmdExecuteBlock* cmd = new CmdExecuteBlock( pIntf, VLC_OBJECT( pWnd ), WindowOpenLocal ); CmdExecuteBlock::executeWait( CmdGenericPtr( cmd ) );#ifdef X11_SKINS if( !pWnd->handle.xid )#else if( !pWnd->handle.hwnd )#endif { free( sys ); vlc_object_release( pIntf ); return VLC_EGENERIC; } return VLC_SUCCESS;}
开发者ID:vlcchina,项目名称:vlc-player-experimental,代码行数:51,
示例11: CmdSetEqBandsint VlcProc::onEqBandsChange( vlc_object_t *pObj, const char *pVariable, vlc_value_t oldVal, vlc_value_t newVal, void *pParam ){ VlcProc *pThis = (VlcProc*)pParam; // Post a set equalizer bands command CmdSetEqBands *pCmd = new CmdSetEqBands( pThis->getIntf(), pThis->m_varEqBands, newVal.psz_string ); AsyncQueue *pQueue = AsyncQueue::instance( pThis->getIntf() ); pQueue->push( CmdGenericPtr( pCmd ) ); return VLC_SUCCESS;}
开发者ID:banketree,项目名称:faplayer,代码行数:15,
示例12: CmdSetEqPreampint VlcProc::onEqPreampChange( vlc_object_t *pObj, const char *pVariable, vlc_value_t oldVal, vlc_value_t newVal, void *pParam ){ VlcProc *pThis = (VlcProc*)pParam; EqualizerPreamp *pVarPreamp = (EqualizerPreamp*)(pThis->m_cVarEqPreamp.get()); // Post a set preamp command CmdSetEqPreamp *pCmd = new CmdSetEqPreamp( pThis->getIntf(), *pVarPreamp, (newVal.f_float + 20.0) / 40.0 ); AsyncQueue *pQueue = AsyncQueue::instance( pThis->getIntf() ); pQueue->push( CmdGenericPtr( pCmd ) ); return VLC_SUCCESS;}
开发者ID:banketree,项目名称:faplayer,代码行数:15,
示例13: CmdPlaylistSavevoid Dialogs::showPlaylistSaveCB( intf_dialog_args_t *pArg ){ intf_thread_t *pIntf = (intf_thread_t *)pArg->p_arg; if( pArg->i_results && pArg->psz_results[0] ) { // Create a Playlist Save command CmdPlaylistSave *pCmd = new CmdPlaylistSave( pIntf, pArg->psz_results[0] ); // Push the command in the asynchronous command queue AsyncQueue *pQueue = AsyncQueue::instance( pIntf ); pQueue->push( CmdGenericPtr( pCmd ) ); }}
开发者ID:AsamQi,项目名称:vlc,代码行数:15,
示例14: CmdPlaytreeAppendint VlcProc::onItemAppend( vlc_object_t *pObj, const char *pVariable, vlc_value_t oldVal, vlc_value_t newVal, void *pParam ){ VlcProc *pThis = (VlcProc*)pParam; playlist_add_t *p_add = static_cast<playlist_add_t*>(newVal.p_address); CmdPlaytreeAppend *pCmdTree = new CmdPlaytreeAppend( pThis->getIntf(), p_add ); // Push the command in the asynchronous command queue AsyncQueue *pQueue = AsyncQueue::instance( pThis->getIntf() ); pQueue->push( CmdGenericPtr( pCmdTree ), false ); return VLC_SUCCESS;}
开发者ID:banketree,项目名称:faplayer,代码行数:16,
示例15: CmdPlaytreeDeleteint VlcProc::onItemDelete( vlc_object_t *pObj, const char *pVariable, vlc_value_t oldVal, vlc_value_t newVal, void *pParam ){ VlcProc *pThis = (VlcProc*)pParam; int i_id = newVal.i_int; CmdPlaytreeDelete *pCmdTree = new CmdPlaytreeDelete( pThis->getIntf(), i_id); // Push the command in the asynchronous command queue AsyncQueue *pQueue = AsyncQueue::instance( pThis->getIntf() ); pQueue->push( CmdGenericPtr( pCmdTree ), false ); return VLC_SUCCESS;}
开发者ID:banketree,项目名称:faplayer,代码行数:16,
示例16: switchint VoutManager::controlWindow( struct vout_window_t *pWnd, int query, va_list args ){ intf_thread_t *pIntf = (intf_thread_t *)pWnd->p_private; VoutManager *pThis = pIntf->p_sys->p_voutManager; vout_thread_t* pVout = pWnd->vout; switch( query ) { case VOUT_SET_SIZE: { unsigned int i_width = va_arg( args, unsigned int ); unsigned int i_height = va_arg( args, unsigned int ); if( i_width && i_height ) { pThis->lockVout(); vector<SavedVout>::iterator it; for( it = pThis->m_SavedVoutVec.begin(); it != pThis->m_SavedVoutVec.end(); it++ ) { if( (*it).pVout == pVout ) { // Post a vout resize command CmdResizeVout *pCmd = new CmdResizeVout( pThis->getIntf(), (*it).pVoutWindow, (int)i_width, (int)i_height ); AsyncQueue *pQueue = AsyncQueue::instance( pThis->getIntf() ); pQueue->push( CmdGenericPtr( pCmd ) ); break; } } pThis->unlockVout(); } } default: msg_Dbg( pWnd, "control query not supported" ); break; } return VLC_SUCCESS;}
开发者ID:Kafay,项目名称:vlc,代码行数:47,
示例17: CmdPlaytreeUpdateint VlcProc::onItemChange( vlc_object_t *pObj, const char *pVariable, vlc_value_t oldval, vlc_value_t newval, void *pParam ){ VlcProc *pThis = (VlcProc*)pParam; input_item_t *p_item = static_cast<input_item_t*>(newval.p_address); // Create a playtree notify command CmdPlaytreeUpdate *pCmdTree = new CmdPlaytreeUpdate( pThis->getIntf(), p_item ); // Push the command in the asynchronous command queue AsyncQueue *pQueue = AsyncQueue::instance( pThis->getIntf() ); pQueue->push( CmdGenericPtr( pCmdTree ), true ); return VLC_SUCCESS;}
开发者ID:banketree,项目名称:faplayer,代码行数:17,
示例18: CmdResizevoid CtrlResize::CmdResizeResize::execute(){ EvtMotion *pEvtMotion = static_cast<EvtMotion*>(m_pParent->m_pEvt); m_pParent->changeCursor( m_pParent->m_direction ); int newWidth = m_pParent->m_width; newWidth += pEvtMotion->getXPos() - m_pParent->m_xPos; int newHeight = m_pParent->m_height; newHeight += pEvtMotion->getYPos() - m_pParent->m_yPos; // Create a resize command, instead of calling the window manager directly. // Thanks to this trick, the duplicate resizing commands will be trashed // in the asynchronous queue, thus making resizing faster CmdGeneric *pCmd = new CmdResize( m_pParent->getIntf(), m_pParent->m_rWindowManager, m_pParent->m_rLayout, newWidth, newHeight ); // Push the command in the asynchronous command queue AsyncQueue::instance( getIntf() )->push( CmdGenericPtr( pCmd ) );}
开发者ID:0xheart0,项目名称:vlc,代码行数:21,
示例19: cmdint ThemeRepository::changeSkin( vlc_object_t *pIntf, char const *pVariable, vlc_value_t oldval, vlc_value_t newval, void *pData ){ ThemeRepository *pThis = (ThemeRepository*)(pData); if( !strcmp( pVariable, "intf-skins-interactive" ) ) { CmdDlgChangeSkin cmd( pThis->getIntf() ); cmd.execute(); } else if( !strcmp( pVariable, "intf-skins" ) ) { // Try to load the new skin CmdChangeSkin *pCmd = new CmdChangeSkin( pThis->getIntf(), newval.psz_string ); AsyncQueue *pQueue = AsyncQueue::instance( pThis->getIntf() ); pQueue->push( CmdGenericPtr( pCmd ) ); } return VLC_SUCCESS;}
开发者ID:Kafay,项目名称:vlc,代码行数:22,
示例20: Run//---------------------------------------------------------------------------// Run: main loop//---------------------------------------------------------------------------static void Run( intf_thread_t *p_intf ){ // Load a theme ThemeLoader *pLoader = new ThemeLoader( p_intf ); char *skin_last = config_GetPsz( p_intf, "skins2-last" ); if( !skin_last || !*skin_last || !pLoader->load( skin_last ) ) { // Get the resource path and try to load the default skin OSFactory *pOSFactory = OSFactory::instance( p_intf ); const list<string> &resPath = pOSFactory->getResourcePath(); const string &sep = pOSFactory->getDirSeparator(); list<string>::const_iterator it; for( it = resPath.begin(); it != resPath.end(); it++ ) { string path = (*it) + sep + "default.vlt"; if( pLoader->load( path ) ) { // Theme loaded successfully break; } } if( it == resPath.end() ) { // Last chance: the user can select a new theme file if( Dialogs::instance( p_intf ) ) { CmdDlgChangeSkin *pCmd = new CmdDlgChangeSkin( p_intf ); AsyncQueue *pQueue = AsyncQueue::instance( p_intf ); pQueue->push( CmdGenericPtr( pCmd ) ); } else { // No dialogs provider, just quit... CmdQuit *pCmd = new CmdQuit( p_intf ); AsyncQueue *pQueue = AsyncQueue::instance( p_intf ); pQueue->push( CmdGenericPtr( pCmd ) ); msg_Err( p_intf, "Cannot show the /"open skin/" dialog: exiting..."); } } } delete pLoader; if( skin_last ) { free( skin_last ); } // Get the instance of OSLoop OSLoop *loop = OSFactory::instance( p_intf )->getOSLoop(); // Check if we need to start playing if( p_intf->b_play ) { playlist_t *p_playlist = (playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE ); if( p_playlist ) { playlist_Play( p_playlist ); vlc_object_release( p_playlist ); } } // Enter the main event loop loop->run(); // Delete the theme and save the configuration of the windows if( p_intf->p_sys->p_theme ) { p_intf->p_sys->p_theme->saveConfig(); delete p_intf->p_sys->p_theme; p_intf->p_sys->p_theme = NULL; }}
开发者ID:forthyen,项目名称:SDesk,代码行数:80,
示例21: vlc_savecancel//---------------------------------------------------------------------------// Run: main loop//---------------------------------------------------------------------------static void *Run( void * p_obj ){ int canc = vlc_savecancel(); intf_thread_t *p_intf = (intf_thread_t *)p_obj; bool b_error = false; char *skin_last = NULL; ThemeLoader *pLoader = NULL; OSLoop *loop = NULL; vlc_mutex_lock( &p_intf->p_sys->init_lock ); // Initialize singletons if( OSFactory::instance( p_intf ) == NULL ) { msg_Err( p_intf, "cannot initialize OSFactory" ); b_error = true; goto end; } if( AsyncQueue::instance( p_intf ) == NULL ) { msg_Err( p_intf, "cannot initialize AsyncQueue" ); b_error = true; goto end; } if( Interpreter::instance( p_intf ) == NULL ) { msg_Err( p_intf, "cannot instanciate Interpreter" ); b_error = true; goto end; } if( VarManager::instance( p_intf ) == NULL ) { msg_Err( p_intf, "cannot instanciate VarManager" ); b_error = true; goto end; } if( VlcProc::instance( p_intf ) == NULL ) { msg_Err( p_intf, "cannot initialize VLCProc" ); b_error = true; goto end; } if( VoutManager::instance( p_intf ) == NULL ) { msg_Err( p_intf, "cannot instanciate VoutManager" ); b_error = true; goto end; } if( ThemeRepository::instance( p_intf ) == NULL ) { msg_Err( p_intf, "cannot instanciate ThemeRepository" ); b_error = true; goto end; } if( Dialogs::instance( p_intf ) == NULL ) { msg_Err( p_intf, "cannot instanciate qt4 dialogs provider" ); b_error = true; goto end; } // Load a theme skin_last = config_GetPsz( p_intf, "skins2-last" ); pLoader = new ThemeLoader( p_intf ); if( !skin_last || !*skin_last || !pLoader->load( skin_last ) ) { // Get the resource path and try to load the default skin OSFactory *pOSFactory = OSFactory::instance( p_intf ); const list<string> &resPath = pOSFactory->getResourcePath(); const string &sep = pOSFactory->getDirSeparator(); list<string>::const_iterator it; for( it = resPath.begin(); it != resPath.end(); it++ ) { string path = (*it) + sep + "default.vlt"; if( pLoader->load( path ) ) { // Theme loaded successfully break; } } if( it == resPath.end() ) { // Last chance: the user can select a new theme file if( Dialogs::instance( p_intf ) ) { CmdDlgChangeSkin *pCmd = new CmdDlgChangeSkin( p_intf ); AsyncQueue *pQueue = AsyncQueue::instance( p_intf ); pQueue->push( CmdGenericPtr( pCmd ) ); } else { // No dialogs provider, just quit... CmdQuit *pCmd = new CmdQuit( p_intf );//.........这里部分代码省略.........
开发者ID:FLYKingdom,项目名称:vlc,代码行数:101,
示例22: vlc_savecancel//---------------------------------------------------------------------------// Run: main loop//---------------------------------------------------------------------------static void *Run( void * p_obj ){ int canc = vlc_savecancel(); intf_thread_t *p_intf = (intf_thread_t *)p_obj; bool b_error = false; char *skin_last = NULL; ThemeLoader *pLoader = NULL; OSLoop *loop = NULL; vlc_mutex_lock( &p_intf->p_sys->init_lock ); // Initialize singletons if( OSFactory::instance( p_intf ) == NULL ) { msg_Err( p_intf, "cannot initialize OSFactory" ); b_error = true; goto end; } if( AsyncQueue::instance( p_intf ) == NULL ) { msg_Err( p_intf, "cannot initialize AsyncQueue" ); b_error = true; goto end; } if( Interpreter::instance( p_intf ) == NULL ) { msg_Err( p_intf, "cannot instantiate Interpreter" ); b_error = true; goto end; } if( VarManager::instance( p_intf ) == NULL ) { msg_Err( p_intf, "cannot instantiate VarManager" ); b_error = true; goto end; } if( VlcProc::instance( p_intf ) == NULL ) { msg_Err( p_intf, "cannot initialize VLCProc" ); b_error = true; goto end; } if( VoutManager::instance( p_intf ) == NULL ) { msg_Err( p_intf, "cannot instantiate VoutManager" ); b_error = true; goto end; } if( ArtManager::instance( p_intf ) == NULL ) { msg_Err( p_intf, "cannot instantiate ArtManager" ); b_error = true; goto end; } if( ThemeRepository::instance( p_intf ) == NULL ) { msg_Err( p_intf, "cannot instantiate ThemeRepository" ); b_error = true; goto end; } if( Dialogs::instance( p_intf ) == NULL ) { msg_Err( p_intf, "cannot instantiate qt4 dialogs provider" ); b_error = true; goto end; } // Load a theme skin_last = config_GetPsz( p_intf, "skins2-last" ); pLoader = new ThemeLoader( p_intf ); if( !skin_last || !pLoader->load( skin_last ) ) { // No skins (not even the default one). let's quit CmdQuit *pCmd = new CmdQuit( p_intf ); AsyncQueue *pQueue = AsyncQueue::instance( p_intf ); pQueue->push( CmdGenericPtr( pCmd ) ); msg_Err( p_intf, "no skins found : exiting"); } delete pLoader; free( skin_last ); // Get the instance of OSLoop loop = OSFactory::instance( p_intf )->getOSLoop(); // Signal the main thread this thread is now ready p_intf->p_sys->b_error = false; p_intf->p_sys->b_ready = true; vlc_cond_signal( &p_intf->p_sys->init_wait ); vlc_mutex_unlock( &p_intf->p_sys->init_lock ); // Enter the main event loop loop->run();//.........这里部分代码省略.........
开发者ID:vlcchina,项目名称:vlc-player-experimental,代码行数:101,
注:本文中的CmdGenericPtr函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ Cmd_AddCommand函数代码示例 C++ ClrWdt函数代码示例 |