Lines Matching defs:source
31 #include <pulsecore/source-output.h>
126 if (new_data->source) {
136 /* Prefer the default source over any other source, just in case... */
207 static pa_hook_result_t source_put_hook_callback(pa_core *c, pa_source *source, struct userdata *u) {
212 pa_assert(source);
216 if (source->monitor_of)
222 if (so->source == source)
230 if (!so->source)
233 if (pa_safe_streq(so->source->name, so->preferred_source))
236 /* It might happen that a stream and a source are set up at the
245 if (role_match(so->source->proplist, role))
248 if (!role_match(source->proplist, role))
251 pa_source_output_move_to(so, source, false);
308 static pa_hook_result_t source_unlink_hook_callback(pa_core *c, pa_source *source, struct userdata *u) {
313 pa_assert(source);
321 /* If there not default source, then there is no source at all */
325 PA_IDXSET_FOREACH(so, source->outputs, idx) {
333 if (!so->source)
339 /* Would the default source fit? If so, let's use it */
340 if (c->default_source != source && role_match(c->default_source->proplist, role)
341 && !source->monitor_of == !c->default_source->monitor_of) {
346 /* Try to find some other fitting source */
349 if (d == c->default_source || d == source)
356 if (!source->monitor_of == !d->monitor_of && role_match(d->proplist, role)) {