您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ var_InheritBool函数代码示例

51自学网 2021-06-03 09:33:52
  C++
这篇教程C++ var_InheritBool函数代码示例写得很实用,希望能帮到您。

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

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

示例1: DirectXCreatePictureResourceYuv

static int DirectXCreatePictureResourceYuv(vout_display_t *vd,                                           const video_format_t *fmt,                                           DWORD fourcc){    vout_display_sys_t *sys = vd->sys;    bool allow_sysmem  = var_InheritBool(vd, "directx-use-sysmem");    /* As we can't have an overlay, we'll try to create a plain offscreen     * surface. This surface will reside in video memory because there's a     * better chance then that we'll be able to use some kind of hardware     * acceleration like rescaling, blitting or YUV->RGB conversions.     * We then only need to blit this surface onto the main display when we     * want to display it */    /* Check if the chroma is supported first. This is required     * because a few buggy drivers don't mind creating the surface     * even if they don't know about the chroma. */    DWORD count;    if (IDirectDraw2_GetFourCCCodes(sys->ddobject, &count, NULL) != DD_OK)        return VLC_EGENERIC;    DWORD *list = calloc(count, sizeof(*list));    if (!list)        return VLC_ENOMEM;    if (IDirectDraw2_GetFourCCCodes(sys->ddobject, &count, list) != DD_OK) {        free(list);        return VLC_EGENERIC;    }    unsigned index;    for (index = 0; index < count; index++) {        if (list[index] == fourcc)            break;    }    free(list);    if (index >= count)        return VLC_EGENERIC;    /* */    LPDIRECTDRAWSURFACE2 surface;    if (DirectXCreateSurface(vd, &surface, fmt, fourcc, false, allow_sysmem, 0))        return VLC_EGENERIC;    msg_Dbg(vd, "YUV plain surface created successfully");    if (DirectXCheckLockingSurface(surface, surface)) {        DirectXDestroySurface(surface);        return VLC_EGENERIC;    }    /* */    picture_sys_t *picsys = sys->picsys;    picsys->front_surface = surface;    picsys->surface       = surface;    picsys->fallback      = NULL;    return VLC_SUCCESS;}
开发者ID:BtbN,项目名称:vlc,代码行数:56,


示例2: y4m_open

