pulse: implement load_module of null-sink

Implement load_module of the null sink
Keep track of sink_input/source_output linked sink/source in a
better way.
Associate the global with our streams and the streams with the
global.
Don't emit the sink_input/source_output before there is a linked device
and before our stream is READY.
Improve server info to make it more look like pulse.
This commit is contained in:
Wim Taymans 2020-08-20 17:43:01 +02:00
parent e8640683bb
commit 157b15d643
4 changed files with 204 additions and 56 deletions

View file

@ -266,6 +266,8 @@ struct global {
struct spa_hook proxy_listener;
struct spa_hook object_listener;
pa_stream *stream;
union {
/* for links */
struct {
@ -292,6 +294,7 @@ struct global {
float base_volume;
float volume_step;
uint32_t active_port;
uint32_t device_index;
} node_info;
struct {
uint32_t node_id;
@ -365,6 +368,7 @@ struct pa_context {
uint32_t default_source;
};
pa_stream *pa_context_find_stream(pa_context *c, uint32_t idx);
struct global *pa_context_find_global(pa_context *c, uint32_t id);
const char *pa_context_find_global_name(pa_context *c, uint32_t id);
struct global *pa_context_find_global_by_name(pa_context *c, uint32_t mask, const char *name);
@ -404,6 +408,7 @@ struct pa_stream {
pa_format_info *format;
uint32_t stream_index;
struct global *global;
pa_buffer_attr buffer_attr;