Lines Matching refs:ctx

49     pa_context *ctx;
57 static void pulse_audio_sink_device_cb(pa_context *ctx, const pa_sink_info *dev,
62 if (s->ctx != ctx)
81 if (!(op = pa_context_get_sink_info_by_name(s->ctx, s->device,
92 static void pulse_audio_sink_input_cb(pa_context *ctx, const pa_sink_input_info *i,
98 if (s->ctx != ctx)
126 pa_context *ctx = NULL;
129 if ((ret = ff_pulse_audio_connect_context(&ml, &ctx, s->server, "Update sink input information")) < 0)
132 if (!(op = pa_context_get_sink_input_info(ctx, pa_stream_get_index(s->stream),
147 ff_pulse_audio_disconnect_context(&ml, &ctx);
153 static void pulse_event(pa_context *ctx, pa_subscription_event_type_t t,
159 if (s->ctx != ctx)
223 static void pulse_context_state(pa_context *ctx, void *userdata)
227 if (s->ctx != ctx)
230 switch (pa_context_get_state(ctx)) {
244 while ((state = pa_context_get_state(s->ctx)) != PA_CONTEXT_READY) {
296 static void pulse_context_result(pa_context *ctx, int success, void *userdata)
300 if (s->ctx != ctx)
328 op = pa_context_set_sink_input_mute(s->ctx, pa_stream_get_index(s->stream),
344 op = pa_context_set_sink_input_volume(s->ctx, pa_stream_get_index(s->stream),
354 op = pa_context_subscribe(s->ctx, PA_SUBSCRIPTION_MASK_SINK_INPUT, pulse_context_result, s);
428 if (s->ctx) {
429 pa_context_disconnect(s->ctx);
430 pa_context_set_state_callback(s->ctx, NULL, NULL);
431 pa_context_set_subscribe_callback(s->ctx, NULL, NULL);
432 pa_context_unref(s->ctx);
433 s->ctx = NULL;
541 s->ctx = pa_context_new(mainloop_api, s->name);
542 if (!s->ctx) {
547 pa_context_set_state_callback(s->ctx, pulse_context_state, s);
548 pa_context_set_subscribe_callback(s->ctx, pulse_event, h);
550 if ((ret = pa_context_connect(s->ctx, s->server, 0, NULL)) < 0) {
561 s->stream = pa_stream_new(s->ctx, stream_name, &sample_spec,