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

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

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

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

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

示例1: GoAndPreparse

/* Enqueue an item for preparsing, and play it, if needed */static void GoAndPreparse( playlist_t *p_playlist, int i_mode,                           playlist_item_t *p_item ){    PL_ASSERT_LOCKED;    if( (i_mode & PLAYLIST_GO ) )    {        pl_priv(p_playlist)->request.b_request = true;        pl_priv(p_playlist)->request.i_skip = 0;        pl_priv(p_playlist)->request.p_item = p_item;        if( pl_priv(p_playlist)->p_input )            input_Stop( pl_priv(p_playlist)->p_input, true );        pl_priv(p_playlist)->request.i_status = PLAYLIST_RUNNING;        vlc_cond_signal( &pl_priv(p_playlist)->signal );    }    /* Preparse if no artist/album info, and hasn't been preparsed allready       and if user has some preparsing option (auto-preparse variable)       enabled*/    char *psz_artist = input_item_GetArtist( p_item->p_input );    char *psz_album = input_item_GetAlbum( p_item->p_input );    if( pl_priv(p_playlist)->b_auto_preparse &&        input_item_IsPreparsed( p_item->p_input ) == false &&            ( EMPTY_STR( psz_artist ) || ( EMPTY_STR( psz_album ) ) )          )        libvlc_MetaRequest( p_playlist->p_libvlc, p_item->p_input );    free( psz_artist );    free( psz_album );}
开发者ID:Annovae,项目名称:vlc,代码行数:28,


示例2: DoWork

/***************************************************************************** * DoWork: process samples buffer ***************************************************************************** * This function queues the audio buffer to be processed by the goom thread *****************************************************************************/static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,                    aout_buffer_t * p_in_buf, aout_buffer_t * p_out_buf ){    aout_filter_sys_t *p_sys = p_filter->p_sys;    block_t *p_block;    p_out_buf->i_nb_samples = p_in_buf->i_nb_samples;    p_out_buf->i_nb_bytes = p_in_buf->i_nb_bytes;    /* Queue sample */    vlc_mutex_lock( &p_sys->p_thread->lock );    if( p_sys->p_thread->i_blocks == MAX_BLOCKS )    {        vlc_mutex_unlock( &p_sys->p_thread->lock );        return;    }    p_block = block_New( p_sys->p_thread, p_in_buf->i_nb_bytes );    if( !p_block ) return;    memcpy( p_block->p_buffer, p_in_buf->p_buffer, p_in_buf->i_nb_bytes );    p_block->i_pts = p_in_buf->start_date;    p_sys->p_thread->pp_blocks[p_sys->p_thread->i_blocks++] = p_block;    vlc_cond_signal( &p_sys->p_thread->wait );    vlc_mutex_unlock( &p_sys->p_thread->lock );}
开发者ID:forthyen,项目名称:SDesk,代码行数:32,


示例3: msg_Dbg

