本文整理汇总了C++中pa_sink_input_assert_ref函数的典型用法代码示例。如果您正苦于以下问题:C++ pa_sink_input_assert_ref函数的具体用法?C++ pa_sink_input_assert_ref怎么用?C++ pa_sink_input_assert_ref使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了pa_sink_input_assert_ref函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: cmtspeech_sink_input_moving_cb
/* Called from main context */
static void cmtspeech_sink_input_moving_cb(pa_sink_input *i, pa_sink *dest){
struct userdata *u;
pa_sink_input_assert_ref(i);
pa_assert_se(u = i->userdata);
u->sink = i->sink;
pa_log_debug("CMT Sink input moving to %s", dest ? dest->name : "(null)");
}
开发者ID:tanuk2,项目名称:pulseaudio-modules-nemo,代码行数:11,代码来源:cmtspeech-sink-input.c
示例2: sink_input_detach_cb
/* Called from I/O thread context */
static void sink_input_detach_cb(pa_sink_input *i) {
struct userdata *u;
pa_sink_input_assert_ref(i);
pa_assert_se(u = i->userdata);
pa_sink_detach_within_thread(u->sink);
pa_sink_set_rtpoll(u->sink, NULL);
}
开发者ID:mariospr,项目名称:pulseaudio,代码行数:11,代码来源:module-virtual-surround-sink.c
示例3: cmtspeech_sink_input_may_move_to_cb
/* Called from main context */
static pa_bool_t cmtspeech_sink_input_may_move_to_cb(pa_sink_input *i, pa_sink *dest) {
struct userdata *u;
pa_sink_input_assert_ref(i);
pa_assert_se(u = i->userdata);
if (cmtspeech_check_sink_api(dest))
return FALSE;
return TRUE;
}
开发者ID:tanuk2,项目名称:pulseaudio-modules-nemo,代码行数:12,代码来源:cmtspeech-sink-input.c
示例4: sink_input_suspend_cb
/* Called from main thread */
static void sink_input_suspend_cb(pa_sink_input *i, pa_bool_t suspended) {
struct userdata *u;
pa_sink_input_assert_ref(i);
pa_assert_ctl_context();
pa_assert_se(u = i->userdata);
pa_source_output_cork(u->source_output, suspended);
update_adjust_timer(u);
}
开发者ID:freedesktop-unofficial-mirror,项目名称:pulseaudio__pulseaudio.git.backup,代码行数:12,代码来源:module-loopback.c
示例5: cmtspeech_sink_input_update_max_request_cb
/* Called from I/O thread context */
static void cmtspeech_sink_input_update_max_request_cb(pa_sink_input *i, size_t nbytes) {
struct userdata *u;
pa_sink_input_assert_ref(i);
pa_assert_se(u = i->userdata);
if (!PA_SINK_INPUT_IS_LINKED(i->thread_info.state))
return;
pa_log_debug("Max request of %s updated to %zu bytes", i->sink->name, nbytes);
}
开发者ID:tanuk2,项目名称:pulseaudio-modules-nemo,代码行数:12,代码来源:cmtspeech-sink-input.c
示例6: sink_input_suspend_within_thread
/* Called from IO context */
static void sink_input_suspend_within_thread(pa_sink_input* i, pa_bool_t b) {
struct session *s;
pa_sink_input_assert_ref(i);
pa_assert_se(s = i->userdata);
if (b) {
pa_smoother_pause(s->smoother, pa_rtclock_now());
pa_memblockq_flush_read(s->memblockq);
} else
s->first_packet = FALSE;
}
开发者ID:almosthappy4u,项目名称:PulseAudio-UCM,代码行数:12,代码来源:module-rtp-recv.c
示例7: aep_sink_input_state_change_cb
/* Called from IO thread context */
static void aep_sink_input_state_change_cb(pa_sink_input *i, pa_sink_input_state_t state) {
struct userdata *u;
pa_sink_input_assert_ref(i);
pa_assert_se(u = i->userdata);
pa_log_debug("State change cb %d", state);
/* What ever the new state was, we should remain corked. */
i->thread_info.state = PA_SINK_INPUT_CORKED;
}
开发者ID:community-ssu,项目名称:pulseaudio-nokia,代码行数:12,代码来源:voice-aep-sink-input.c
示例8: sink_input_update_max_request_cb
/* Called from output thread context */
static void sink_input_update_max_request_cb(pa_sink_input *i, size_t nbytes) {
struct userdata *u;
pa_sink_input_assert_ref(i);
pa_sink_input_assert_io_context(i);
pa_assert_se(u = i->userdata);
pa_memblockq_set_prebuf(u->memblockq, nbytes*2);
pa_log_info("Max request changed");
pa_asyncmsgq_post(pa_thread_mq_get()->outq, PA_MSGOBJECT(u->sink_input), SINK_INPUT_MESSAGE_MAX_REQUEST_CHANGED, NULL, 0, NULL, NULL);
}
开发者ID:freedesktop-unofficial-mirror,项目名称:pulseaudio__pulseaudio.git.backup,代码行数:12,代码来源:module-loopback.c
示例9: sink_input_update_max_rewind_cb
/* Called from I/O thread context */
static void sink_input_update_max_rewind_cb(pa_sink_input *i, size_t nbytes) {
struct userdata *u;
pa_sink_input_assert_ref(i);
pa_assert_se(u = i->userdata);
/* FIXME: Too small max_rewind:
* https://bugs.freedesktop.org/show_bug.cgi?id=53709 */
pa_memblockq_set_maxrewind(u->memblockq, nbytes);
pa_sink_set_max_rewind_within_thread(u->sink, nbytes);
}
开发者ID:KOLIA112,项目名称:pulseaudio,代码行数:12,代码来源:module-virtual-sink.c
示例10: cmtspeech_sink_input_process_rewind_cb
/* Called from I/O thread context */
static void cmtspeech_sink_input_process_rewind_cb(pa_sink_input *i, size_t nbytes) {
struct userdata *u;
pa_sink_input_assert_ref(i);
pa_assert_se(u = i->userdata);
if (!PA_SINK_INPUT_IS_LINKED(i->thread_info.state))
return;
pa_log_debug("%s rewound %zu bytes", i->sink->name, nbytes);
}
开发者ID:tanuk2,项目名称:pulseaudio-modules-nemo,代码行数:12,代码来源:cmtspeech-sink-input.c
示例11: sink_input_update_max_request_cb
/* Called from I/O thread context */
static void sink_input_update_max_request_cb(pa_sink_input *i, size_t nbytes) {
struct userdata *u;
pa_sink_input_assert_ref(i);
pa_assert_se(u = i->userdata);
/* (6) IF YOU NEED A FIXED BLOCK SIZE ROUND nbytes UP TO MULTIPLES
* OF IT HERE. THE PA_ROUND_UP MACRO IS USEFUL FOR THAT. */
pa_sink_set_max_request_within_thread(u->sink, nbytes);
}
开发者ID:KOLIA112,项目名称:pulseaudio,代码行数:12,代码来源:module-virtual-sink.c
示例12: sink_input_pop_cb
/* Called from I/O thread context */
static int sink_input_pop_cb(pa_sink_input *i, size_t nbytes, pa_memchunk *chunk) {
struct userdata *u;
float *src, *dst;
size_t fs;
unsigned n, h, c;
pa_memchunk tchunk;
pa_sink_input_assert_ref(i);
pa_assert(chunk);
pa_assert_se(u = i->userdata);
/* Hmm, process any rewind request that might be queued up */
pa_sink_process_rewind(u->sink, 0);
while (pa_memblockq_peek(u->memblockq, &tchunk) < 0) {
pa_memchunk nchunk;
pa_sink_render(u->sink, nbytes, &nchunk);
pa_memblockq_push(u->memblockq, &nchunk);
pa_memblock_unref(nchunk.memblock);
}
tchunk.length = PA_MIN(nbytes, tchunk.length);
pa_assert(tchunk.length > 0);
fs = pa_frame_size(&i->sample_spec);
n = (unsigned) (PA_MIN(tchunk.length, u->block_size) / fs);
pa_assert(n > 0);
chunk->index = 0;
chunk->length = n*fs;
chunk->memblock = pa_memblock_new(i->sink->core->mempool, chunk->length);
pa_memblockq_drop(u->memblockq, chunk->length);
src = (float*) ((uint8_t*) pa_memblock_acquire(tchunk.memblock) + tchunk.index);
dst = (float*) pa_memblock_acquire(chunk->memblock);
for (h = 0; h < (u->channels / u->max_ladspaport_count); h++) {
for (c = 0; c < u->input_count; c++)
pa_sample_clamp(PA_SAMPLE_FLOAT32NE, u->input[c], sizeof(float), src+ h*u->max_ladspaport_count + c, u->channels*sizeof(float), n);
u->descriptor->run(u->handle[h], n);
for (c = 0; c < u->output_count; c++)
pa_sample_clamp(PA_SAMPLE_FLOAT32NE, dst + h*u->max_ladspaport_count + c, u->channels*sizeof(float), u->output[c], sizeof(float), n);
}
pa_memblock_release(tchunk.memblock);
pa_memblock_release(chunk->memblock);
pa_memblock_unref(tchunk.memblock);
return 0;
}
开发者ID:KimT,项目名称:pulseaudio_kt,代码行数:55,代码来源:module-ladspa-sink.c
示例13: sink_input_detach_cb
/* Called from I/O thread context */
static void sink_input_detach_cb(pa_sink_input *i) {
struct userdata *u;
pa_sink_input_assert_ref(i);
pa_assert_se(u = i->userdata);
if (PA_SINK_IS_LINKED(u->sink->thread_info.state))
pa_sink_detach_within_thread(u->sink);
pa_sink_set_rtpoll(u->sink, NULL);
}
开发者ID:plbossart,项目名称:pulseaudio,代码行数:12,代码来源:module-remap-sink.c
示例14: sink_input_move_finish_cb
static pa_hook_result_t sink_input_move_finish_cb(pa_core *core, pa_sink_input *i, struct userdata *u) {
pa_core_assert_ref(core);
pa_sink_input_assert_ref(i);
pa_assert(u);
/* module-filter-apply triggered this move, ignore */
if (pa_proplist_gets(i->proplist, PA_PROP_FILTER_APPLY_MOVING))
return PA_HOOK_OK;
return process(u, PA_OBJECT(i), TRUE);
}
开发者ID:KOLIA112,项目名称:pulseaudio,代码行数:11,代码来源:module-filter-heuristics.c
示例15: sink_input_update_max_rewind_cb
static void sink_input_update_max_rewind_cb(pa_sink_input *i, size_t nbytes) {
memblockq_stream *u;
pa_sink_input_assert_ref(i);
u = MEMBLOCKQ_STREAM(i->userdata);
memblockq_stream_assert_ref(u);
if (!u->memblockq)
return;
pa_memblockq_set_maxrewind(u->memblockq, nbytes);
}
开发者ID:OS2World,项目名称:MM-SOUND-PM123,代码行数:12,代码来源:play-memblockq.c
示例16: sink_input_kill_cb
static void sink_input_kill_cb(pa_sink_input *i) {
struct userdata *u;
pa_sink_input_assert_ref(i);
pa_assert_se(u = i->userdata);
pa_sink_input_unlink(u->sink_input);
pa_sink_input_unref(u->sink_input);
u->sink_input = NULL;
pa_module_unload_request(u->module, true);
}
开发者ID:DryakhlyyZlodey,项目名称:pulseaudio,代码行数:12,代码来源:module-sine.c
示例17: sink_input_process_rewind_cb
static void sink_input_process_rewind_cb(pa_sink_input *i, size_t nbytes) {
file_stream *u;
pa_sink_input_assert_ref(i);
u = FILE_STREAM(i->userdata);
file_stream_assert_ref(u);
if (!u->memblockq)
return;
pa_memblockq_rewind(u->memblockq, nbytes);
}
开发者ID:KOLIA112,项目名称:pulseaudio,代码行数:12,代码来源:sound-file-stream.c
示例18: sink_input_pop_cb
/* Called from I/O thread context */
static int sink_input_pop_cb(pa_sink_input *i, size_t length, pa_memchunk *chunk) {
struct session *s;
pa_sink_input_assert_ref(i);
pa_assert_se(s = i->userdata);
if (pa_memblockq_peek(s->memblockq, chunk) < 0)
return -1;
pa_memblockq_drop(s->memblockq, chunk->length);
return 0;
}
开发者ID:cktakahasi,项目名称:pa,代码行数:13,代码来源:module-rtp-recv.c
示例19: sink_input_state_change_cb
/* Called from IO thread context */
static void sink_input_state_change_cb(pa_sink_input *i, pa_sink_input_state_t state) {
struct userdata *u;
pa_sink_input_assert_ref(i);
pa_assert_se(u = i->userdata);
/* If we are added for the first time, ask for a rewinding so that
* we are heard right-away. */
if (PA_SINK_INPUT_IS_LINKED(state) &&
i->thread_info.state == PA_SINK_INPUT_INIT)
pa_sink_input_request_rewind(i, 0, false, true, true);
}
开发者ID:DryakhlyyZlodey,项目名称:pulseaudio,代码行数:13,代码来源:module-sine.c
示例20: sink_input_may_move_to_cb
/* Called from main thread */
static bool sink_input_may_move_to_cb(pa_sink_input *i, pa_sink *dest) {
struct userdata *u;
pa_sink_input_assert_ref(i);
pa_assert_ctl_context();
pa_assert_se(u = i->userdata);
if (!u->source_output || !u->source_output->source)
return true;
return dest != u->source_output->source->monitor_of;
}
开发者ID:freedesktop-unofficial-mirror,项目名称:pulseaudio__pulseaudio.git.backup,代码行数:13,代码来源:module-loopback.c
注:本文中的pa_sink_input_assert_ref函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论