Lines Matching defs:stream

35 #include "stream-interaction.h"
69 static inline pa_object* GET_DEVICE_FROM_STREAM(pa_object *stream) {
70 return pa_sink_input_isinstance(stream) ? PA_OBJECT(PA_SINK_INPUT(stream)->sink) : PA_OBJECT(PA_SOURCE_OUTPUT(stream)->source);
73 static inline pa_proplist* GET_PROPLIST_FROM_STREAM(pa_object *stream) {
74 return pa_sink_input_isinstance(stream) ? PA_SINK_INPUT(stream)->proplist : PA_SOURCE_OUTPUT(stream)->proplist;
77 static const char *get_trigger_role(struct userdata *u, pa_object *stream, struct group *g) {
81 if (!(role = pa_proplist_gets(GET_PROPLIST_FROM_STREAM(stream), PA_PROP_MEDIA_ROLE)))
162 pa_log_debug("Found a '%s' stream of '%s' that ducks a '%s' stream.", trigger_role, g->name, interaction_role);
166 pa_log_debug("Found a '%s' stream that corks/mutes a '%s' stream.", trigger_role, interaction_role);
175 pa_log_debug("In '%s', found a '%s' stream that should be unducked", g->name, interaction_role);
179 pa_log_debug("Found a '%s' stream that should be uncorked/unmuted.", interaction_role);
215 /* Some applications start their streams corked, so the stream is uncorked by */
216 /* the application only after sink_input_put() was called. If a new stream turns */
218 /* only mute the stream because corking is reverted later by the application */
267 static pa_hook_result_t process(struct userdata *u, pa_object *stream, bool create, bool new_stream) {
272 pa_object_assert_ref(stream);
276 pa_hashmap_remove(u->groups[j]->interaction_state, stream);
278 if ((pa_sink_input_isinstance(stream) && !PA_SINK_INPUT(stream)->sink) ||
279 (pa_source_output_isinstance(stream) && !PA_SOURCE_OUTPUT(stream)->source))
282 if (pa_source_output_isinstance(stream)) {
292 trigger_role = find_global_trigger_stream(u, create ? NULL : stream, u->groups[j]);
293 apply_interaction_global(u, trigger_role, create ? NULL : (pa_sink_input_isinstance(stream) ? PA_SINK_INPUT(stream) : NULL), new_stream, u->groups[j]);
295 trigger_role = find_trigger_stream(u, GET_DEVICE_FROM_STREAM(stream), create ? NULL : stream, u->groups[j]);
296 if (pa_sink_input_isinstance(stream))
297 apply_interaction_to_sink(u, PA_SINK_INPUT(stream)->sink, trigger_role, create ? NULL : PA_SINK_INPUT(stream), new_stream, u->groups[j]);