pump up version number and update changelog
[profile/ivi/pulseaudio-module-murphy-ivi.git] / combine / userdata.h
1 #ifndef foocombinesinkuserdatafoo
2 #define foocombinesinkuserdatafoo
3
4 struct output {
5     struct userdata *userdata;
6
7     pa_sink *sink;
8     pa_sink_input *sink_input;
9     bool ignore_state_change;
10
11     pa_asyncmsgq *inq,    /* Message queue from the sink thread to this sink input */
12                  *outq;   /* Message queue from this sink input to the sink thread */
13     pa_rtpoll_item *inq_rtpoll_item_read, *inq_rtpoll_item_write;
14     pa_rtpoll_item *outq_rtpoll_item_read, *outq_rtpoll_item_write;
15
16     pa_memblockq *memblockq;
17
18     /* For communication of the stream latencies to the main thread */
19     pa_usec_t total_latency;
20
21     /* For communication of the stream parameters to the sink thread */
22     pa_atomic_t max_request;
23     pa_atomic_t requested_latency;
24
25     PA_LLIST_FIELDS(struct output);
26 };
27
28 struct userdata {
29     pa_core *core;
30     pa_module *module;
31     pa_sink *sink;
32
33     pa_thread *thread;
34     pa_thread_mq thread_mq;
35     pa_rtpoll *rtpoll;
36
37     pa_time_event *time_event;
38     pa_usec_t adjust_time;
39
40     bool automatic;
41     bool auto_desc;
42     bool no_reattach;
43
44     pa_strlist *unlinked_slaves;
45
46     pa_hook_slot *sink_put_slot, *sink_unlink_slot, *sink_state_changed_slot;
47
48     pa_resample_method_t resample_method;
49
50     pa_usec_t block_usec;
51
52     pa_idxset* outputs; /* managed in main context */
53
54     struct {
55         PA_LLIST_HEAD(struct output, active_outputs); /* managed in IO thread context */
56         pa_atomic_t running;  /* we cache that value here, so that every thread can query it cheaply */
57         pa_usec_t timestamp;
58         bool in_null_mode;
59         pa_smoother *smoother;
60         uint64_t counter;
61     } thread_info;
62
63     pa_sink_input *  (*add_slave)(struct userdata *, pa_sink *);
64     void             (*remove_slave)(struct userdata *, pa_sink_input *, pa_sink *);
65     int              (*move_slave)(struct userdata *, pa_sink_input *, pa_sink *);
66 };
67
68
69 #endif