mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-12-16 08:56:40 -05:00
allow hooking into the process of creating playback streams. To implement this I modified the pa_sink_input_new() signature to take a pa_sink_input_new_data structure instead of direct arguments.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1237 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
b5cbea940e
commit
a621d90285
16 changed files with 291 additions and 133 deletions
|
|
@ -220,6 +220,8 @@ static pa_usec_t sink_get_latency_cb(pa_sink *s) {
|
||||||
static struct output *output_new(struct userdata *u, pa_sink *sink, int resample_method) {
|
static struct output *output_new(struct userdata *u, pa_sink *sink, int resample_method) {
|
||||||
struct output *o = NULL;
|
struct output *o = NULL;
|
||||||
char t[256];
|
char t[256];
|
||||||
|
pa_sink_input_new_data data;
|
||||||
|
|
||||||
assert(u && sink && u->sink);
|
assert(u && sink && u->sink);
|
||||||
|
|
||||||
o = pa_xmalloc(sizeof(struct output));
|
o = pa_xmalloc(sizeof(struct output));
|
||||||
|
|
@ -237,7 +239,16 @@ static struct output *output_new(struct userdata *u, pa_sink *sink, int resample
|
||||||
sink->core->memblock_stat);
|
sink->core->memblock_stat);
|
||||||
|
|
||||||
snprintf(t, sizeof(t), "%s: output #%u", u->sink->name, u->n_outputs+1);
|
snprintf(t, sizeof(t), "%s: output #%u", u->sink->name, u->n_outputs+1);
|
||||||
if (!(o->sink_input = pa_sink_input_new(sink, __FILE__, t, &u->sink->sample_spec, &u->sink->channel_map, NULL, 1, resample_method)))
|
|
||||||
|
pa_sink_input_new_data_init(&data);
|
||||||
|
data.sink = sink;
|
||||||
|
data.driver = __FILE__;
|
||||||
|
data.name = t;
|
||||||
|
pa_sink_input_new_data_set_sample_spec(&data, &u->sink->sample_spec);
|
||||||
|
pa_sink_input_new_data_set_channel_map(&data, &u->sink->channel_map);
|
||||||
|
data.module = u->module;
|
||||||
|
|
||||||
|
if (!(o->sink_input = pa_sink_input_new(u->core, &data, PA_SINK_INPUT_VARIABLE_RATE)))
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
o->sink_input->get_latency = sink_input_get_latency_cb;
|
o->sink_input->get_latency = sink_input_get_latency_cb;
|
||||||
|
|
@ -245,7 +256,6 @@ static struct output *output_new(struct userdata *u, pa_sink *sink, int resample
|
||||||
o->sink_input->drop = sink_input_drop_cb;
|
o->sink_input->drop = sink_input_drop_cb;
|
||||||
o->sink_input->kill = sink_input_kill_cb;
|
o->sink_input->kill = sink_input_kill_cb;
|
||||||
o->sink_input->userdata = o;
|
o->sink_input->userdata = o;
|
||||||
o->sink_input->owner = u->module;
|
|
||||||
|
|
||||||
PA_LLIST_PREPEND(struct output, u->outputs, o);
|
PA_LLIST_PREPEND(struct output, u->outputs, o);
|
||||||
u->n_outputs++;
|
u->n_outputs++;
|
||||||
|
|
|
||||||
|
|
@ -109,6 +109,7 @@ int pa__init(pa_core *c, pa_module*m) {
|
||||||
pa_sample_spec ss;
|
pa_sample_spec ss;
|
||||||
uint32_t frequency;
|
uint32_t frequency;
|
||||||
char t[256];
|
char t[256];
|
||||||
|
pa_sink_input_new_data data;
|
||||||
|
|
||||||
if (!(ma = pa_modargs_new(m->argument, valid_modargs))) {
|
if (!(ma = pa_modargs_new(m->argument, valid_modargs))) {
|
||||||
pa_log(__FILE__": Failed to parse module arguments");
|
pa_log(__FILE__": Failed to parse module arguments");
|
||||||
|
|
@ -142,14 +143,21 @@ int pa__init(pa_core *c, pa_module*m) {
|
||||||
calc_sine(u->memblock->data, u->memblock->length, frequency);
|
calc_sine(u->memblock->data, u->memblock->length, frequency);
|
||||||
|
|
||||||
snprintf(t, sizeof(t), "Sine Generator at %u Hz", frequency);
|
snprintf(t, sizeof(t), "Sine Generator at %u Hz", frequency);
|
||||||
if (!(u->sink_input = pa_sink_input_new(sink, __FILE__, t, &ss, NULL, NULL, 0, -1)))
|
|
||||||
|
pa_sink_input_new_data_init(&data);
|
||||||
|
data.sink = sink;
|
||||||
|
data.driver = __FILE__;
|
||||||
|
data.name = t;
|
||||||
|
pa_sink_input_new_data_set_sample_spec(&data, &ss);
|
||||||
|
data.module = m;
|
||||||
|
|
||||||
|
if (!(u->sink_input = pa_sink_input_new(c, &data, 0)))
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
u->sink_input->peek = sink_input_peek;
|
u->sink_input->peek = sink_input_peek;
|
||||||
u->sink_input->drop = sink_input_drop;
|
u->sink_input->drop = sink_input_drop;
|
||||||
u->sink_input->kill = sink_input_kill;
|
u->sink_input->kill = sink_input_kill;
|
||||||
u->sink_input->userdata = u;
|
u->sink_input->userdata = u;
|
||||||
u->sink_input->owner = m;
|
|
||||||
|
|
||||||
u->peek_index = 0;
|
u->peek_index = 0;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -265,6 +265,7 @@ static struct session *session_new(struct userdata *u, const pa_sdp_info *sdp_in
|
||||||
pa_sink *sink;
|
pa_sink *sink;
|
||||||
int fd = -1;
|
int fd = -1;
|
||||||
pa_memblock *silence;
|
pa_memblock *silence;
|
||||||
|
pa_sink_input_new_data data;
|
||||||
|
|
||||||
if (u->n_sessions >= MAX_SESSIONS) {
|
if (u->n_sessions >= MAX_SESSIONS) {
|
||||||
pa_log(__FILE__": session limit reached.");
|
pa_log(__FILE__": session limit reached.");
|
||||||
|
|
@ -289,7 +290,14 @@ static struct session *session_new(struct userdata *u, const pa_sdp_info *sdp_in
|
||||||
sdp_info->session_name ? sdp_info->session_name : "",
|
sdp_info->session_name ? sdp_info->session_name : "",
|
||||||
sdp_info->session_name ? ")" : "");
|
sdp_info->session_name ? ")" : "");
|
||||||
|
|
||||||
s->sink_input = pa_sink_input_new(sink, __FILE__, c, &sdp_info->sample_spec, NULL, NULL, 0, PA_RESAMPLER_INVALID);
|
pa_sink_input_new_data_init(&data);
|
||||||
|
data.sink = sink;
|
||||||
|
data.driver = __FILE__;
|
||||||
|
data.name = c;
|
||||||
|
data.module = u->module;
|
||||||
|
pa_sink_input_new_data_set_sample_spec(&data, &sdp_info->sample_spec);
|
||||||
|
|
||||||
|
s->sink_input = pa_sink_input_new(u->core, &data, 0);
|
||||||
pa_xfree(c);
|
pa_xfree(c);
|
||||||
|
|
||||||
if (!s->sink_input) {
|
if (!s->sink_input) {
|
||||||
|
|
@ -298,7 +306,6 @@ static struct session *session_new(struct userdata *u, const pa_sdp_info *sdp_in
|
||||||
}
|
}
|
||||||
|
|
||||||
s->sink_input->userdata = s;
|
s->sink_input->userdata = s;
|
||||||
s->sink_input->owner = u->module;
|
|
||||||
|
|
||||||
s->sink_input->peek = sink_input_peek;
|
s->sink_input->peek = sink_input_peek;
|
||||||
s->sink_input->drop = sink_input_drop;
|
s->sink_input->drop = sink_input_drop;
|
||||||
|
|
|
||||||
|
|
@ -257,8 +257,8 @@ char *pa_sink_input_list_to_string(pa_core *c) {
|
||||||
pa_channel_map_snprint(cm, sizeof(cm), &i->channel_map),
|
pa_channel_map_snprint(cm, sizeof(cm), &i->channel_map),
|
||||||
pa_resample_method_to_string(pa_sink_input_get_resample_method(i)));
|
pa_resample_method_to_string(pa_sink_input_get_resample_method(i)));
|
||||||
|
|
||||||
if (i->owner)
|
if (i->module)
|
||||||
pa_strbuf_printf(s, "\towner module: <%u>\n", i->owner->index);
|
pa_strbuf_printf(s, "\towner module: <%u>\n", i->module->index);
|
||||||
if (i->client)
|
if (i->client)
|
||||||
pa_strbuf_printf(s, "\tclient: <%u> '%s'\n", i->client->index, i->client->name);
|
pa_strbuf_printf(s, "\tclient: <%u> '%s'\n", i->client->index, i->client->name);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef fooclienthfoo
|
#ifndef foopulseclienthfoo
|
||||||
#define fooclienthfoo
|
#define foopulseclienthfoo
|
||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
|
|
@ -22,6 +22,10 @@
|
||||||
USA.
|
USA.
|
||||||
***/
|
***/
|
||||||
|
|
||||||
|
#include <inttypes.h>
|
||||||
|
|
||||||
|
typedef struct pa_client pa_client;
|
||||||
|
|
||||||
#include <pulsecore/core.h>
|
#include <pulsecore/core.h>
|
||||||
#include <pulsecore/module.h>
|
#include <pulsecore/module.h>
|
||||||
|
|
||||||
|
|
@ -29,8 +33,6 @@
|
||||||
* attached. That way the user may generate a listing of all connected
|
* attached. That way the user may generate a listing of all connected
|
||||||
* clients easily and kill them if he wants.*/
|
* clients easily and kill them if he wants.*/
|
||||||
|
|
||||||
typedef struct pa_client pa_client;
|
|
||||||
|
|
||||||
struct pa_client {
|
struct pa_client {
|
||||||
uint32_t index;
|
uint32_t index;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -92,6 +92,9 @@ pa_core* pa_core_new(pa_mainloop_api *m) {
|
||||||
|
|
||||||
c->is_system_instance = 0;
|
c->is_system_instance = 0;
|
||||||
|
|
||||||
|
pa_hook_init(&c->hook_sink_input_new, c);
|
||||||
|
pa_hook_init(&c->hook_sink_input_disconnect, c);
|
||||||
|
|
||||||
pa_property_init(c);
|
pa_property_init(c);
|
||||||
|
|
||||||
pa_random(&c->cookie, sizeof(c->cookie));
|
pa_random(&c->cookie, sizeof(c->cookie));
|
||||||
|
|
@ -138,6 +141,9 @@ void pa_core_free(pa_core *c) {
|
||||||
|
|
||||||
pa_property_cleanup(c);
|
pa_property_cleanup(c);
|
||||||
|
|
||||||
|
pa_hook_free(&c->hook_sink_input_new);
|
||||||
|
pa_hook_free(&c->hook_sink_input_disconnect);
|
||||||
|
|
||||||
pa_xfree(c);
|
pa_xfree(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,17 +22,21 @@
|
||||||
USA.
|
USA.
|
||||||
***/
|
***/
|
||||||
|
|
||||||
typedef struct pa_core pa_core;
|
|
||||||
|
|
||||||
#include <pulse/mainloop-api.h>
|
#include <pulse/mainloop-api.h>
|
||||||
#include <pulse/sample.h>
|
#include <pulse/sample.h>
|
||||||
|
|
||||||
#include <pulsecore/idxset.h>
|
#include <pulsecore/idxset.h>
|
||||||
#include <pulsecore/hashmap.h>
|
#include <pulsecore/hashmap.h>
|
||||||
#include <pulsecore/memblock.h>
|
#include <pulsecore/memblock.h>
|
||||||
#include <pulsecore/resampler.h>
|
#include <pulsecore/resampler.h>
|
||||||
#include <pulsecore/queue.h>
|
#include <pulsecore/queue.h>
|
||||||
#include <pulsecore/core-subscribe.h>
|
|
||||||
#include <pulsecore/llist.h>
|
#include <pulsecore/llist.h>
|
||||||
|
#include <pulsecore/hook-list.h>
|
||||||
|
|
||||||
|
typedef struct pa_core pa_core;
|
||||||
|
|
||||||
|
#include <pulsecore/core-subscribe.h>
|
||||||
|
#include <pulsecore/sink-input.h>
|
||||||
|
|
||||||
/* The core structure of PulseAudio. Every PulseAudio daemon contains
|
/* The core structure of PulseAudio. Every PulseAudio daemon contains
|
||||||
* exactly one of these. It is used for storing kind of global
|
* exactly one of these. It is used for storing kind of global
|
||||||
|
|
@ -75,6 +79,9 @@ struct pa_core {
|
||||||
pa_resample_method_t resample_method;
|
pa_resample_method_t resample_method;
|
||||||
|
|
||||||
int is_system_instance;
|
int is_system_instance;
|
||||||
|
|
||||||
|
/* hooks */
|
||||||
|
pa_hook hook_sink_input_new, hook_sink_input_disconnect;
|
||||||
};
|
};
|
||||||
|
|
||||||
pa_core* pa_core_new(pa_mainloop_api *m);
|
pa_core* pa_core_new(pa_mainloop_api *m);
|
||||||
|
|
|
||||||
|
|
@ -25,11 +25,11 @@
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <ltdl.h>
|
#include <ltdl.h>
|
||||||
|
|
||||||
|
typedef struct pa_module pa_module;
|
||||||
|
|
||||||
#include <pulsecore/core.h>
|
#include <pulsecore/core.h>
|
||||||
#include <pulsecore/modinfo.h>
|
#include <pulsecore/modinfo.h>
|
||||||
|
|
||||||
typedef struct pa_module pa_module;
|
|
||||||
|
|
||||||
struct pa_module {
|
struct pa_module {
|
||||||
pa_core *core;
|
pa_core *core;
|
||||||
char *name, *argument;
|
char *name, *argument;
|
||||||
|
|
|
||||||
|
|
@ -84,9 +84,10 @@ int pa_play_memblockq(
|
||||||
const pa_sample_spec *ss,
|
const pa_sample_spec *ss,
|
||||||
const pa_channel_map *map,
|
const pa_channel_map *map,
|
||||||
pa_memblockq *q,
|
pa_memblockq *q,
|
||||||
pa_cvolume *cvolume) {
|
pa_cvolume *volume) {
|
||||||
|
|
||||||
pa_sink_input *si;
|
pa_sink_input *si;
|
||||||
|
pa_sink_input_new_data data;
|
||||||
|
|
||||||
assert(sink);
|
assert(sink);
|
||||||
assert(ss);
|
assert(ss);
|
||||||
|
|
@ -97,12 +98,20 @@ int pa_play_memblockq(
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cvolume && pa_cvolume_is_muted(cvolume)) {
|
if (volume && pa_cvolume_is_muted(volume)) {
|
||||||
pa_memblockq_free(q);
|
pa_memblockq_free(q);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(si = pa_sink_input_new(sink, name, __FILE__, ss, map, cvolume, 0, PA_RESAMPLER_INVALID)))
|
pa_sink_input_new_data_init(&data);
|
||||||
|
data.sink = sink;
|
||||||
|
data.name = name;
|
||||||
|
data.driver = __FILE__;
|
||||||
|
pa_sink_input_new_data_set_channel_map(&data, map);
|
||||||
|
pa_sink_input_new_data_set_sample_spec(&data, ss);
|
||||||
|
pa_sink_input_new_data_set_volume(&data, volume);
|
||||||
|
|
||||||
|
if (!(si = pa_sink_input_new(sink->core, &data, 0)))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
si->peek = sink_input_peek;
|
si->peek = sink_input_peek;
|
||||||
|
|
@ -111,7 +120,7 @@ int pa_play_memblockq(
|
||||||
|
|
||||||
si->userdata = q;
|
si->userdata = q;
|
||||||
|
|
||||||
pa_sink_notify(sink);
|
pa_sink_notify(si->sink);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -87,19 +87,28 @@ int pa_play_memchunk(
|
||||||
const pa_sample_spec *ss,
|
const pa_sample_spec *ss,
|
||||||
const pa_channel_map *map,
|
const pa_channel_map *map,
|
||||||
const pa_memchunk *chunk,
|
const pa_memchunk *chunk,
|
||||||
pa_cvolume *cvolume) {
|
pa_cvolume *volume) {
|
||||||
|
|
||||||
pa_sink_input *si;
|
pa_sink_input *si;
|
||||||
pa_memchunk *nchunk;
|
pa_memchunk *nchunk;
|
||||||
|
pa_sink_input_new_data data;
|
||||||
|
|
||||||
assert(sink);
|
assert(sink);
|
||||||
assert(ss);
|
assert(ss);
|
||||||
assert(chunk);
|
assert(chunk);
|
||||||
|
|
||||||
if (cvolume && pa_cvolume_is_muted(cvolume))
|
if (volume && pa_cvolume_is_muted(volume))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (!(si = pa_sink_input_new(sink, name, __FILE__, ss, map, cvolume, 0, PA_RESAMPLER_INVALID)))
|
pa_sink_input_new_data_init(&data);
|
||||||
|
data.sink = sink;
|
||||||
|
data.name = name;
|
||||||
|
data.driver = __FILE__;
|
||||||
|
pa_sink_input_new_data_set_sample_spec(&data, ss);
|
||||||
|
pa_sink_input_new_data_set_channel_map(&data, map);
|
||||||
|
pa_sink_input_new_data_set_volume(&data, volume);
|
||||||
|
|
||||||
|
if (!(si = pa_sink_input_new(sink->core, &data, 0)))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
si->peek = sink_input_peek;
|
si->peek = sink_input_peek;
|
||||||
|
|
@ -111,7 +120,7 @@ int pa_play_memchunk(
|
||||||
|
|
||||||
pa_memblock_ref(chunk->memblock);
|
pa_memblock_ref(chunk->memblock);
|
||||||
|
|
||||||
pa_sink_notify(sink);
|
pa_sink_notify(si->sink);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -325,9 +325,10 @@ static int esd_proto_connect(struct connection *c, PA_GCC_UNUSED esd_proto_t req
|
||||||
static int esd_proto_stream_play(struct connection *c, PA_GCC_UNUSED esd_proto_t request, const void *data, size_t length) {
|
static int esd_proto_stream_play(struct connection *c, PA_GCC_UNUSED esd_proto_t request, const void *data, size_t length) {
|
||||||
char name[ESD_NAME_MAX], *utf8_name;
|
char name[ESD_NAME_MAX], *utf8_name;
|
||||||
int32_t format, rate;
|
int32_t format, rate;
|
||||||
pa_sink *sink;
|
|
||||||
pa_sample_spec ss;
|
pa_sample_spec ss;
|
||||||
size_t l;
|
size_t l;
|
||||||
|
pa_sink *sink;
|
||||||
|
pa_sink_input_new_data sdata;
|
||||||
|
|
||||||
assert(c && length == (sizeof(int32_t)*2+ESD_NAME_MAX));
|
assert(c && length == (sizeof(int32_t)*2+ESD_NAME_MAX));
|
||||||
|
|
||||||
|
|
@ -355,7 +356,15 @@ static int esd_proto_stream_play(struct connection *c, PA_GCC_UNUSED esd_proto_t
|
||||||
|
|
||||||
assert(!c->sink_input && !c->input_memblockq);
|
assert(!c->sink_input && !c->input_memblockq);
|
||||||
|
|
||||||
c->sink_input = pa_sink_input_new(sink, __FILE__, utf8_name, &ss, NULL, NULL, 0, -1);
|
pa_sink_input_new_data_init(&sdata);
|
||||||
|
sdata.sink = sink;
|
||||||
|
sdata.driver = __FILE__;
|
||||||
|
sdata.name = utf8_name;
|
||||||
|
pa_sink_input_new_data_set_sample_spec(&sdata, &ss);
|
||||||
|
sdata.module = c->protocol->module;
|
||||||
|
sdata.client = c->client;
|
||||||
|
|
||||||
|
c->sink_input = pa_sink_input_new(c->protocol->core, &sdata, 0);
|
||||||
|
|
||||||
pa_xfree(utf8_name);
|
pa_xfree(utf8_name);
|
||||||
|
|
||||||
|
|
@ -374,8 +383,6 @@ static int esd_proto_stream_play(struct connection *c, PA_GCC_UNUSED esd_proto_t
|
||||||
pa_iochannel_socket_set_rcvbuf(c->io, l/PLAYBACK_BUFFER_FRAGMENTS*2);
|
pa_iochannel_socket_set_rcvbuf(c->io, l/PLAYBACK_BUFFER_FRAGMENTS*2);
|
||||||
c->playback.fragment_size = l/10;
|
c->playback.fragment_size = l/10;
|
||||||
|
|
||||||
c->sink_input->owner = c->protocol->module;
|
|
||||||
c->sink_input->client = c->client;
|
|
||||||
c->sink_input->peek = sink_input_peek_cb;
|
c->sink_input->peek = sink_input_peek_cb;
|
||||||
c->sink_input->drop = sink_input_drop_cb;
|
c->sink_input->drop = sink_input_drop_cb;
|
||||||
c->sink_input->kill = sink_input_kill_cb;
|
c->sink_input->kill = sink_input_kill_cb;
|
||||||
|
|
|
||||||
|
|
@ -379,6 +379,7 @@ static struct playback_stream* playback_stream_new(
|
||||||
pa_memblock *silence;
|
pa_memblock *silence;
|
||||||
uint32_t idx;
|
uint32_t idx;
|
||||||
int64_t start_index;
|
int64_t start_index;
|
||||||
|
pa_sink_input_new_data data;
|
||||||
|
|
||||||
assert(c && sink && ss && name && maxlength);
|
assert(c && sink && ss && name && maxlength);
|
||||||
|
|
||||||
|
|
@ -396,7 +397,17 @@ static struct playback_stream* playback_stream_new(
|
||||||
if (ssync && ssync->sink_input->sink != sink)
|
if (ssync && ssync->sink_input->sink != sink)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (!(sink_input = pa_sink_input_new(sink, __FILE__, name, ss, map, volume, 0, -1)))
|
pa_sink_input_new_data_init(&data);
|
||||||
|
data.sink = sink;
|
||||||
|
data.driver = __FILE__;
|
||||||
|
data.name = name;
|
||||||
|
pa_sink_input_new_data_set_sample_spec(&data, ss);
|
||||||
|
pa_sink_input_new_data_set_channel_map(&data, map);
|
||||||
|
pa_sink_input_new_data_set_volume(&data, volume);
|
||||||
|
data.module = c->protocol->module;
|
||||||
|
data.client = c->client;
|
||||||
|
|
||||||
|
if (!(sink_input = pa_sink_input_new(sink->core, &data, 0)))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
s = pa_xnew(struct playback_stream, 1);
|
s = pa_xnew(struct playback_stream, 1);
|
||||||
|
|
@ -411,8 +422,6 @@ static struct playback_stream* playback_stream_new(
|
||||||
s->sink_input->kill = sink_input_kill_cb;
|
s->sink_input->kill = sink_input_kill_cb;
|
||||||
s->sink_input->get_latency = sink_input_get_latency_cb;
|
s->sink_input->get_latency = sink_input_get_latency_cb;
|
||||||
s->sink_input->userdata = s;
|
s->sink_input->userdata = s;
|
||||||
s->sink_input->owner = c->protocol->module;
|
|
||||||
s->sink_input->client = c->client;
|
|
||||||
|
|
||||||
if (ssync) {
|
if (ssync) {
|
||||||
/* Sync id found, now find head of list */
|
/* Sync id found, now find head of list */
|
||||||
|
|
@ -1331,7 +1340,7 @@ static void sink_input_fill_tagstruct(pa_tagstruct *t, pa_sink_input *s) {
|
||||||
assert(t && s);
|
assert(t && s);
|
||||||
pa_tagstruct_putu32(t, s->index);
|
pa_tagstruct_putu32(t, s->index);
|
||||||
pa_tagstruct_puts(t, s->name);
|
pa_tagstruct_puts(t, s->name);
|
||||||
pa_tagstruct_putu32(t, s->owner ? s->owner->index : PA_INVALID_INDEX);
|
pa_tagstruct_putu32(t, s->module ? s->module->index : PA_INVALID_INDEX);
|
||||||
pa_tagstruct_putu32(t, s->client ? s->client->index : PA_INVALID_INDEX);
|
pa_tagstruct_putu32(t, s->client ? s->client->index : PA_INVALID_INDEX);
|
||||||
pa_tagstruct_putu32(t, s->sink->index);
|
pa_tagstruct_putu32(t, s->sink->index);
|
||||||
pa_tagstruct_put_sample_spec(t, &s->sample_spec);
|
pa_tagstruct_put_sample_spec(t, &s->sample_spec);
|
||||||
|
|
|
||||||
|
|
@ -340,22 +340,21 @@ static void on_connection(pa_socket_server*s, pa_iochannel *io, void *userdata)
|
||||||
c->client->userdata = c;
|
c->client->userdata = c;
|
||||||
|
|
||||||
if (p->mode & PLAYBACK) {
|
if (p->mode & PLAYBACK) {
|
||||||
pa_sink *sink;
|
pa_sink_input_new_data data;
|
||||||
size_t l;
|
size_t l;
|
||||||
|
|
||||||
if (!(sink = pa_namereg_get(p->core, p->sink_name, PA_NAMEREG_SINK, 1))) {
|
pa_sink_input_new_data_init(&data);
|
||||||
pa_log(__FILE__": Failed to get sink.");
|
data.driver = __FILE__;
|
||||||
goto fail;
|
data.name = c->client->name;
|
||||||
}
|
pa_sink_input_new_data_set_sample_spec(&data, &p->sample_spec);
|
||||||
|
data.module = p->module;
|
||||||
|
data.client = c->client;
|
||||||
|
|
||||||
if (!(c->sink_input = pa_sink_input_new(sink, __FILE__, c->client->name, &p->sample_spec, NULL, NULL, 0, -1))) {
|
if (!(c->sink_input = pa_sink_input_new(p->core, &data, 0))) {
|
||||||
pa_log(__FILE__": Failed to create sink input.");
|
pa_log(__FILE__": Failed to create sink input.");
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
c->sink_input->owner = p->module;
|
|
||||||
c->sink_input->client = c->client;
|
|
||||||
|
|
||||||
c->sink_input->peek = sink_input_peek_cb;
|
c->sink_input->peek = sink_input_peek_cb;
|
||||||
c->sink_input->drop = sink_input_drop_cb;
|
c->sink_input->drop = sink_input_drop_cb;
|
||||||
c->sink_input->kill = sink_input_kill_cb;
|
c->sink_input->kill = sink_input_kill_cb;
|
||||||
|
|
@ -375,6 +374,8 @@ static void on_connection(pa_socket_server*s, pa_iochannel *io, void *userdata)
|
||||||
assert(c->input_memblockq);
|
assert(c->input_memblockq);
|
||||||
pa_iochannel_socket_set_rcvbuf(io, l/PLAYBACK_BUFFER_FRAGMENTS*5);
|
pa_iochannel_socket_set_rcvbuf(io, l/PLAYBACK_BUFFER_FRAGMENTS*5);
|
||||||
c->playback.fragment_size = l/10;
|
c->playback.fragment_size = l/10;
|
||||||
|
|
||||||
|
pa_sink_notify(c->sink_input->sink);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p->mode & RECORD) {
|
if (p->mode & RECORD) {
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,7 @@
|
||||||
#include <pulsecore/core-subscribe.h>
|
#include <pulsecore/core-subscribe.h>
|
||||||
#include <pulsecore/log.h>
|
#include <pulsecore/log.h>
|
||||||
#include <pulsecore/play-memblockq.h>
|
#include <pulsecore/play-memblockq.h>
|
||||||
|
#include <pulsecore/namereg.h>
|
||||||
|
|
||||||
#include "sink-input.h"
|
#include "sink-input.h"
|
||||||
|
|
||||||
|
|
@ -48,51 +49,96 @@ if (!(condition)) \
|
||||||
return NULL; \
|
return NULL; \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
pa_sink_input_new_data* pa_sink_input_new_data_init(pa_sink_input_new_data *data) {
|
||||||
|
assert(data);
|
||||||
|
|
||||||
|
memset(data, 0, sizeof(*data));
|
||||||
|
data->resample_method = PA_RESAMPLER_INVALID;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
void pa_sink_input_new_data_set_channel_map(pa_sink_input_new_data *data, const pa_channel_map *map) {
|
||||||
|
assert(data);
|
||||||
|
|
||||||
|
if ((data->channel_map_is_set = !!map))
|
||||||
|
data->channel_map = *map;
|
||||||
|
}
|
||||||
|
|
||||||
|
void pa_sink_input_new_data_set_volume(pa_sink_input_new_data *data, const pa_cvolume *volume) {
|
||||||
|
assert(data);
|
||||||
|
|
||||||
|
if ((data->volume_is_set = !!volume))
|
||||||
|
data->volume = *volume;
|
||||||
|
}
|
||||||
|
|
||||||
|
void pa_sink_input_new_data_set_sample_spec(pa_sink_input_new_data *data, const pa_sample_spec *spec) {
|
||||||
|
assert(data);
|
||||||
|
|
||||||
|
if ((data->sample_spec_is_set = !!spec))
|
||||||
|
data->sample_spec = *spec;
|
||||||
|
}
|
||||||
|
|
||||||
pa_sink_input* pa_sink_input_new(
|
pa_sink_input* pa_sink_input_new(
|
||||||
pa_sink *s,
|
pa_core *core,
|
||||||
const char *driver,
|
pa_sink_input_new_data *data,
|
||||||
const char *name,
|
pa_sink_input_flags_t flags) {
|
||||||
const pa_sample_spec *spec,
|
|
||||||
const pa_channel_map *map,
|
|
||||||
const pa_cvolume *volume,
|
|
||||||
int variable_rate,
|
|
||||||
int resample_method) {
|
|
||||||
|
|
||||||
pa_sink_input *i;
|
pa_sink_input *i;
|
||||||
pa_resampler *resampler = NULL;
|
pa_resampler *resampler = NULL;
|
||||||
int r;
|
int r;
|
||||||
char st[256];
|
char st[PA_SAMPLE_SPEC_SNPRINT_MAX];
|
||||||
pa_channel_map tmap;
|
|
||||||
pa_cvolume tvol;
|
|
||||||
|
|
||||||
assert(s);
|
assert(core);
|
||||||
assert(spec);
|
assert(data);
|
||||||
assert(s->state == PA_SINK_RUNNING);
|
|
||||||
|
|
||||||
CHECK_VALIDITY_RETURN_NULL(pa_sample_spec_valid(spec));
|
if (!(flags & PA_SINK_INPUT_NO_HOOKS))
|
||||||
|
if (pa_hook_fire(&core->hook_sink_input_new, data) < 0)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
if (!map)
|
CHECK_VALIDITY_RETURN_NULL(!data->driver || pa_utf8_valid(data->driver));
|
||||||
map = pa_channel_map_init_auto(&tmap, spec->channels, PA_CHANNEL_MAP_DEFAULT);
|
CHECK_VALIDITY_RETURN_NULL(!data->name || pa_utf8_valid(data->name));
|
||||||
if (!volume)
|
|
||||||
volume = pa_cvolume_reset(&tvol, spec->channels);
|
|
||||||
|
|
||||||
CHECK_VALIDITY_RETURN_NULL(map && pa_channel_map_valid(map));
|
if (!data->sink)
|
||||||
CHECK_VALIDITY_RETURN_NULL(volume && pa_cvolume_valid(volume));
|
data->sink = pa_namereg_get(core, NULL, PA_NAMEREG_SINK, 1);
|
||||||
CHECK_VALIDITY_RETURN_NULL(map->channels == spec->channels);
|
|
||||||
CHECK_VALIDITY_RETURN_NULL(volume->channels == spec->channels);
|
|
||||||
CHECK_VALIDITY_RETURN_NULL(!driver || pa_utf8_valid(driver));
|
|
||||||
CHECK_VALIDITY_RETURN_NULL(pa_utf8_valid(name));
|
|
||||||
|
|
||||||
if (pa_idxset_size(s->inputs) >= PA_MAX_INPUTS_PER_SINK) {
|
CHECK_VALIDITY_RETURN_NULL(data->sink && data->sink->state == PA_SINK_RUNNING);
|
||||||
|
|
||||||
|
if (!data->sample_spec_is_set)
|
||||||
|
data->sample_spec = data->sink->sample_spec;
|
||||||
|
|
||||||
|
CHECK_VALIDITY_RETURN_NULL(pa_sample_spec_valid(&data->sample_spec));
|
||||||
|
|
||||||
|
if (!data->channel_map_is_set)
|
||||||
|
pa_channel_map_init_auto(&data->channel_map, data->sample_spec.channels, PA_CHANNEL_MAP_DEFAULT);
|
||||||
|
|
||||||
|
CHECK_VALIDITY_RETURN_NULL(pa_channel_map_valid(&data->channel_map));
|
||||||
|
CHECK_VALIDITY_RETURN_NULL(data->channel_map.channels == data->sample_spec.channels);
|
||||||
|
|
||||||
|
if (!data->volume_is_set)
|
||||||
|
pa_cvolume_reset(&data->volume, data->sample_spec.channels);
|
||||||
|
|
||||||
|
CHECK_VALIDITY_RETURN_NULL(pa_cvolume_valid(&data->volume));
|
||||||
|
CHECK_VALIDITY_RETURN_NULL(data->volume.channels == data->sample_spec.channels);
|
||||||
|
|
||||||
|
if (data->resample_method == PA_RESAMPLER_INVALID)
|
||||||
|
data->resample_method = core->resample_method;
|
||||||
|
|
||||||
|
CHECK_VALIDITY_RETURN_NULL(data->resample_method < PA_RESAMPLER_MAX);
|
||||||
|
|
||||||
|
if (pa_idxset_size(data->sink->inputs) >= PA_MAX_INPUTS_PER_SINK) {
|
||||||
pa_log_warn(__FILE__": Failed to create sink input: too many inputs per sink.");
|
pa_log_warn(__FILE__": Failed to create sink input: too many inputs per sink.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (resample_method == PA_RESAMPLER_INVALID)
|
if ((flags & PA_SINK_INPUT_VARIABLE_RATE) ||
|
||||||
resample_method = s->core->resample_method;
|
!pa_sample_spec_equal(&data->sample_spec, &data->sink->sample_spec) ||
|
||||||
|
!pa_channel_map_equal(&data->channel_map, &data->sink->channel_map))
|
||||||
|
|
||||||
if (variable_rate || !pa_sample_spec_equal(spec, &s->sample_spec) || !pa_channel_map_equal(map, &s->channel_map))
|
if (!(resampler = pa_resampler_new(
|
||||||
if (!(resampler = pa_resampler_new(spec, map, &s->sample_spec, &s->channel_map, s->core->memblock_stat, resample_method))) {
|
&data->sample_spec, &data->channel_map,
|
||||||
|
&data->sink->sample_spec, &data->sink->channel_map,
|
||||||
|
core->memblock_stat,
|
||||||
|
data->resample_method))) {
|
||||||
pa_log_warn(__FILE__": Unsupported resampling operation.");
|
pa_log_warn(__FILE__": Unsupported resampling operation.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
@ -100,15 +146,16 @@ pa_sink_input* pa_sink_input_new(
|
||||||
i = pa_xnew(pa_sink_input, 1);
|
i = pa_xnew(pa_sink_input, 1);
|
||||||
i->ref = 1;
|
i->ref = 1;
|
||||||
i->state = PA_SINK_INPUT_DRAINED;
|
i->state = PA_SINK_INPUT_DRAINED;
|
||||||
i->name = pa_xstrdup(name);
|
i->flags = flags;
|
||||||
i->driver = pa_xstrdup(driver);
|
i->name = pa_xstrdup(data->name);
|
||||||
i->owner = NULL;
|
i->driver = pa_xstrdup(data->driver);
|
||||||
i->sink = s;
|
i->module = data->module;
|
||||||
i->client = NULL;
|
i->sink = data->sink;
|
||||||
|
i->client = data->client;
|
||||||
|
|
||||||
i->sample_spec = *spec;
|
i->sample_spec = data->sample_spec;
|
||||||
i->channel_map = *map;
|
i->channel_map = data->channel_map;
|
||||||
i->volume = *volume;
|
i->volume = data->volume;
|
||||||
|
|
||||||
i->peek = NULL;
|
i->peek = NULL;
|
||||||
i->drop = NULL;
|
i->drop = NULL;
|
||||||
|
|
@ -116,25 +163,26 @@ pa_sink_input* pa_sink_input_new(
|
||||||
i->get_latency = NULL;
|
i->get_latency = NULL;
|
||||||
i->underrun = NULL;
|
i->underrun = NULL;
|
||||||
i->userdata = NULL;
|
i->userdata = NULL;
|
||||||
|
|
||||||
i->move_silence = 0;
|
i->move_silence = 0;
|
||||||
|
|
||||||
pa_memchunk_reset(&i->resampled_chunk);
|
pa_memchunk_reset(&i->resampled_chunk);
|
||||||
i->resampler = resampler;
|
i->resampler = resampler;
|
||||||
i->resample_method = resample_method;
|
i->resample_method = data->resample_method;
|
||||||
i->variable_rate = variable_rate;
|
|
||||||
|
|
||||||
i->silence_memblock = NULL;
|
i->silence_memblock = NULL;
|
||||||
|
|
||||||
assert(s->core);
|
r = pa_idxset_put(core->sink_inputs, i, &i->index);
|
||||||
r = pa_idxset_put(s->core->sink_inputs, i, &i->index);
|
assert(r == 0);
|
||||||
assert(r == 0 && i->index != PA_IDXSET_INVALID);
|
r = pa_idxset_put(i->sink->inputs, i, NULL);
|
||||||
r = pa_idxset_put(s->inputs, i, NULL);
|
|
||||||
assert(r == 0);
|
assert(r == 0);
|
||||||
|
|
||||||
pa_sample_spec_snprint(st, sizeof(st), spec);
|
pa_log_info(__FILE__": created %u \"%s\" on %s with sample spec %s",
|
||||||
pa_log_info(__FILE__": created %u \"%s\" on %u with sample spec \"%s\"", i->index, i->name, s->index, st);
|
i->index,
|
||||||
|
i->name,
|
||||||
|
i->sink->name,
|
||||||
|
pa_sample_spec_snprint(st, sizeof(st), &i->sample_spec));
|
||||||
|
|
||||||
pa_subscription_post(s->core, PA_SUBSCRIPTION_EVENT_SINK_INPUT|PA_SUBSCRIPTION_EVENT_NEW, i->index);
|
pa_subscription_post(core, PA_SUBSCRIPTION_EVENT_SINK_INPUT|PA_SUBSCRIPTION_EVENT_NEW, i->index);
|
||||||
|
|
||||||
/* We do not call pa_sink_notify() here, because the virtual
|
/* We do not call pa_sink_notify() here, because the virtual
|
||||||
* functions have not yet been initialized */
|
* functions have not yet been initialized */
|
||||||
|
|
|
||||||
|
|
@ -27,11 +27,13 @@
|
||||||
typedef struct pa_sink_input pa_sink_input;
|
typedef struct pa_sink_input pa_sink_input;
|
||||||
|
|
||||||
#include <pulse/sample.h>
|
#include <pulse/sample.h>
|
||||||
#include <pulsecore/sink.h>
|
#include <pulsecore/hook-list.h>
|
||||||
#include <pulsecore/memblockq.h>
|
#include <pulsecore/memblockq.h>
|
||||||
#include <pulsecore/resampler.h>
|
#include <pulsecore/resampler.h>
|
||||||
#include <pulsecore/module.h>
|
#include <pulsecore/module.h>
|
||||||
#include <pulsecore/client.h>
|
#include <pulsecore/client.h>
|
||||||
|
#include <pulsecore/sink.h>
|
||||||
|
#include <pulsecore/core.h>
|
||||||
|
|
||||||
typedef enum pa_sink_input_state {
|
typedef enum pa_sink_input_state {
|
||||||
PA_SINK_INPUT_RUNNING, /*< The stream is alive and kicking */
|
PA_SINK_INPUT_RUNNING, /*< The stream is alive and kicking */
|
||||||
|
|
@ -40,20 +42,25 @@ typedef enum pa_sink_input_state {
|
||||||
PA_SINK_INPUT_DISCONNECTED /*< The stream is dead */
|
PA_SINK_INPUT_DISCONNECTED /*< The stream is dead */
|
||||||
} pa_sink_input_state_t;
|
} pa_sink_input_state_t;
|
||||||
|
|
||||||
|
typedef enum pa_sink_input_flags {
|
||||||
|
PA_SINK_INPUT_VARIABLE_RATE = 1,
|
||||||
|
PA_SINK_INPUT_NO_HOOKS = 2
|
||||||
|
} pa_sink_input_flags_t;
|
||||||
|
|
||||||
struct pa_sink_input {
|
struct pa_sink_input {
|
||||||
int ref;
|
int ref;
|
||||||
uint32_t index;
|
uint32_t index;
|
||||||
pa_sink_input_state_t state;
|
pa_sink_input_state_t state;
|
||||||
|
pa_sink_input_flags_t flags;
|
||||||
|
|
||||||
char *name, *driver; /* may be NULL */
|
char *name, *driver; /* may be NULL */
|
||||||
pa_module *owner; /* may be NULL */
|
pa_module *module; /* may be NULL */
|
||||||
|
pa_client *client; /* may be NULL */
|
||||||
|
|
||||||
pa_sink *sink;
|
pa_sink *sink;
|
||||||
pa_client *client; /* may be NULL */
|
|
||||||
|
|
||||||
pa_sample_spec sample_spec;
|
pa_sample_spec sample_spec;
|
||||||
pa_channel_map channel_map;
|
pa_channel_map channel_map;
|
||||||
|
|
||||||
pa_cvolume volume;
|
pa_cvolume volume;
|
||||||
|
|
||||||
/* Some silence to play before the actual data. This is used to
|
/* Some silence to play before the actual data. This is used to
|
||||||
|
|
@ -78,15 +85,29 @@ struct pa_sink_input {
|
||||||
pa_memblock *silence_memblock; /* may be NULL */
|
pa_memblock *silence_memblock; /* may be NULL */
|
||||||
};
|
};
|
||||||
|
|
||||||
pa_sink_input* pa_sink_input_new(
|
typedef struct pa_sink_input_new_data {
|
||||||
pa_sink *s,
|
const char *name, *driver;
|
||||||
const char *driver,
|
pa_module *module;
|
||||||
const char *name,
|
pa_client *client;
|
||||||
const pa_sample_spec *spec,
|
|
||||||
const pa_channel_map *map,
|
pa_sink *sink;
|
||||||
const pa_cvolume *volume,
|
|
||||||
int variable_rate,
|
pa_sample_spec sample_spec;
|
||||||
pa_resample_method_t resample_method);
|
int sample_spec_is_set;
|
||||||
|
pa_channel_map channel_map;
|
||||||
|
int channel_map_is_set;
|
||||||
|
pa_cvolume volume;
|
||||||
|
int volume_is_set;
|
||||||
|
|
||||||
|
pa_resample_method_t resample_method;
|
||||||
|
} pa_sink_input_new_data;
|
||||||
|
|
||||||
|
pa_sink_input_new_data* pa_sink_input_new_data_init(pa_sink_input_new_data *data);
|
||||||
|
void pa_sink_input_new_data_set_sample_spec(pa_sink_input_new_data *data, const pa_sample_spec *spec);
|
||||||
|
void pa_sink_input_new_data_set_channel_map(pa_sink_input_new_data *data, const pa_channel_map *map);
|
||||||
|
void pa_sink_input_new_data_set_volume(pa_sink_input_new_data *data, const pa_cvolume *volume);
|
||||||
|
|
||||||
|
pa_sink_input* pa_sink_input_new(pa_core *core, pa_sink_input_new_data *data, pa_sink_input_flags_t flags);
|
||||||
|
|
||||||
void pa_sink_input_unref(pa_sink_input* i);
|
void pa_sink_input_unref(pa_sink_input* i);
|
||||||
pa_sink_input* pa_sink_input_ref(pa_sink_input* i);
|
pa_sink_input* pa_sink_input_ref(pa_sink_input* i);
|
||||||
|
|
|
||||||
|
|
@ -120,13 +120,20 @@ static void sink_input_drop(pa_sink_input *i, const pa_memchunk*chunk, size_t le
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int pa_play_file(pa_sink *sink, const char *fname, const pa_cvolume *volume) {
|
int pa_play_file(
|
||||||
|
pa_sink *sink,
|
||||||
|
const char *fname,
|
||||||
|
const pa_cvolume *volume) {
|
||||||
|
|
||||||
struct userdata *u = NULL;
|
struct userdata *u = NULL;
|
||||||
SF_INFO sfinfo;
|
SF_INFO sfinfo;
|
||||||
pa_sample_spec ss;
|
pa_sample_spec ss;
|
||||||
assert(sink && fname);
|
pa_sink_input_new_data data;
|
||||||
|
|
||||||
u = pa_xmalloc(sizeof(struct userdata));
|
assert(sink);
|
||||||
|
assert(fname);
|
||||||
|
|
||||||
|
u = pa_xnew(struct userdata, 1);
|
||||||
u->sink_input = NULL;
|
u->sink_input = NULL;
|
||||||
u->memchunk.memblock = NULL;
|
u->memchunk.memblock = NULL;
|
||||||
u->memchunk.index = u->memchunk.length = 0;
|
u->memchunk.index = u->memchunk.length = 0;
|
||||||
|
|
@ -172,7 +179,14 @@ int pa_play_file(pa_sink *sink, const char *fname, const pa_cvolume *volume) {
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(u->sink_input = pa_sink_input_new(sink, __FILE__, fname, &ss, NULL, volume, 0, -1)))
|
pa_sink_input_new_data_init(&data);
|
||||||
|
data.sink = sink;
|
||||||
|
data.driver = __FILE__;
|
||||||
|
data.name = fname;
|
||||||
|
pa_sink_input_new_data_set_sample_spec(&data, &ss);
|
||||||
|
pa_sink_input_new_data_set_volume(&data, volume);
|
||||||
|
|
||||||
|
if (!(u->sink_input = pa_sink_input_new(sink->core, &data, 0)))
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
u->sink_input->peek = sink_input_peek;
|
u->sink_input->peek = sink_input_peek;
|
||||||
|
|
@ -180,7 +194,7 @@ int pa_play_file(pa_sink *sink, const char *fname, const pa_cvolume *volume) {
|
||||||
u->sink_input->kill = sink_input_kill;
|
u->sink_input->kill = sink_input_kill;
|
||||||
u->sink_input->userdata = u;
|
u->sink_input->userdata = u;
|
||||||
|
|
||||||
pa_sink_notify(sink);
|
pa_sink_notify(u->sink_input->sink);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue