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

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

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

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

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

示例1: sms_Free

void sms_Free( sms_stream_t *sms ){    if( sms->qlevels )    {        for( int n = 0; n < vlc_array_count( sms->qlevels ); n++ )        {            quality_level_t *qlevel = (quality_level_t *)vlc_array_item_at_index( sms->qlevels, n );			// sunqueen modify            if( qlevel ) ql_Free( qlevel );        }        vlc_array_destroy( sms->qlevels );    }    if( sms->chunks )    {        for( int n = 0; n < vlc_array_count( sms->chunks ); n++ )        {            chunk_t *chunk = (chunk_t *)vlc_array_item_at_index( sms->chunks, n );			// sunqueen modify            if( chunk) chunk_Free( chunk );        }        vlc_array_destroy( sms->chunks );    }    free( sms->name );    free( sms->url_template );    free( sms );    sms = NULL;}
开发者ID:WutongEdward,项目名称:vlc-2.1.4.32.subproject-2013,代码行数:27,


示例2: Close

/***************************************************************************** * Close: *****************************************************************************/static void Close(vlc_object_t *p_this){    fingerprinter_thread_t   *p_fingerprinter = (fingerprinter_thread_t*) p_this;    fingerprinter_sys_t *p_sys = p_fingerprinter->p_sys;    vlc_cancel( p_sys->thread );    vlc_join( p_sys->thread, NULL );    vlc_mutex_destroy( &p_sys->condwait.lock );    vlc_cond_destroy( &p_sys->condwait.wait );    for ( int i = 0; i < vlc_array_count( p_sys->incoming.queue ); i++ )        fingerprint_request_Delete( vlc_array_item_at_index( p_sys->incoming.queue, i ) );    vlc_array_destroy( p_sys->incoming.queue );    vlc_mutex_destroy( &p_sys->incoming.lock );    vlc_cond_destroy( &p_sys->incoming_queue_filled );    for ( int i = 0; i < vlc_array_count( p_sys->processing.queue ); i++ )        fingerprint_request_Delete( vlc_array_item_at_index( p_sys->processing.queue, i ) );    vlc_array_destroy( p_sys->processing.queue );    vlc_mutex_destroy( &p_sys->processing.lock );    for ( int i = 0; i < vlc_array_count( p_sys->results.queue ); i++ )        fingerprint_request_Delete( vlc_array_item_at_index( p_sys->results.queue, i ) );    vlc_array_destroy( p_sys->results.queue );    vlc_mutex_destroy( &p_sys->results.lock );    free( p_sys );}
开发者ID:Kubink,项目名称:vlc,代码行数:32,


示例3: Run

static void Run( fingerprinter_thread_t *p_fingerprinter ){    fingerprinter_sys_t *p_sys = p_fingerprinter->p_sys;    /* main loop */    for (;;)    {        vlc_mutex_lock( &p_sys->processing.lock );        mutex_cleanup_push( &p_sys->processing.lock );        vlc_cond_timedwait( &p_sys->incoming_queue_filled, &p_sys->processing.lock, mdate() + 1000000 );        vlc_cleanup_run();        QueueIncomingRequests( p_sys );        vlc_mutex_lock( &p_sys->processing.lock ); // L0        mutex_cleanup_push( &p_sys->processing.lock );        vlc_cleanup_push( cancelRun, p_sys ); // C1//**        for ( p_sys->i = 0 ; p_sys->i < vlc_array_count( p_sys->processing.queue ); p_sys->i++ )        {            fingerprint_request_t *p_data = vlc_array_item_at_index( p_sys->processing.queue, p_sys->i );            acoustid_fingerprint_t acoustid_print;            memset( &acoustid_print , 0, sizeof(acoustid_fingerprint_t) );            vlc_cleanup_push( clearPrint, &acoustid_print ); // C2            p_sys->psz_uri = input_item_GetURI( p_data->p_item );            if ( p_sys->psz_uri )            {                /* overwrite with hint, as in this case, fingerprint's session will be truncated */                if ( p_data->i_duration ) acoustid_print.i_duration = p_data->i_duration;                DoFingerprint( VLC_OBJECT(p_fingerprinter), p_sys, &acoustid_print );                DoAcoustIdWebRequest( VLC_OBJECT(p_fingerprinter), &acoustid_print );                fill_metas_with_results( p_data, &acoustid_print );                FREENULL( p_sys->psz_uri );            }            vlc_cleanup_run( ); // C2            /* copy results */            vlc_mutex_lock( &p_sys->results.lock );            vlc_array_append( p_sys->results.queue, p_data );            vlc_mutex_unlock( &p_sys->results.lock );            vlc_testcancel();        }        if ( vlc_array_count( p_sys->processing.queue ) )        {            var_TriggerCallback( p_fingerprinter, "results-available" );            vlc_array_clear( p_sys->processing.queue );        }        vlc_cleanup_pop( ); // C1//**        vlc_cleanup_run(); // L0    }}
开发者ID:Kubink,项目名称:vlc,代码行数:56,


示例4: libvlc_media_list_internal_add_media

/* LibVLC internal version */void libvlc_media_list_internal_add_media( libvlc_media_list_t * p_mlist,                                           libvlc_media_t * p_md ){    libvlc_media_retain( p_md );    notify_item_addition( p_mlist, p_md, vlc_array_count( &p_mlist->items ),                          EventWillHappen );    vlc_array_append( &p_mlist->items, p_md );    notify_item_addition( p_mlist, p_md, vlc_array_count( &p_mlist->items )-1,                          EventDidHappen );}
开发者ID:Aakash-729,项目名称:vlc,代码行数:12,


示例5: libvlc_event_detach

/************************************************************************** *       libvlc_event_detach (public) : * * Remove a callback for an event. **************************************************************************/void libvlc_event_detach( libvlc_event_manager_t *p_event_manager,                                     libvlc_event_type_t event_type,                                     libvlc_callback_t pf_callback,                                     void *p_user_data ){    libvlc_event_listeners_group_t * listeners_group;    libvlc_event_listener_t * listener;    int i, j;    bool found = false;    vlc_mutex_lock( &p_event_manager->event_sending_lock );    vlc_mutex_lock( &p_event_manager->object_lock );    for( i = 0; i < vlc_array_count(&p_event_manager->listeners_groups); i++)    {        listeners_group = vlc_array_item_at_index(&p_event_manager->listeners_groups, i);        if( listeners_group->event_type == event_type )        {            for( j = 0; j < vlc_array_count(&listeners_group->listeners); j++)            {                listener = vlc_array_item_at_index(&listeners_group->listeners, j);                if( listener->event_type == event_type &&                    listener->pf_callback == pf_callback &&                    listener->p_user_data == p_user_data )                {                    /* that's our listener */                    /* Mark this group as edited so that libvlc_event_send                     * will recheck what listener to call */                    listeners_group->b_sublistener_removed = true;                    free( listener );                    vlc_array_remove( &listeners_group->listeners, j );                    found = true;                    break;                }            }        }    }    vlc_mutex_unlock( &p_event_manager->object_lock );    vlc_mutex_unlock( &p_event_manager->event_sending_lock );    /* Now make sure any pending async event won't get fired after that point */    libvlc_event_listener_t listener_to_remove;    listener_to_remove.event_type  = event_type;    listener_to_remove.pf_callback = pf_callback;    listener_to_remove.p_user_data = p_user_data;    listener_to_remove.is_asynchronous = true;    libvlc_event_async_ensure_listener_removal(p_event_manager, &listener_to_remove);    assert(found);}
开发者ID:AsamQi,项目名称:vlc,代码行数:57,


示例6: _libvlc_media_list_add_media

/* LibVLC internal version */void _libvlc_media_list_add_media(                                   libvlc_media_list_t * p_mlist,                                   libvlc_media_t * p_md,                                   libvlc_exception_t * p_e ){    VLC_UNUSED(p_e);    libvlc_media_retain( p_md );    notify_item_addition( p_mlist, p_md, vlc_array_count( &p_mlist->items ),                          EventWillHappen );    vlc_array_append( &p_mlist->items, p_md );    notify_item_addition( p_mlist, p_md, vlc_array_count( &p_mlist->items )-1,                          EventDidHappen );}
开发者ID:Kafay,项目名称:vlc,代码行数:15,


示例7: stream_extractor_AttachParsed

intstream_extractor_AttachParsed( stream_t** source, char const* data,                               char const** out_extra ){    vlc_array_t identifiers;    if( mrl_FragmentSplit( &identifiers, out_extra, data ) )        return VLC_EGENERIC;    size_t count = vlc_array_count( &identifiers );    size_t idx = 0;    while( idx < count )    {        char* id = vlc_array_item_at_index( &identifiers, idx );        if( vlc_stream_extractor_Attach( source, id, NULL ) )            break;        ++idx;    }    for( size_t i = 0; i < count; ++i )        free( vlc_array_item_at_index( &identifiers, i ) );    vlc_array_clear( &identifiers );    return idx == count ? VLC_SUCCESS : VLC_EGENERIC;}
开发者ID:chouquette,项目名称:vlc,代码行数:28,


示例8: RemoveDirToMonitor

/** * @brief Remove a directory to monitor * @param p_ml A media library object * @param psz_dir the directory to remove * @return VLC_SUCCESS or VLC_EGENERIC */int RemoveDirToMonitor( media_library_t *p_ml, const char *psz_dir ){    assert( p_ml );    char **pp_results = NULL;    int i_cols = 0, i_rows = 0, i_ret = VLC_SUCCESS;    int i;    bool b_recursive = var_CreateGetBool( p_ml, "ml-recursive-scan" );    if( b_recursive )    {        i_ret = Query( p_ml, &pp_results, &i_rows, &i_cols,                          "SELECT media.id FROM media JOIN directories ON "                          "(media.directory_id = directories.id) WHERE "                          "directories.uri LIKE '%q%%'",                          psz_dir );        if( i_ret != VLC_SUCCESS )        {            msg_Err( p_ml, "Error occured while making a query to the database" );            return i_ret;        }        QuerySimple( p_ml, "DELETE FROM directories WHERE uri LIKE '%q%%'",                        psz_dir );    }    else    {        i_ret = Query( p_ml, &pp_results, &i_rows, &i_cols,                          "SELECT media.id FROM media JOIN directories ON "                          "(media.directory_id = directories.id) WHERE "                          "directories.uri = %Q",                          psz_dir );        if( i_ret != VLC_SUCCESS )        {            msg_Err( p_ml, "Error occured while making a query to the database" );            return i_ret;        }        QuerySimple( p_ml, "DELETE FROM directories WHERE uri = %Q",                        psz_dir );    }    vlc_array_t *p_where = vlc_array_new();    for( i = 1; i <= i_rows; i++ )    {        int id = atoi( pp_results[i*i_cols] );        ml_element_t* p_find = ( ml_element_t * ) calloc( 1, sizeof( ml_element_t ) );        p_find->criteria = ML_ID;        p_find->value.i = id;        vlc_array_append( p_where, p_find );    }    Delete( p_ml, p_where );    FreeSQLResult( p_ml, pp_results );    for( i = 0; i < vlc_array_count( p_where ); i++ )    {        free( vlc_array_item_at_index( p_where, i ) );    }    vlc_array_destroy( p_where );    return VLC_SUCCESS;}
开发者ID:CSRedRat,项目名称:vlc,代码行数:66,


示例9: bdsm_SdClose

void bdsm_SdClose (vlc_object_t *p_this){    services_discovery_t *sd = (services_discovery_t *)p_this;    services_discovery_sys_t *p_sys = sd->p_sys;    if( p_sys == NULL )        return;    if( p_sys->p_ns )    {        netbios_ns_discover_stop( p_sys->p_ns );        netbios_ns_destroy( p_sys->p_ns );    }    if( p_sys->p_entry_item_list )    {        for ( int i = 0; i < vlc_array_count( p_sys->p_entry_item_list ); i++ )        {            struct entry_item *p_entry_item;            p_entry_item = vlc_array_item_at_index( p_sys->p_entry_item_list,                                                    i );            vlc_gc_decref( p_entry_item->p_item );            free( p_entry_item );        }        vlc_array_destroy( p_sys->p_entry_item_list );    }    free( p_sys );}
开发者ID:ToBeStrong,项目名称:vlc,代码行数:30,


示例10: next_timeout

/** * Computes the time until the next timeout expiration. * @note Interface lock must be held. * @return The time in milliseconds until the next expiration, *         or -1 if there are no pending timeouts. */static int next_timeout(intf_thread_t *intf){    intf_sys_t *sys = intf->p_sys;    mtime_t next_timeout = LAST_MDATE;    unsigned count = vlc_array_count(sys->p_timeouts);    for (unsigned i = 0; i < count; i++)    {        DBusTimeout *to = vlc_array_item_at_index(sys->p_timeouts, i);        if (!dbus_timeout_get_enabled(to))            continue;        mtime_t *expiry = dbus_timeout_get_data(to);        if (next_timeout > *expiry)            next_timeout = *expiry;    }    if (next_timeout >= LAST_MDATE)        return -1;    next_timeout /= 1000;    if (next_timeout > INT_MAX)        return INT_MAX;    return (int)next_timeout;}
开发者ID:etix,项目名称:vlc,代码行数:35,


示例11: vlc_mutex_lock

char *vlc_http_cookies_fetch(vlc_http_cookie_jar_t *p_jar, bool secure,                             const char *host, const char *path){    int i;    char *psz_cookiebuf = NULL;    vlc_mutex_lock( &p_jar->lock );    for( i = 0; i < vlc_array_count( &p_jar->cookies ); i++ )    {        const http_cookie_t * cookie = vlc_array_item_at_index( &p_jar->cookies, i );        if (cookie_should_be_sent(cookie, secure, host, path))        {            char *psz_updated_buf = NULL;            if ( asprintf(&psz_updated_buf, "%s%s%s=%s",                          psz_cookiebuf ? psz_cookiebuf : "",                          psz_cookiebuf ? "; " : "",                          cookie->psz_name ? cookie->psz_name : "",                          cookie->psz_value ? cookie->psz_value : "") == -1 )            {                // TODO: report error                free( psz_cookiebuf );                vlc_mutex_unlock( &p_jar->lock );                return NULL;            }            free( psz_cookiebuf );            psz_cookiebuf = psz_updated_buf;        }    }    vlc_mutex_unlock( &p_jar->lock );    return psz_cookiebuf;}
开发者ID:0xheart0,项目名称:vlc,代码行数:34,


示例12: vlc_array_count

/** * @brief Insert all medias from an array to the model * @param p_media_array the medias to append * @return see insertMedia * @note if bSignal==true, then it signals only once */int MLModel::insertMediaArray( vlc_array_t *p_media_array,                                     int row, bool bSignal ){    int i_ok = VLC_SUCCESS;    int count = vlc_array_count( p_media_array );    if( !count )        return i_ok;    if( row == -1 )        row = rowCount();    // Signal Qt that we will insert rows    if( bSignal )        beginInsertRows( createIndex( -1, -1 ), row, row + count-1 );    // Loop    for( int i = 0; i < count; ++i )    {        i_ok = insertMedia( (ml_media_t*)            vlc_array_item_at_index( p_media_array, i ), row + i, false );        if( i_ok != VLC_SUCCESS )            break;    }    if( bSignal )        endInsertRows();    return i_ok;}
开发者ID:LDiracDelta,项目名称:vlc_censor_plugin,代码行数:36,


示例13: flat_media_list_view_count

/************************************************************************** *       flat_media_list_view_count  (private) * (called by media_list_view_count) **************************************************************************/static intflat_media_list_view_count( libvlc_media_list_view_t * p_mlv,                            libvlc_exception_t * p_e ){    (void)p_e;    return vlc_array_count( &p_mlv->p_this_view_data->array );}
开发者ID:shanewfx,项目名称:vlc-arib,代码行数:11,


示例14: UpdateTimeouts

/** * UpdateTimeouts() updates the remaining time for each timeout and * returns how much time is left until the next timeout. * * This function must be called with p_sys->lock locked * * @return int The time remaining until the next timeout, in milliseconds * or -1 if there are no timeouts * * @param intf_thread_t *p_intf This interface thread's state * @param mtime_t i_loop_interval The time which has elapsed since the last * call to this function */static int UpdateTimeouts( intf_thread_t *p_intf, mtime_t i_loop_interval ){    intf_sys_t *p_sys = p_intf->p_sys;    mtime_t i_next_timeout = LAST_MDATE;    unsigned int i_timeouts = vlc_array_count( p_sys->p_timeouts );    if( 0 == i_timeouts )        return -1;    for( unsigned int i = 0; i < i_timeouts; i++ )    {        timeout_info_t *p_info = NULL;        DBusTimeout    *p_timeout = NULL;        mtime_t         i_interval = 0;        p_timeout = vlc_array_item_at_index( p_sys->p_timeouts, i );        i_interval = dbus_timeout_get_interval( p_timeout ) * 1000; /* 
C++ vlc_array_item_at_index函数代码示例
C++ vlan_tx_tag_present函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。