STDMETHODIMP CapturePin::Receive( IMediaSample *pSample ){#if 0 //def DEBUG_DSHOW    msg_Dbg( p_input, "CapturePin::Receive" );#endif    pSample->AddRef();    mtime_t i_timestamp = mdate() * 10;    VLCMediaSample vlc_sample = {pSample, i_timestamp};    vlc_mutex_lock( &p_sys->lock );    samples_queue.push_front( vlc_sample );    /* Make sure we don't cache too many samples */    if( samples_queue.size() > 10 )    {        vlc_sample = samples_queue.back();        samples_queue.pop_back();        msg_Dbg( p_input, "CapturePin::Receive trashing late input sample" );        vlc_sample.p_sample->Release();    }    vlc_cond_signal( &p_sys->wait );    vlc_mutex_unlock( &p_sys->lock );    return S_OK;}
开发者ID:cmassiot,项目名称:vlc-broadcast,代码行数:27,


示例4: AddDirToMonitor

/** * @brief Add a directory to monitor * @param p_ml This media_library_t object * @param psz_dir the directory to add * @return VLC_SUCCESS or VLC_EGENERIC */int AddDirToMonitor( media_library_t *p_ml, const char *psz_dir ){    assert( p_ml );    /* Verify if we can open the directory */    DIR *dir = vlc_opendir( psz_dir );    if( !dir )    {        int err = errno;        if( err != ENOTDIR )            msg_Err( p_ml, "%s: %m", psz_dir );        else            msg_Dbg( p_ml, "`%s' is not a directory", psz_dir );        errno = err;        return VLC_EGENERIC;    }    closedir( dir );    msg_Dbg( p_ml, "Adding directory `%s' to be monitored", psz_dir );    QuerySimple( p_ml, "INSERT INTO directories ( uri, timestamp, "                          "recursive ) VALUES( %Q, 0, 0 )", psz_dir );    vlc_cond_signal( &p_ml->p_sys->p_mon->wait );    return VLC_SUCCESS;}
开发者ID:CSRedRat,项目名称:vlc,代码行数:31,


示例5: Close

/***************************************************************************** * Close: close the ALSA device *****************************************************************************/static void Close( vlc_object_t *p_this ){    aout_instance_t *p_aout = (aout_instance_t *)p_this;    struct aout_sys_t * p_sys = p_aout->output.p_sys;    int i_snd_rc;    /* Make sure that the thread will stop once it is waken up */    vlc_object_kill( p_aout );    /* make sure the audio output thread is waken up */    vlc_mutex_lock( &p_aout->output.p_sys->lock );    vlc_cond_signal( &p_aout->output.p_sys->wait );    vlc_mutex_unlock( &p_aout->output.p_sys->lock );    /* */    vlc_thread_join( p_aout );    p_aout->b_die = false;    i_snd_rc = snd_pcm_close( p_sys->p_snd_pcm );    if( i_snd_rc > 0 )    {        msg_Err( p_aout, "failed closing ALSA device (%s)",                         snd_strerror( i_snd_rc ) );    }#ifdef ALSA_DEBUG    snd_output_close( p_sys->p_snd_stderr );#endif    free( p_sys );}
开发者ID:FLYKingdom,项目名称:vlc,代码行数:35,


示例6: RandomCallback

static int RandomCallback( vlc_object_t *p_this, char const *psz_cmd,                           vlc_value_t oldval, vlc_value_t newval, void *a ){    (void)psz_cmd; (void)oldval; (void)newval; (void)a;    playlist_t *p_playlist = (playlist_t*)p_this;    bool random = newval.b_bool;    PL_LOCK;    if( !random ) {        pl_priv(p_playlist)->b_reset_currently_playing = true;        vlc_cond_signal( &pl_priv(p_playlist)->signal );    } else {        /* Shuffle and sync the playlist on activation of random mode.         * This preserves the current playing item, so that the user         * can return to it if needed. (See #4472)         */        playlist_private_t *p_sys = pl_priv(p_playlist);        playlist_item_t *p_new = p_sys->status.p_item;        ResetCurrentlyPlaying( p_playlist, NULL );        if( p_new )            ResyncCurrentIndex( p_playlist, p_new );    }    PL_UNLOCK;    return VLC_SUCCESS;}
开发者ID:BossKing,项目名称:vlc,代码行数:27,


示例7: dialog_id_post

static intdialog_id_post(vlc_dialog_id *p_id, struct dialog_answer *p_answer){    vlc_mutex_lock(&p_id->lock);    if (p_answer == NULL)    {        p_id->b_cancelled = true;    }    else    {        p_id->answer = *p_answer;        p_id->b_answered = true;    }    p_id->i_refcount--;    if (p_id->i_refcount > 0)    {        vlc_cond_signal(&p_id->wait);        vlc_mutex_unlock(&p_id->lock);    }    else    {        vlc_mutex_unlock(&p_id->lock);        dialog_id_release(p_id);    }    return VLC_SUCCESS;}
开发者ID:IAPark,项目名称:vlc,代码行数:26,


示例8: GoAndPreparse

/* Enqueue an item for preparsing, and play it, if needed */static void GoAndPreparse( playlist_t *p_playlist, int i_mode,                           playlist_item_t *p_item ){    playlist_private_t *sys = pl_priv(p_playlist);    PL_ASSERT_LOCKED;    if( (i_mode & PLAYLIST_GO ) )    {        sys->request.b_request = true;        sys->request.i_skip = 0;        sys->request.p_item = p_item;        if( sys->p_input != NULL )            input_Stop( sys->p_input );        vlc_cond_signal( &sys->signal );    }    /* Preparse if no artist/album info, and hasn't been preparsed already       and if user has some preparsing option (auto-preparse variable)       enabled*/    char *psz_artist = input_item_GetArtist( p_item->p_input );    char *psz_album = input_item_GetAlbum( p_item->p_input );    if( sys->b_preparse && !input_item_IsPreparsed( p_item->p_input )     && (EMPTY_STR(psz_artist) || EMPTY_STR(psz_album)) )        libvlc_MetadataRequest( p_playlist->obj.libvlc, p_item->p_input, 0, -1,                                NULL );    free( psz_artist );    free( psz_album );}
开发者ID:BossKing,项目名称:vlc,代码行数:29,


示例9: vlc_h2_stream_data

/** Reports received stream data */static int vlc_h2_stream_data(void *ctx, struct vlc_h2_frame *f){    struct vlc_h2_stream *s = ctx;    size_t len;    if (s->recv_end)    {        free(f);        return vlc_h2_stream_fatal(s, VLC_H2_STREAM_CLOSED);    }    /* Enforce the congestion window as required by the protocol spec */    vlc_h2_frame_data_get(f, &len);    if (len > s->recv_cwnd)    {        free(f);        s->recv_end = true;        return vlc_h2_stream_fatal(s, VLC_H2_FLOW_CONTROL_ERROR);    }    s->recv_cwnd -= len;    *(s->recv_tailp) = f;    s->recv_tailp = &f->next;    vlc_cond_signal(&s->recv_wait);    return 0;}
开发者ID:LTNGlobal-opensource,项目名称:vlc-sdi,代码行数:27,


示例10: Close

/***************************************************************************** * Close: close the plugin *****************************************************************************/static void Close( vlc_object_t *p_this ){    aout_filter_t     *p_filter = (aout_filter_t *)p_this;    aout_filter_sys_t *p_sys = p_filter->p_sys;    /* Stop Goom Thread */    p_sys->p_thread->b_die = VLC_TRUE;    vlc_mutex_lock( &p_sys->p_thread->lock );    vlc_cond_signal( &p_sys->p_thread->wait );    vlc_mutex_unlock( &p_sys->p_thread->lock );    vlc_thread_join( p_sys->p_thread );    /* Free data */    vout_Request( p_filter, p_sys->p_thread->p_vout, 0, 0, 0, 0 );    vlc_mutex_destroy( &p_sys->p_thread->lock );    vlc_cond_destroy( &p_sys->p_thread->wait );    vlc_object_detach( p_sys->p_thread );    while( p_sys->p_thread->i_blocks-- )    {        block_Release( p_sys->p_thread->pp_blocks[p_sys->p_thread->i_blocks] );    }    vlc_object_destroy( p_sys->p_thread );    free( p_sys );}
开发者ID:forthyen,项目名称:SDesk,代码行数:32,


示例11: FfmpegThread

static int FfmpegThread( struct thread_context_t *p_context ){    while ( !p_context->b_die && !p_context->b_error )    {        vlc_mutex_lock( &p_context->lock );        while ( !p_context->b_work && !p_context->b_die && !p_context->b_error )        {            vlc_cond_wait( &p_context->cond, &p_context->lock );        }        p_context->b_work = 0;        vlc_mutex_unlock( &p_context->lock );        if ( p_context->b_die || p_context->b_error )            break;        if ( p_context->pf_func )        {            p_context->i_ret = p_context->pf_func( p_context->p_context,                                                   p_context->arg );        }        vlc_mutex_lock( &p_context->lock );        p_context->b_done = 1;        vlc_cond_signal( &p_context->cond );        vlc_mutex_unlock( &p_context->lock );    }    return 0;}
开发者ID:forthyen,项目名称:SDesk,代码行数:28,


示例12: playlist_TreeMoveMany

/** * Moves an array of items * * This function must be entered with the playlist lock * * /param p_playlist the playlist * /param i_items the number of indexes to move * /param pp_items the array of indexes to move * /param p_node the target node * /param i_newpos the target position under this node * /return VLC_SUCCESS or an error */int playlist_TreeMoveMany( playlist_t *p_playlist,                            int i_items, playlist_item_t **pp_items,                            playlist_item_t *p_node, int i_newpos ){    PL_ASSERT_LOCKED;    if ( p_node->i_children == -1 ) return VLC_EGENERIC;    int i;    for( i = 0; i < i_items; i++ )    {        playlist_item_t *p_item = pp_items[i];        int i_index = ItemIndex( p_item );        playlist_item_t *p_parent = p_item->p_parent;        REMOVE_ELEM( p_parent->pp_children, p_parent->i_children, i_index );        if ( p_parent == p_node && i_index < i_newpos ) i_newpos--;    }    for( i = i_items - 1; i >= 0; i-- )    {        playlist_item_t *p_item = pp_items[i];        INSERT_ELEM( p_node->pp_children, p_node->i_children, i_newpos, p_item );        p_item->p_parent = p_node;    }    pl_priv( p_playlist )->b_reset_currently_playing = true;    vlc_cond_signal( &pl_priv( p_playlist )->signal );    return VLC_SUCCESS;}
开发者ID:BossKing,项目名称:vlc,代码行数:40,


示例13: vlc_mutex_lock

/** * This function does the preparsing and issues the art fetching requests */static void *Thread( void *data ){    playlist_preparser_t *p_preparser = data;    vlc_object_t *obj = p_preparser->object;    for( ;; )    {        input_item_t *p_current;        /* */        vlc_mutex_lock( &p_preparser->lock );        if( p_preparser->i_waiting > 0 )        {            p_current = p_preparser->pp_waiting[0];            REMOVE_ELEM( p_preparser->pp_waiting, p_preparser->i_waiting, 0 );        }        else        {            p_current = NULL;            p_preparser->b_live = false;            vlc_cond_signal( &p_preparser->wait );        }        vlc_mutex_unlock( &p_preparser->lock );        if( !p_current )            break;        Preparse( obj, p_current );        Art( p_preparser, p_current );        vlc_gc_decref(p_current);    }    return NULL;}
开发者ID:AsamQi,项目名称:vlc,代码行数:37,


示例14: transcode_video_close

void transcode_video_close( sout_stream_t *p_stream,                                   sout_stream_id_t *id ){    if( p_stream->p_sys->i_threads >= 1 )    {        vlc_mutex_lock( &p_stream->p_sys->lock_out );        vlc_object_kill( p_stream->p_sys );        vlc_cond_signal( &p_stream->p_sys->cond );        vlc_mutex_unlock( &p_stream->p_sys->lock_out );        vlc_thread_join( p_stream->p_sys );        vlc_mutex_destroy( &p_stream->p_sys->lock_out );        vlc_cond_destroy( &p_stream->p_sys->cond );    }    video_timer_close( id->p_encoder );    /* Close decoder */    if( id->p_decoder->p_module )        module_unneed( id->p_decoder, id->p_decoder->p_module );    if( id->p_decoder->p_description )        vlc_meta_Delete( id->p_decoder->p_description );    free( id->p_decoder->p_owner );    /* Close encoder */    if( id->p_encoder->p_module )        module_unneed( id->p_encoder, id->p_encoder->p_module );    /* Close filters */    if( id->p_f_chain )        filter_chain_Delete( id->p_f_chain );    if( id->p_uf_chain )        filter_chain_Delete( id->p_uf_chain );}
开发者ID:iamnpc,项目名称:myfaplayer,代码行数:34,


示例15: Close

/***************************************************************************** * Close: close the plugin *****************************************************************************/static void Close( vlc_object_t *p_this ){    filter_t     *p_filter = (filter_t *)p_this;    filter_sys_t *p_sys = p_filter->p_sys;    /* Stop Goom Thread */    vlc_mutex_lock( &p_sys->p_thread->lock );    p_sys->p_thread->b_exit = true;    vlc_cond_signal( &p_sys->p_thread->wait );    vlc_mutex_unlock( &p_sys->p_thread->lock );    vlc_join( p_sys->p_thread->thread, NULL );    /* Free data */    aout_filter_RequestVout( p_filter, p_sys->p_thread->p_vout, NULL );    vlc_mutex_destroy( &p_sys->p_thread->lock );    vlc_cond_destroy( &p_sys->p_thread->wait );    while( p_sys->p_thread->i_blocks-- )    {        block_Release( p_sys->p_thread->pp_blocks[p_sys->p_thread->i_blocks] );    }    free( p_sys->p_thread );    free( p_sys );}
开发者ID:LTNGlobal-opensource,项目名称:vlc-sdi,代码行数:30,


示例16: Control

/***************************************************************************** * Control: services discrovery control ****************************************************************************/static int Control( services_discovery_t *p_sd, int i_command, va_list args ){    services_discovery_sys_t *p_sys = p_sd->p_sys;    switch( i_command )    {    case SD_CMD_SEARCH:    {        const char *psz_query = va_arg( args, const char * );        vlc_mutex_lock( &p_sys->lock );        TAB_APPEND( p_sys->i_query, p_sys->ppsz_query, strdup( psz_query ) );        vlc_cond_signal( &p_sys->cond );        vlc_mutex_unlock( &p_sys->lock );        break;    }    case SD_CMD_DESCRIPTOR:    {        services_discovery_descriptor_t *p_desc = va_arg( args,                                services_discovery_descriptor_t * );        return FillDescriptor( p_sd, p_desc );    }    }    return VLC_SUCCESS;}
开发者ID:IAPark,项目名称:vlc,代码行数:29,


示例17: HTTPClose

/***************************************************************************** * HTTPClose: Stop the internal HTTP server *****************************************************************************/void HTTPClose( access_t *p_access ){    access_sys_t *p_sys = p_access->p_sys;    if ( p_sys->p_httpd_host != NULL )    {        if ( p_sys->p_httpd_file != NULL )        {            /* Unlock the thread if it is stuck in HttpCallback */            vlc_mutex_lock( &p_sys->httpd_mutex );            if ( p_sys->b_request_frontend_info )            {                p_sys->b_request_frontend_info = false;                p_sys->psz_frontend_info = strdup("");            }            if ( p_sys->b_request_mmi_info )            {                p_sys->b_request_mmi_info = false;                p_sys->psz_mmi_info = strdup("");            }            vlc_cond_signal( &p_sys->httpd_cond );            vlc_mutex_unlock( &p_sys->httpd_mutex );            httpd_FileDelete( p_sys->p_httpd_file->p_file );            httpd_RedirectDelete( p_sys->p_httpd_redir );        }        httpd_HostDelete( p_sys->p_httpd_host );    }    vlc_mutex_destroy( &p_sys->httpd_mutex );    vlc_cond_destroy( &p_sys->httpd_cond );}
开发者ID:Italianmoose,项目名称:Stereoscopic-VLC,代码行数:36,


示例18: vlc_mutex_lock

/***************************************************************************** * DoWork: process samples buffer ***************************************************************************** * This function queues the audio buffer to be processed by the goom thread *****************************************************************************/static block_t *DoWork( filter_t *p_filter, block_t *p_in_buf ){    filter_sys_t *p_sys = p_filter->p_sys;    block_t *p_block;    /* Queue sample */    vlc_mutex_lock( &p_sys->p_thread->lock );    if( p_sys->p_thread->i_blocks == MAX_BLOCKS )    {        vlc_mutex_unlock( &p_sys->p_thread->lock );        return p_in_buf;    }    p_block = block_Alloc( p_in_buf->i_buffer );    if( !p_block )    {        vlc_mutex_unlock( &p_sys->p_thread->lock );        return p_in_buf;    }    memcpy( p_block->p_buffer, p_in_buf->p_buffer, p_in_buf->i_buffer );    p_block->i_pts = p_in_buf->i_pts;    p_sys->p_thread->pp_blocks[p_sys->p_thread->i_blocks++] = p_block;    vlc_cond_signal( &p_sys->p_thread->wait );    vlc_mutex_unlock( &p_sys->p_thread->lock );    return p_in_buf;}
开发者ID:LTNGlobal-opensource,项目名称:vlc-sdi,代码行数:34,


示例19: E_

/***************************************************************************** * CloseEncoder: ffmpeg encoder destruction *****************************************************************************/void E_(CloseEncoder)( vlc_object_t *p_this ){    encoder_t *p_enc = (encoder_t *)p_this;    encoder_sys_t *p_sys = p_enc->p_sys;#if LIBAVCODEC_BUILD >= 4702    if ( p_sys->b_inited && p_enc->i_threads >= 1 )    {        int i;        struct thread_context_t ** pp_contexts =                (struct thread_context_t **)p_sys->p_context->thread_opaque;        for ( i = 0; i < p_enc->i_threads; i++ )        {            pp_contexts[i]->b_die = 1;            vlc_cond_signal( &pp_contexts[i]->cond );            vlc_thread_join( pp_contexts[i] );            vlc_mutex_destroy( &pp_contexts[i]->lock );            vlc_cond_destroy( &pp_contexts[i]->cond );            vlc_object_destroy( pp_contexts[i] );        }        free( pp_contexts );    }#endif    avcodec_close( p_sys->p_context );    av_free( p_sys->p_context );    if( p_sys->p_buffer ) free( p_sys->p_buffer );    if( p_sys->p_buffer_out ) free( p_sys->p_buffer_out );    free( p_sys );}
开发者ID:forthyen,项目名称:SDesk,代码行数:36,


示例20: background_worker_RequestProbe

void background_worker_RequestProbe( struct background_worker* worker ){    vlc_mutex_lock( &worker->lock );    worker->head.probe_request = true;    vlc_cond_signal( &worker->head.worker_wait );    vlc_mutex_unlock( &worker->lock );}
开发者ID:tguillem,项目名称:vlc,代码行数:7,


示例21: Stop

/** * Closes the audio device. */static HRESULT Stop( aout_stream_sys_t *p_sys ){    vlc_mutex_lock( &p_sys->lock );    p_sys->b_playing =  true;    vlc_cond_signal( &p_sys->cond );    vlc_mutex_unlock( &p_sys->lock );    vlc_cancel( p_sys->eraser_thread );    vlc_join( p_sys->eraser_thread, NULL );    vlc_cond_destroy( &p_sys->cond );    vlc_mutex_destroy( &p_sys->lock );    if( p_sys->p_notify != NULL )    {        IDirectSoundNotify_Release(p_sys->p_notify );        p_sys->p_notify = NULL;    }    if( p_sys->p_dsbuffer != NULL )    {        IDirectSoundBuffer_Stop( p_sys->p_dsbuffer );        IDirectSoundBuffer_Release( p_sys->p_dsbuffer );        p_sys->p_dsbuffer = NULL;    }    if( p_sys->p_dsobject != NULL )    {        IDirectSound_Release( p_sys->p_dsobject );        p_sys->p_dsobject = NULL;    }    return DS_OK;}
开发者ID:videolan,项目名称:vlc,代码行数:32,


示例22: Play

static HRESULT Play( vlc_object_t *obj, aout_stream_sys_t *sys,                     block_t *p_buffer ){    HRESULT dsresult;    dsresult = FillBuffer( obj, sys, p_buffer );    if( dsresult != DS_OK )        return dsresult;    /* start playing the buffer */    dsresult = IDirectSoundBuffer_Play( sys->p_dsbuffer, 0, 0,                                        DSBPLAY_LOOPING );    if( dsresult == DSERR_BUFFERLOST )    {        IDirectSoundBuffer_Restore( sys->p_dsbuffer );        dsresult = IDirectSoundBuffer_Play( sys->p_dsbuffer,                                            0, 0, DSBPLAY_LOOPING );    }    if( dsresult != DS_OK )        msg_Err( obj, "cannot start playing buffer: (hr=0x%0lx)", dsresult );    else    {        vlc_mutex_lock( &sys->lock );        sys->b_playing = true;        vlc_cond_signal(&sys->cond);        vlc_mutex_unlock( &sys->lock );    }    return dsresult;}
开发者ID:videolan,项目名称:vlc,代码行数:29,


示例23: EnqueueRequest

static void EnqueueRequest( fingerprinter_thread_t *f, fingerprint_request_t *r ){    fingerprinter_sys_t *p_sys = f->p_sys;    vlc_mutex_lock( &p_sys->incoming.lock );    vlc_array_append( p_sys->incoming.queue, r );    vlc_mutex_unlock( &p_sys->incoming.lock );    vlc_cond_signal( &p_sys->incoming_queue_filled );}
开发者ID:Kubink,项目名称:vlc,代码行数:8,


示例24: outputThread

/** * @brief Thread reading frames from the subprocess */static void* outputThread(void* userData){    filter_t*    intf = (filter_t*)userData;    filter_sys_t* sys = intf->p_sys;    msg_Info(intf, "outputThread: enter");    bool gotHeader = false;    while (true)    {        if (!gotHeader)        {            video_format_Init(&sys->outFormat, VLC_CODEC_I420);            if (1 != readY4mHeader(intf, &sys->outFormat, sys->stdout))                break;            gotHeader = true;        }        picture_t* outPic = picture_NewFromFormat(&sys->outFormat);        if(1 != readY4mFrame(intf, outPic, sys->stdout))        {            picture_Release(outPic);            break;        }        //msg_Info(intf, "outputThread: read picture");        // fixme: deinterlace filter does this, not sure if we need to;        // y4m header contains this information        outPic->b_progressive = true;        outPic->i_nb_fields = 2;        picture_fifo_Push(sys->outputFifo, outPic);        vlc_cond_signal(&sys->outputCond);    }    msg_Info(intf, "outputThread: exit");    sys->threadExit = true;    vlc_cond_signal(&sys->outputCond);    return userData;}
开发者ID:walisser,项目名称:vlc-filter-pipe,代码行数:48,


示例25: thumbnailer_callback_cancel

static void thumbnailer_callback_cancel( void* data, picture_t* p_thumbnail ){    struct test_ctx* p_ctx = data;    assert( p_thumbnail == NULL );    vlc_mutex_lock( &p_ctx->lock );    p_ctx->b_done = true;    vlc_mutex_unlock( &p_ctx->lock );    vlc_cond_signal( &p_ctx->cond );}
开发者ID:mstorsjo,项目名称:vlc,代码行数:9,


示例26: callback

static void callback (void *ptr){    struct timer_data *data = ptr;    vlc_mutex_lock (&data->lock);    data->count += 1 + vlc_timer_getoverrun (data->timer);    vlc_cond_signal (&data->wait);    vlc_mutex_unlock (&data->lock);}
开发者ID:0xheart0,项目名称:vlc,代码行数:9,


示例27: fill_output_port

static picture_t *deinterlace(filter_t *filter, picture_t *picture){    filter_sys_t *sys = filter->p_sys;    MMAL_BUFFER_HEADER_T *buffer;    picture_t *out_picture = NULL;    picture_t *ret = NULL;    MMAL_STATUS_T status;    unsigned i = 0;    fill_output_port(filter);    buffer = picture->p_sys->buffer;    buffer->user_data = picture;    buffer->pts = picture->date;    buffer->cmd = 0;    if (!picture->p_sys->displayed) {        vlc_mutex_lock(&sys->buffer_cond_mutex);        status = mmal_port_send_buffer(sys->input, buffer);        if (status != MMAL_SUCCESS) {            msg_Err(filter, "Failed to send buffer to input port (status=%"PRIx32" %s)",                    status, mmal_status_to_string(status));            picture_Release(picture);        } else {            picture->p_sys->displayed = true;            atomic_fetch_add(&sys->input_in_transit, 1);            vlc_cond_signal(&sys->buffer_cond);        }        vlc_mutex_unlock(&sys->buffer_cond_mutex);    } else {        picture_Release(picture);    }    /*     * Send output buffers     */    while(atomic_load(&sys->started) && i < 2) {        if (buffer = mmal_queue_timedwait(sys->filtered_pictures, 2000)) {            i++;            if (!out_picture) {                out_picture = (picture_t *)buffer->user_data;                ret = out_picture;            } else {                out_picture->p_next = (picture_t *)buffer->user_data;                out_picture = out_picture->p_next;            }            out_picture->date = buffer->pts;        } else {            msg_Dbg(filter, "Failed waiting for filtered picture");            break;        }    }    if (out_picture)        out_picture->p_next = NULL;    return ret;}
开发者ID:adelwin,项目名称:vlc,代码行数:57,


示例28: vlc_h2_stream_wake_up

static void vlc_h2_stream_wake_up(void *data){    struct vlc_h2_stream *s = data;    struct vlc_h2_conn *conn = s->conn;    vlc_mutex_lock(&conn->lock);    s->interrupted = true;    vlc_cond_signal(&s->recv_wait);    vlc_mutex_unlock(&conn->lock);}
开发者ID:LTNGlobal-opensource,项目名称:vlc-sdi,代码行数:10,


示例29: inputStateCallback

static int inputStateCallback( vlc_object_t *obj, const char *var,                               vlc_value_t old, vlc_value_t cur, void *p_data ){    VLC_UNUSED(obj);VLC_UNUSED(var);VLC_UNUSED(old);    fingerprinter_sys_t *p_sys = (fingerprinter_sys_t *) p_data;    if ( cur.i_int != INPUT_EVENT_STATE ) return VLC_SUCCESS;    p_sys->condwait.i_input_state = var_GetInteger( p_sys->p_input, "state" );    vlc_cond_signal( & p_sys->condwait.wait );    return VLC_SUCCESS;}
开发者ID:Kubink,项目名称:vlc,代码行数:10,



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


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