/** * @brief VLC module construct callback * @return */static int y4m_open(vlc_object_t* obj){    filter_t* intf = (filter_t*)obj;    // todo: defer this check until we know if its needed or not    if( !intf->b_allow_fmt_out_change )    {        msg_Err(intf, "picture format change isn't allowed");        return VLC_EGENERIC;    }    filter_sys_t* sys = malloc(sizeof(*sys));    if (unlikely(sys == NULL))        return VLC_ENOMEM;    intf->p_sys = sys;    memset(sys, 0, sizeof(*sys));    sys->cmd = var_InheritString(intf, "y4m-cmd");    if (sys->cmd == NULL)    {        msg_Err(intf, "argument parse failed");        free(sys);        return VLC_EGENERIC;    }    sys->echo = var_InheritBool(intf, "y4m-echo");    sys->stdin = -1;    sys->stdout = -1;    sys->bufferRatio = 1;    msg_Info(intf, "open");    sys->inputFifo = picture_fifo_New();    sys->outputFifo = picture_fifo_New();    vlc_cond_init(&sys->inputCond);    vlc_cond_init(&sys->outputCond);    vlc_mutex_init(&sys->inputMutex);    vlc_mutex_init(&sys->outputMutex);    intf->pf_video_filter = y4m_filter;    intf->pf_flush = y4m_flush;    // todo: the conversion needed isn't known until    // a frame is read back from the filter, for now    // filters in/out format needs to be the same    //intf->fmt_out.video.i_frame_rate *= 2;    //intf->fmt_out.i_codec = VLC_CODEC_I420;    //intf->fmt_out.video.i_chroma = VLC_CODEC_I420;    return VLC_SUCCESS;}
开发者ID:walisser,项目名称:vlc-filter-pipe,代码行数:58,


示例3: access_fsdir_init

void access_fsdir_init(struct access_fsdir *p_fsdir,                       access_t *p_access, input_item_node_t *p_node){    p_fsdir->p_node = p_node;    p_fsdir->b_show_hiddenfiles = var_InheritBool(p_access, "show-hiddenfiles");    p_fsdir->psz_ignored_exts = var_InheritString(p_access, "ignore-filetypes");    p_fsdir->psz_sort = var_InheritString(p_access, "directory-sort");    p_fsdir->i_sub_autodetect_fuzzy =        var_InheritInteger(p_access, "sub-autodetect-fuzzy");    TAB_INIT(p_fsdir->i_slaves, p_fsdir->pp_slaves);}
开发者ID:0xheart0,项目名称:vlc,代码行数:11,


示例4: VoutOsdSnapshot

/** * This function will display the name and a PIP of the provided snapshot */static void VoutOsdSnapshot( vout_thread_t *p_vout, picture_t *p_pic, const char *psz_filename ){    msg_Dbg( p_vout, "snapshot taken (%s)", psz_filename );    vout_OSDMessage( p_vout, SPU_DEFAULT_CHANNEL, "%s", psz_filename );    if( var_InheritBool( p_vout, "snapshot-preview" ) )    {        if( VoutSnapshotPip( p_vout, p_pic ) )            msg_Warn( p_vout, "Failed to display snapshot" );    }}
开发者ID:metakermit,项目名称:vlc,代码行数:14,


示例5: assert

/***************************************************************************** * sout_NewInstance: creates a new stream output instance *****************************************************************************/sout_instance_t *sout_NewInstance( vlc_object_t *p_parent, const char *psz_dest ){    sout_instance_t *p_sout;    char *psz_chain;    assert( psz_dest != NULL );    if( psz_dest[0] == '#' )    {        psz_chain = strdup( &psz_dest[1] );    }    else    {        psz_chain = sout_stream_url_to_chain(            var_InheritBool(p_parent, "sout-display"), psz_dest );    }    if(!psz_chain)        return NULL;    /* *** Allocate descriptor *** */    p_sout = vlc_custom_create( p_parent, sizeof( *p_sout ), "stream output" );    if( p_sout == NULL )    {        free( psz_chain );        return NULL;    }    msg_Dbg( p_sout, "using sout chain=`%s'", psz_chain );    /* *** init descriptor *** */    p_sout->psz_sout    = strdup( psz_dest );    p_sout->i_out_pace_nocontrol = 0;    vlc_mutex_init( &p_sout->lock );    p_sout->p_stream = NULL;    var_Create( p_sout, "sout-mux-caching", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );    p_sout->p_stream = sout_StreamChainNew( p_sout, psz_chain, NULL, NULL );    if( p_sout->p_stream )    {        free( psz_chain );        return p_sout;    }    msg_Err( p_sout, "stream chain failed for `%s'", psz_chain );    free( psz_chain );    FREENULL( p_sout->psz_sout );    vlc_mutex_destroy( &p_sout->lock );    vlc_object_release( p_sout );    return NULL;}
开发者ID:LTNGlobal-opensource,项目名称:vlc-sdi,代码行数:57,


示例6: WindowOpen

static int WindowOpen( vlc_object_t *p_obj ){    vout_window_t *p_wnd = (vout_window_t*)p_obj;    /* */    if( p_wnd->cfg->is_standalone )        return VLC_EGENERIC;#if defined (Q_WS_X11)    if( var_InheritBool( p_obj, "video-wallpaper" ) )        return VLC_EGENERIC;#endif    vlc_value_t val;    if( var_Inherit( p_obj, "qt4-iface", VLC_VAR_ADDRESS, &val ) )        val.p_address = NULL;    intf_thread_t *p_intf = (intf_thread_t *)val.p_address;    if( !p_intf )    {   /* If another interface is used, this plugin cannot work */        msg_Dbg( p_obj, "Qt4 interface not found" );        return VLC_EGENERIC;    }    QMutexLocker locker (&lock);    if (unlikely(!active))        return VLC_EGENERIC;    MainInterface *p_mi = p_intf->p_sys->p_mi;    msg_Dbg( p_obj, "requesting video..." );    int i_x = p_wnd->cfg->x;    int i_y = p_wnd->cfg->y;    unsigned i_width = p_wnd->cfg->width;    unsigned i_height = p_wnd->cfg->height;#if defined (Q_WS_X11)    p_wnd->handle.xid = p_mi->getVideo( &i_x, &i_y, &i_width, &i_height );    if( !p_wnd->handle.xid )        return VLC_EGENERIC;    p_wnd->display.x11 = x11_display;#elif defined (Q_WS_WIN)    p_wnd->handle.hwnd = p_mi->getVideo( &i_x, &i_y, &i_width, &i_height );    if( !p_wnd->handle.hwnd )        return VLC_EGENERIC;#else# error FIXME#endif    p_wnd->control = WindowControl;    p_wnd->sys = (vout_window_sys_t*)p_mi;    return VLC_SUCCESS;}
开发者ID:cobr123,项目名称:qtVlc,代码行数:54,


示例7: vlc_custom_create

vout_window_t *vout_window_New(vlc_object_t *obj,                               const char *module,                               const vout_window_cfg_t *cfg){    window_t *w = vlc_custom_create(obj, sizeof(*w), "window");    vout_window_t *window = &w->wnd;    memset(&window->handle, 0, sizeof(window->handle));    window->control = NULL;    window->sys = NULL;    const char *type;    switch (cfg->type) {#if defined(WIN32) || defined(__OS2__)    case VOUT_WINDOW_TYPE_HWND:        type = "vout window hwnd";        window->handle.hwnd = NULL;        break;#endif#ifdef __APPLE__    case VOUT_WINDOW_TYPE_NSOBJECT:        type = "vout window nsobject";        window->handle.nsobject = NULL;        break;#endif    case VOUT_WINDOW_TYPE_XID:        type = "vout window xid";        window->handle.xid = 0;        window->display.x11 = NULL;        break;    default:        assert(0);    }    w->module = vlc_module_load(window, type, module, module && *module,                                vout_window_start, window, cfg);    if (!w->module) {        vlc_object_release(window);        return NULL;    }    /* Hook for screensaver inhibition */    if (var_InheritBool(obj, "disable-screensaver") &&        cfg->type == VOUT_WINDOW_TYPE_XID) {        w->inhibit = vlc_inhibit_Create(VLC_OBJECT (window),                                        window->handle.xid);        if (w->inhibit != NULL)            vlc_inhibit_Set(w->inhibit, true);            /* FIXME: ^ wait for vout activation, pause */    }    else        w->inhibit = NULL;    return window;}
开发者ID:CSRedRat,项目名称:vlc,代码行数:54,


示例8: Open

/***************************************************************************** * Activate: initialize and create stuff *****************************************************************************/static int Open(vlc_object_t *object){    intf_thread_t *intf = (intf_thread_t*)object;    intf_sys_t    *sys;    int fd;    if (!var_InheritBool(intf, "netsync-master")) {        char *psz_master = var_InheritString(intf, "netsync-master-ip");        if (psz_master == NULL) {            msg_Err(intf, "master address not specified");            return VLC_EGENERIC;        }        fd = net_ConnectUDP(VLC_OBJECT(intf), psz_master, NETSYNC_PORT, -1);        free(psz_master);    } else {        fd = net_ListenUDP1(VLC_OBJECT(intf), NULL, NETSYNC_PORT);    }    if (fd == -1) {        msg_Err(intf, "Netsync socket failure");        return VLC_EGENERIC;    }    intf->pf_run = NULL;    intf->p_sys = sys = malloc(sizeof(*sys));    if (!sys) {        net_Close(fd);        return VLC_ENOMEM;    }    sys->fd = fd;    sys->is_master = var_InheritBool(intf, "netsync-master");    sys->timeout = var_InheritInteger(intf, "netsync-timeout");    if (sys->timeout < 500)        sys->timeout = 500;    sys->playlist = pl_Get(intf);    sys->input = NULL;    var_AddCallback(sys->playlist, "input-current", PlaylistEvent, intf);    return VLC_SUCCESS;}
开发者ID:CSRedRat,项目名称:vlc,代码行数:44,


示例9: Demux

static int Demux( demux_t *p_demux ){    xml_reader_t *p_xml_reader = NULL;    const char *node;    int i_ret = -1;    input_item_t *p_current_input = GetCurrentItem(p_demux);    input_item_node_t *p_input_node = NULL;    p_xml_reader = xml_ReaderCreate( p_demux, p_demux->s );    if( !p_xml_reader )        goto error;    /* check root node */    if( xml_ReaderNextNode( p_xml_reader, &node ) != XML_READER_STARTELEM )    {        msg_Err( p_demux, "invalid file (no root node)" );        goto error;    }    if( strcmp( node, "genrelist" ) && strcmp( node, "stationlist" ) )    {        msg_Err( p_demux, "invalid root node <%s>", node );        goto error;    }    p_input_node = input_item_node_Create( p_current_input );    if( !strcmp( node, "genrelist" ) )    {        /* we're reading a genre list */        if( DemuxGenre( p_demux, p_xml_reader, p_input_node ) )            goto error;    }    else    {        /* we're reading a station list */        if( DemuxStation( p_demux, p_xml_reader, p_input_node,                var_InheritBool( p_demux, "shoutcast-show-adult" ) ) )            goto error;    }    input_item_node_PostAndDelete( p_input_node );    p_input_node = NULL;    i_ret = 0; /* Needed for correct operation of go back */error:    if( p_xml_reader )        xml_ReaderDelete( p_xml_reader );    if( p_input_node ) input_item_node_Delete( p_input_node );    vlc_gc_decref(p_current_input);    return i_ret;}
开发者ID:vlcchina,项目名称:vlc-player-experimental,代码行数:53,


示例10: QVLCDialog

AboutDialog::AboutDialog( intf_thread_t *_p_intf)            : QVLCDialog( (QWidget*)_p_intf->p_sys->p_mi, _p_intf ){    /* Build UI */    ui.setupUi( this );    ui.closeButtonBox->addButton(        new QPushButton( qtr("&Close"), this ), QDialogButtonBox::RejectRole );    setWindowTitle( qtr( "About" ) );    setWindowRole( "vlc-about" );    setMinimumSize( 600, 500 );    resize( 600, 500 );    setWindowModality( Qt::WindowModal );    CONNECT( ui.closeButtonBox, rejected(), this, close() );    ui.closeButtonBox->setFocus();    ui.introduction->setText(            qtr( "VLC media player" ) + qfu( " " VERSION_MESSAGE ) );    if( QDate::currentDate().dayOfYear() >= QT_XMAS_JOKE_DAY && var_InheritBool( p_intf, "qt-icon-change" ) )        ui.iconVLC->setPixmap( QPixmap( ":/logo/vlc128-xmas.png" ) );    else        ui.iconVLC->setPixmap( QPixmap( ":/logo/vlc128.png" ) );    /* Main Introduction */    ui.infoLabel->setText(            qtr( "VLC media player is a free media player, "                "encoder and streamer that can read from files, "                "CDs, DVDs, network streams, capture cards and even more!/n"                "VLC uses its internal codecs and works on essentially every "                "popular platform./n/n" )            + qtr( "This version of VLC was compiled by:/n " )            + qfu( VLC_CompileBy() )+ " on " + qfu( VLC_CompileHost() ) +            + " ("__DATE__" "__TIME__")./n"            + qtr( "Compiler: " ) + qfu( VLC_Compiler() ) + "./n"            + qtr( "You are using the Qt Interface./n/n" )            + qtr( "Copyright (C) " ) + COPYRIGHT_YEARS            + qtr( " by the VideoLAN Team./n" )            + "<a href=/"http://www.videolan.org/">http://www.videolan.org</a>" );    /* Be translators friendly: Convert to rich text */    ui.infoLabel->setText( ui.infoLabel->text().replace( "/n", "<br/>" ) );    /* GPL License */    ui.licenseEdit->setText( qfu( psz_license ) );    /* People who helped */    ui.thanksEdit->setText( qfu( psz_thanks ) );    /* People who wrote the software */    ui.authorsEdit->setText( qfu( psz_authors ) );}
开发者ID:Mettbrot,项目名称:vlc,代码行数:53,


示例11: config_PrintHelp

/** * Checks for help command line options such as --help or --version. * If one is found, print the corresponding text. * /return true if a command line options caused some help message to be * printed, false otherwise.  */bool config_PrintHelp (vlc_object_t *obj){    char *str;    /* Check for short help option */    if (var_InheritBool (obj, "help"))    {        Help (obj, "help");        return true;    }    /* Check for version option */    if (var_InheritBool (obj, "version"))    {        Version();        return true;    }    /* Check for help on modules */    str = var_InheritString (obj, "module");    if (str != NULL)    {        Help (obj, str);        free (str);        return true;    }    /* Check for full help option */    if (var_InheritBool (obj, "full-help"))    {        var_Create (obj, "advanced", VLC_VAR_BOOL);        var_SetBool (obj, "advanced", true);        var_Create (obj, "help-verbose", VLC_VAR_BOOL);        var_SetBool (obj, "help-verbose", true);        Help (obj, "full-help");        return true;    }    /* Check for long help option */    if (var_InheritBool (obj, "longhelp"))    {        Help (obj, "longhelp");        return true;    }    /* Check for module list option */    if (var_InheritBool (obj, "list"))    {        ListModules (obj, false );        return true;    }    if (var_InheritBool (obj, "list-verbose"))    {        ListModules (obj, true);        return true;    }    return false;}
开发者ID:0xheart0,项目名称:vlc,代码行数:66,


示例12: p_demux

/***************************************************************************** * Ebml Stream parser *****************************************************************************/EbmlParser::EbmlParser( EbmlStream *es, EbmlElement *el_start, demux_t *p_demux ) :    p_demux( p_demux ),    m_es( es ),    mi_level( 1 ),    m_got( NULL ),    mi_user_level( 1 ),    mb_keep( false ){    mi_remain_size[0] = el_start->GetSize();    memset( m_el, 0, 6 * sizeof( *m_el ) );    m_el[0] = el_start;    mb_dummy = var_InheritBool( p_demux, "mkv-use-dummy" );}
开发者ID:fabsther,项目名称:vlc-mort,代码行数:16,


示例13: Run

/***************************************************************************** * Run: interface thread *****************************************************************************/static void Run( intf_thread_t *p_intf ){    intf_sys_t sys;    SERVICE_TABLE_ENTRY dispatchTable[] =    {        { (LPTSTR)VLCSERVICENAME, &ServiceDispatch },        { NULL, NULL }    };    int canc = vlc_savecancel();    p_global_intf = p_intf;    p_intf->p_sys = &sys;    p_intf->p_sys->psz_service = var_InheritString( p_intf, "ntservice-name" );    p_intf->p_sys->psz_service = p_intf->p_sys->psz_service ?        p_intf->p_sys->psz_service : strdup(VLCSERVICENAME);    if( var_InheritBool( p_intf, "ntservice-install" ) )    {        NTServiceInstall( p_intf );        return;    }    if( var_InheritBool( p_intf, "ntservice-uninstall" ) )    {        NTServiceUninstall( p_intf );        return;    }    if( StartServiceCtrlDispatcher( dispatchTable ) == 0 )    {        msg_Err( p_intf, "StartServiceCtrlDispatcher failed" ); /* str review */    }    free( p_intf->p_sys->psz_service );    /* Make sure we exit (In case other interfaces have been spawned) */    libvlc_Quit( p_intf->p_libvlc );    vlc_restorecancel( canc );}
开发者ID:vlcchina,项目名称:vlc-player-experimental,代码行数:42,


示例14: WindowOpen

static 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,


示例15: while

void EbmlParser::Reset( demux_t *p_demux ){    while ( mi_level > 0)    {        delete m_el[mi_level];        m_el[mi_level] = NULL;        mi_level--;    }    this->p_demux = p_demux;    mi_user_level = mi_level = 1;    // a little faster and cleaner    m_es->I_O().setFilePointer( static_cast<KaxSegment*>(m_el[0])->GetGlobalPosition(0) );    mb_dummy = var_InheritBool( p_demux, "mkv-use-dummy" );}
开发者ID:fabsther,项目名称:vlc-mort,代码行数:14,


示例16: CtrlGeneric

CtrlVideo::CtrlVideo( intf_thread_t *pIntf, GenericLayout &rLayout,                      bool autoResize, const UString &rHelp,                      VarBool *pVisible ):    CtrlGeneric( pIntf, rHelp, pVisible ), m_rLayout( rLayout ),    m_bAutoResize( autoResize ), m_xShift( 0 ), m_yShift( 0 ),    m_pVoutWindow( NULL ){    VarBool &rFullscreen = VlcProc::instance( getIntf() )->getFullscreenVar();    rFullscreen.addObserver( this );    // if global parameter set to no resize, override skins behavior    if( !var_InheritBool( pIntf, "qt-video-autoresize" ) )        m_bAutoResize = false;}
开发者ID:12307,项目名称:VLC-for-VS2010,代码行数:14,


示例17: TEXT

/***************************************************************************** * Run: interface thread *****************************************************************************/static void *Run( void *data ){    intf_thread_t *p_intf = data;    SERVICE_TABLE_ENTRY dispatchTable[] =    {        { TEXT(VLCSERVICENAME), &ServiceDispatch },        { NULL, NULL }    };    p_global_intf = p_intf;    p_intf->p_sys->psz_service = var_InheritString( p_intf, "ntservice-name" );    p_intf->p_sys->psz_service = p_intf->p_sys->psz_service ?        p_intf->p_sys->psz_service : strdup(VLCSERVICENAME);    if( var_InheritBool( p_intf, "ntservice-install" ) )    {        NTServiceInstall( p_intf );        return NULL;    }    if( var_InheritBool( p_intf, "ntservice-uninstall" ) )    {        NTServiceUninstall( p_intf );        return NULL;    }    if( StartServiceCtrlDispatcher( dispatchTable ) == 0 )    {        msg_Err( p_intf, "StartServiceCtrlDispatcher failed" ); /* str review */    }    free( p_intf->p_sys->psz_service );    /* Make sure we exit (In case other interfaces have been spawned) */    libvlc_Quit( p_intf->p_libvlc );    return NULL;}
开发者ID:qdk0901,项目名称:vlc,代码行数:40,


示例18: OpenFilter

/***************************************************************************** * OpenFilter: *****************************************************************************/static int OpenFilter( vlc_object_t *p_this ){    filter_t *p_filter = (filter_t *)p_this;    filter_sys_t *p_sys;    unsigned int i_out_rate  = p_filter->fmt_out.audio.i_rate;    if ( p_filter->fmt_in.audio.i_rate == p_filter->fmt_out.audio.i_rate      || p_filter->fmt_in.audio.i_format != p_filter->fmt_out.audio.i_format      || p_filter->fmt_in.audio.i_physical_channels              != p_filter->fmt_out.audio.i_physical_channels      || p_filter->fmt_in.audio.i_original_channels              != p_filter->fmt_out.audio.i_original_channels      || p_filter->fmt_in.audio.i_format != VLC_CODEC_FL32 )    {        return VLC_EGENERIC;    }#if !defined( SYS_DARWIN )    if( !var_InheritBool( p_this, "hq-resampling" ) )    {        return VLC_EGENERIC;    }#endif    /* Allocate the memory needed to store the module's structure */    p_filter->p_sys = p_sys = malloc( sizeof(struct filter_sys_t) );    if( p_sys == NULL )        return VLC_ENOMEM;    p_sys->p_buf = NULL;    p_sys->i_buf_size = 0;    p_sys->i_old_wing = 0;    p_sys->b_first = true;    p_filter->pf_audio_filter = Resample;    msg_Dbg( p_this, "%4.4s/%iKHz/%i->%4.4s/%iKHz/%i",             (char *)&p_filter->fmt_in.i_codec,             p_filter->fmt_in.audio.i_rate,             p_filter->fmt_in.audio.i_channels,             (char *)&p_filter->fmt_out.i_codec,             p_filter->fmt_out.audio.i_rate,             p_filter->fmt_out.audio.i_channels);    p_filter->fmt_out = p_filter->fmt_in;    p_filter->fmt_out.audio.i_rate = i_out_rate;    return 0;}
开发者ID:cmassiot,项目名称:vlc-broadcast,代码行数:52,


示例19: QVLCDialog

AboutDialog::AboutDialog( intf_thread_t *_p_intf)            : QVLCDialog( (QWidget*)_p_intf->p_sys->p_mi, _p_intf ), b_advanced( false ){    /* Build UI */    ui.setupUi( this );    setWindowTitle( qtr( "About" ) );    setWindowRole( "vlc-about" );    setWindowModality( Qt::WindowModal );    ui.version->setText(qfu( " " VERSION_MESSAGE ) );    ui.title->setText("<html><head/><body><p><span style=/" font-size:26pt; color:#353535;/"> " + qtr( "VLC media player" ) + " </span></p></body></html>");    ui.MainBlabla->setText("<html><head/><body>" +    qtr( "<p>VLC media player is a free and open source media player, encoder, and streamer made by the volunteers of the <a href=/"http://www.videolan.org//"><span style=/" text-decoration: underline; color:#0057ae;/">VideoLAN</span></a> community.</p><p>VLC uses its internal codecs, works on essentially every popular platform, and can read almost all files, CDs, DVDs, network streams, capture cards and other media formats!</p><p><a href=/"http://www.videolan.org/contribute//"><span style=/" text-decoration: underline; color:#0057ae;/">Help and join us!</span></a>" ) +    "</p></body> </html>");#if 0    if( QDate::currentDate().dayOfYear() >= QT_XMAS_JOKE_DAY && var_InheritBool( p_intf, "qt-icon-change" ) )        ui.iconVLC->setPixmap( QPixmap( ":/logo/vlc128-xmas.png" ) );    else        ui.iconVLC->setPixmap( QPixmap( ":/logo/vlc128.png" ) );#endif#if 0    ifdef UPDATE_CHECK#else    ui.update->hide();#endif    /* GPL License */    ui.licensePage->setText( qfu( psz_license ) );    /* People who helped */    ui.creditPage->setText( qfu( psz_thanks ) );    /* People who wrote the software */    ui.authorsPage->setText( qfu( psz_authors ) );    ui.licenseButton->setText( "<html><head/><body><p><span style=/" text-decoration: underline; color:#0057ae;/">"+qtr( "License" )+"</span></p></body></html>");    ui.licenseButton->installEventFilter( this );    ui.authorsButton->setText( "<html><head/><body><p><span style=/" text-decoration: underline; color:#0057ae;/">"+qtr( "Authors" )+"</span></p></body></html>");    ui.authorsButton->installEventFilter( this );    ui.creditsButton->setText( "<html><head/><body><p><span style=/" text-decoration: underline; color:#0057ae;/">"+qtr( "Credits" )+"</span></p></body></html>");    ui.creditsButton->installEventFilter( this );    ui.version->installEventFilter( this );}
开发者ID:12307,项目名称:VLC-for-VS2010,代码行数:49,


示例20: updateArt

void BackgroundWidget::updateArt( const QString& url ){    if ( !url.isEmpty() )    {        pixmapUrl = url;    }    else    {   /* Xmas joke */        if( QDate::currentDate().dayOfYear() >= QT_XMAS_JOKE_DAY && var_InheritBool( p_intf, "qt-icon-change" ) )            pixmapUrl = QString( ":/logo/vlc128-xmas.png" );        else            pixmapUrl = QString( ":/logo/vlc128.png" );    }    update();}
开发者ID:RodrigoNieves,项目名称:vlc,代码行数:15,


示例21: aout_ReplayGainSelect

/*** Replay gain ***/static float aout_ReplayGainSelect(vlc_object_t *obj, const char *str,                                   const audio_replay_gain_t *replay_gain){    unsigned mode = AUDIO_REPLAY_GAIN_MAX;    if (likely(str != NULL))    {   /* Find selectrf mode */        if (!strcmp (str, "track"))            mode = AUDIO_REPLAY_GAIN_TRACK;        else        if (!strcmp (str, "album"))            mode = AUDIO_REPLAY_GAIN_ALBUM;    }    /* */    float multiplier;    if (mode == AUDIO_REPLAY_GAIN_MAX)    {        multiplier = 1.f;    }    else    {        float gain;        /* If the selectrf mode is not available, prefer the other one */        if (!replay_gain->pb_gain[mode] && replay_gain->pb_gain[!mode])            mode = !mode;        if (replay_gain->pb_gain[mode])            gain = replay_gain->pf_gain[mode]                 + var_InheritFloat (obj, "audio-replay-gain-preamp");        else            gain = var_InheritFloat (obj, "audio-replay-gain-default");        multiplier = pow (10., gain / 20.);        if (replay_gain->pb_peak[mode]         && var_InheritBool (obj, "audio-replay-gain-peak-protection")         && replay_gain->pf_peak[mode] * multiplier > 1.f)            multiplier = 1.f / replay_gain->pf_peak[mode];    }    /* Command line / configuration gain */    multiplier *= var_InheritFloat (obj, "gain");    return multiplier;}
开发者ID:RodrigoNieves,项目名称:vlc,代码行数:49,


示例22: vlc_LogInit

void vlc_LogInit (libvlc_int_t *vlc){    libvlc_priv_t *priv = libvlc_priv (vlc);    const char *str;    if (var_InheritBool (vlc, "quiet"))        priv->log.verbose = -1;    else    if ((str = getenv ("VLC_VERBOSE")) != NULL)        priv->log.verbose = atoi (str);    else        priv->log.verbose = var_InheritInteger (vlc, "verbose");    vlc_rwlock_init (&priv->log.lock);    vlc_LogSet (vlc, NULL, NULL);}
开发者ID:371816210,项目名称:vlc_vlc,代码行数:16,


示例23: RegisterEvents

/** * (Try to) register to mouse events on a window if needed. */static void RegisterEvents (vlc_object_t *obj, xcb_connection_t *conn,                            xcb_window_t wnd){    /* Subscribe to parent window resize events */    uint32_t value = XCB_EVENT_MASK_POINTER_MOTION;    xcb_change_window_attributes (conn, wnd, XCB_CW_EVENT_MASK, &value);    /* Try to subscribe to click events */    /* (only one X11 client can get them, so might not work) */    if (var_InheritBool (obj, "mouse-events"))    {        value |= XCB_EVENT_MASK_BUTTON_PRESS               | XCB_EVENT_MASK_BUTTON_RELEASE;        xcb_change_window_attributes (conn, wnd,                                      XCB_CW_EVENT_MASK, &value);    }}
开发者ID:maniacs-m,项目名称:vlc,代码行数:19,


示例24: var_InheritBool

void VLCModel::ensureArtRequested( const QModelIndex &index ){    if ( index.isValid() && hasChildren( index ) )    {        bool b_access = var_InheritBool( THEPL, "metadata-network-access" );        if ( !b_access ) return;        int nbnodes = rowCount( index );        QModelIndex child;        for( int row = 0 ; row < nbnodes ; row++ )        {            child = index.child( row, COLUMN_COVER );            if ( child.isValid() && child.data().toString().isEmpty() )                THEMIM->getIM()->requestArtUpdate( getInputItem( child ), false );        }    }}
开发者ID:tguillem,项目名称:vlc,代码行数:16,


示例25: SkinObject

WindowManager::WindowManager( intf_thread_t *pIntf ):    SkinObject( pIntf ), m_magnet( 0 ), m_alpha( 255 ), m_moveAlpha( 255 ),    m_opacityEnabled( false ), m_opacity( 255 ), m_direction( kNone ),    m_maximizeRect(0, 0, 50, 50), m_pTooltip( NULL ), m_pPopup( NULL ){    // Create and register a variable for the "on top" status    VarManager *pVarManager = VarManager::instance( getIntf() );    m_cVarOnTop = VariablePtr( new VarBoolImpl( getIntf() ) );    pVarManager->registerVar( m_cVarOnTop, "vlc.isOnTop" );    // transparency switched on or off by user    m_opacityEnabled = var_InheritBool( getIntf(), "skins2-transparency" );    // opacity overridden by user    m_opacity = 255 * var_InheritFloat( getIntf(), "qt-opacity" );}
开发者ID:371816210,项目名称:vlc_vlc,代码行数:16,


示例26: OpenFilter

/***************************************************************************** * OpenFilter: *****************************************************************************/static int OpenFilter( vlc_object_t *p_this ){    filter_t *p_filter = (filter_t *)p_this;    filter_sys_t *p_sys;    /* Activate this filter only with stereo devices */    if( p_filter->fmt_out.audio.i_physical_channels            != (AOUT_CHAN_LEFT|AOUT_CHAN_RIGHT) )    {        msg_Dbg( p_filter, "filter discarded (incompatible format)" );        return VLC_EGENERIC;    }    /* Allocate the memory needed to store the module's structure */    p_sys = p_filter->p_sys = (filter_sys_t *)malloc( sizeof(struct filter_sys_t) );			// sunqueen modify    if( p_sys == NULL )        return VLC_ENOMEM;    p_sys->i_overflow_buffer_size = 0;    p_sys->p_overflow_buffer = NULL;    p_sys->i_nb_atomic_operations = 0;    p_sys->p_atomic_operations = NULL;    if( Init( VLC_OBJECT(p_filter), p_sys                , aout_FormatNbChannels ( &(p_filter->fmt_in.audio) )                , p_filter->fmt_in.audio.i_physical_channels                , p_filter->fmt_in.audio.i_rate ) < 0 )    {        free( p_sys );        return VLC_EGENERIC;    }    /* Request a specific format if not already compatible */    p_filter->fmt_in.audio.i_format = VLC_CODEC_FL32;    p_filter->fmt_out.audio.i_format = VLC_CODEC_FL32;    p_filter->fmt_out.audio.i_rate = p_filter->fmt_in.audio.i_rate;    p_filter->fmt_in.audio.i_original_channels =                                   p_filter->fmt_out.audio.i_original_channels;    if( p_filter->fmt_in.audio.i_physical_channels == AOUT_CHANS_STEREO     && (p_filter->fmt_in.audio.i_original_channels & AOUT_CHAN_DOLBYSTEREO)     && !var_InheritBool( p_filter, "headphone-dolby" ) )    {        p_filter->fmt_in.audio.i_physical_channels = AOUT_CHANS_5_0;    }    p_filter->pf_audio_filter = Convert;    return VLC_SUCCESS;}
开发者ID:WutongEdward,项目名称:vlc-2.1.4.32.subproject-2013,代码行数:50,


示例27: pl_priv

/** * Run the main control thread itself */static void *Thread ( void *data ){    playlist_t *p_playlist = data;    playlist_private_t *p_sys = pl_priv(p_playlist);    PL_LOCK;    while( !p_sys->killed )    {        /* Playlist in stopped state */        assert(p_sys->p_input == NULL);        if( !p_sys->request.b_request )        {            vlc_cond_wait( &p_sys->signal, &p_sys->lock );            continue;        }        while( !p_sys->killed && Next( p_playlist ) )        {   /* Playlist in running state */            assert(p_sys->p_input != NULL);            do                LoopInput( p_playlist );            while( p_sys->p_input != NULL );        }        msg_Dbg( p_playlist, "nothing to play" );        if( var_InheritBool( p_playlist, "play-and-exit" ) )        {            msg_Info( p_playlist, "end of playlist, exiting" );            libvlc_Quit( p_playlist->p_libvlc );        }        /* Destroy any video display now (XXX: ugly hack) */        if( input_resource_HasVout( p_sys->p_input_resource ) )        {            PL_UNLOCK; /* Mind: NO LOCKS while manipulating input resources! */            input_resource_TerminateVout( p_sys->p_input_resource );            PL_LOCK;        }    }    PL_UNLOCK;    input_resource_Terminate( p_sys->p_input_resource );    return NULL;}
开发者ID:0xheart0,项目名称:vlc,代码行数:49,



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


C++ var_InheritFloat函数代码示例
C++ var_GetNonEmptyString函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。