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