• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ VlcProc类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中VlcProc的典型用法代码示例。如果您正苦于以下问题:C++ VlcProc类的具体用法?C++ VlcProc怎么用?C++ VlcProc使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了VlcProc类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: delObservers

void VarText::set( const UString &rText )
{
    // Avoid an infinite loop
    if( rText == m_text )
    {
        return;
    }

    m_text = rText;

    if( m_substVars )
    {
        // Stop observing other variables
        delObservers();

        VlcProc *pVlcProc = VlcProc::instance( getIntf() );
        VarManager *pVarManager = VarManager::instance( getIntf() );

        // Observe needed variables
        if( m_text.find( "$H" ) != UString::npos )
        {
            pVarManager->getHelpText().addObserver( this );
        }
        if( m_text.find( "$T" ) != UString::npos ||
            m_text.find( "$t" ) != UString::npos ||
            m_text.find( "$L" ) != UString::npos ||
            m_text.find( "$l" ) != UString::npos ||
            m_text.find( "$D" ) != UString::npos ||
            m_text.find( "$d" ) != UString::npos )
        {
            pVlcProc->getTimeVar().addObserver( this );
        }
        if( m_text.find( "$V" ) != UString::npos )
        {
            pVlcProc->getVolumeVar().addObserver( this );
        }
        if( m_text.find( "$N" ) != UString::npos )
        {
            pVlcProc->getStreamNameVar().addObserver( this );
        }
        if( m_text.find( "$F" ) != UString::npos )
        {
            pVlcProc->getStreamURIVar().addObserver( this );
        }
        if( m_text.find( "$B" ) != UString::npos )
        {
            pVlcProc->getStreamBitRateVar().addObserver( this );
        }
        if( m_text.find( "$S" ) != UString::npos )
        {
            pVlcProc->getStreamSampleRateVar().addObserver( this );
        }
        if( m_text.find( "$R" ) != UString::npos )
        {
            pVlcProc->getSpeedVar().addObserver( this );
        }
    }

    notify();
}
开发者ID:0xheart0,项目名称:vlc,代码行数:60,代码来源:var_text.cpp


示例2: switch

int 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_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:OneDream,项目名称:faplayer,代码行数:50,代码来源:vlcproc.cpp


示例3: onEqPreampChange

int 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,代码来源:vlcproc.cpp


示例4: onEqBandsChange

int 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,代码来源:vlcproc.cpp


示例5: onItemDelete

int 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,代码来源:vlcproc.cpp


示例6: onItemAppend

int 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,代码来源:vlcproc.cpp


示例7: onItemChange

int 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,代码来源:vlcproc.cpp


示例8: ADD_CALLBACK_ENTRY

int VlcProc::onGenericCallback( 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() );

#define ADD_CALLBACK_ENTRY( var, func, remove ) \
    { \
    if( strcmp( pVariable, var ) == 0 ) \
    { \
        string label = var; \
        CmdGeneric *pCmd = new CmdCallback( pThis->getIntf(), pObj, newVal, \
                                            &VlcProc::func, label ); \
        if( pCmd ) \
            pQueue->push( CmdGenericPtr( pCmd ), remove ); \
        return VLC_SUCCESS; \
    } \
    }

    ADD_CALLBACK_ENTRY( "item-current", on_item_current_changed, false )
    ADD_CALLBACK_ENTRY( "volume", on_volume_changed, true )

    ADD_CALLBACK_ENTRY( "bit-rate", on_bit_rate_changed, false )
    ADD_CALLBACK_ENTRY( "sample-rate", on_sample_rate_changed, false )
    ADD_CALLBACK_ENTRY( "can-record", on_can_record_changed, false )

    ADD_CALLBACK_ENTRY( "random", on_random_changed, false )
    ADD_CALLBACK_ENTRY( "loop", on_loop_changed, false )
    ADD_CALLBACK_ENTRY( "repeat", on_repeat_changed, false )

    ADD_CALLBACK_ENTRY( "audio-filter", on_audio_filter_changed, false )

    ADD_CALLBACK_ENTRY( "intf-toggle-fscontrol", on_intf_show_changed, false )

    ADD_CALLBACK_ENTRY( "mouse-moved", on_mouse_moved_changed, false )

#undef ADD_CALLBACK_ENTRY

    msg_Err( pThis->getIntf(), "no callback entry for %s", pVariable );
    return VLC_EGENERIC;
}
开发者ID:RodrigoNieves,项目名称:vlc,代码行数:43,代码来源:vlcproc.cpp


示例9: getIntf

void VarText::delObservers()
{
    // Stop observing other variables

    VlcProc *pVlcProc = getIntf()->p_sys->p_vlcProc;
    VarManager *pVarManager = getIntf()->p_sys->p_varManager;

    if( pVlcProc )
    {
        pVlcProc->getTimeVar().delObserver( this );
        pVlcProc->getVolumeVar().delObserver( this );
        pVlcProc->getSpeedVar().delObserver( this );
        pVlcProc->getStreamNameVar().delObserver( this );
        pVlcProc->getStreamURIVar().delObserver( this );
        pVlcProc->getStreamBitRateVar().delObserver( this );
        pVlcProc->getStreamSampleRateVar().delObserver( this );
    }

    if( pVarManager )
        pVarManager->getHelpText().delObserver( this );
}
开发者ID:0xheart0,项目名称:vlc,代码行数:21,代码来源:var_text.cpp



注:本文中的VlcProc类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ Vloc类代码示例发布时间:2022-05-31
下一篇:
C++ VkResourceRecord类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap