Lines Matching defs:source

33 #define SOURCE_OBJECT_NAME "source"
82 pa_source *source;
267 idx = (d->type == PA_DEVICE_TYPE_SINK) ? d->sink->index : d->source->index;
280 name = (d->type == PA_DEVICE_TYPE_SINK) ? d->sink->name : d->source->name;
293 driver = (d->type == PA_DEVICE_TYPE_SINK) ? d->sink->driver : d->source->driver;
307 owner_module = (d->type == PA_DEVICE_TYPE_SINK) ? d->sink->module : d->source->module;
315 "Source %s doesn't have an owner module.", d->source->name);
333 card = (d->type == PA_DEVICE_TYPE_SINK) ? d->sink->card : d->source->card;
341 "Source %s doesn't belong to any card.", d->source->name);
358 sample_format = (d->type == PA_DEVICE_TYPE_SINK) ? d->sink->sample_spec.format : d->source->sample_spec.format;
371 sample_rate = (d->type == PA_DEVICE_TYPE_SINK) ? d->sink->sample_spec.rate : d->source->sample_spec.rate;
386 channel_map = (d->type == PA_DEVICE_TYPE_SINK) ? &d->sink->channel_map : &d->source->channel_map;
423 device_channels = (d->type == PA_DEVICE_TYPE_SINK) ? d->sink->channel_map.channels : d->source->channel_map.channels;
448 pa_source_set_volume(d->source, &new_vol, true, true);
476 : !!(d->source->flags & PA_SOURCE_DECIBEL_VOLUME);
489 base_volume = (d->type == PA_DEVICE_TYPE_SINK) ? d->sink->base_volume : d->source->base_volume;
502 volume_steps = (d->type == PA_DEVICE_TYPE_SINK) ? d->sink->n_volume_steps : d->source->n_volume_steps;
531 pa_source_set_mute(d->source, mute, true);
546 : !!(d->source->flags & PA_SOURCE_HW_VOLUME_CTRL);
561 : !!(d->source->flags & PA_SOURCE_HW_MUTE_CTRL);
576 : pa_source_get_requested_latency(d->source);
591 : !!(d->source->flags & PA_SOURCE_DYNAMIC_LATENCY);
610 if (d->type == PA_DEVICE_TYPE_SOURCE && !(d->source->flags & PA_SOURCE_LATENCY)) {
612 "Source %s doesn't support latency querying.", d->source->name);
616 latency = (d->type == PA_DEVICE_TYPE_SINK) ? pa_sink_get_latency(d->sink) : pa_source_get_latency(d->source);
631 : !!(d->source->flags & PA_SOURCE_HARDWARE);
646 : !!(d->source->flags & PA_SOURCE_NETWORK);
719 "The source %s has no ports, and therefore there's no active port either.", d->source->name);
749 "The source %s has no ports, and therefore there's no active port either.", d->source->name);
774 if ((r = pa_source_set_port(d->source, pa_dbusiface_device_port_get_name(new_active), true)) < 0) {
854 idx = d->source->index;
855 name = d->source->name;
856 driver = d->source->driver;
857 owner_module = d->source->module;
858 card = d->source->card;
859 sample_format = d->source->sample_spec.format;
860 sample_rate = d->source->sample_spec.rate;
861 channel_map = &d->source->channel_map;
863 has_convertible_to_decibel_volume = !!(d->source->flags & PA_SOURCE_DECIBEL_VOLUME);
864 base_volume = d->source->base_volume;
865 volume_steps = d->source->n_volume_steps;
866 has_hardware_volume = !!(d->source->flags & PA_SOURCE_HW_VOLUME_CTRL);
867 has_hardware_mute = !!(d->source->flags & PA_SOURCE_HW_MUTE_CTRL);
868 configured_latency = pa_source_get_requested_latency(d->source);
869 has_dynamic_latency = !!(d->source->flags & PA_SOURCE_DYNAMIC_LATENCY);
870 latency = pa_source_get_latency(d->source);
871 is_hardware_device = !!(d->source->flags & PA_SOURCE_HARDWARE);
872 is_network_device = !!(d->source->flags & PA_SOURCE_NETWORK);
873 state = d->source->state;
956 pa_log_debug("%s source %s requested by client %" PRIu32 ".", suspend ? "Suspending" : "Resuming", d->source->name, client->index);
958 if (pa_source_suspend(d->source, suspend, PA_SUSPEND_USER) < 0) {
985 "%s: No such port on source %s.", port_name, d->source->name);
1045 if (!d->source->monitor_of) {
1046 pa_dbus_send_error(conn, msg, PA_DBUS_ERROR_NO_SUCH_PROPERTY, "Source %s is not a monitor source.", d->source->name);
1050 monitor_of_sink = pa_dbusiface_core_get_sink_path(d->core, d->source->monitor_of);
1067 if (d->source->monitor_of)
1068 monitor_of_sink = pa_dbusiface_core_get_sink_path(d->core, d->source->monitor_of);
1092 (d->type == PA_DEVICE_TYPE_SOURCE && d->source != call_data))
1097 : pa_source_get_volume(d->source, false);
1128 (d->type == PA_DEVICE_TYPE_SOURCE && d->source != call_data))
1133 : pa_source_get_mute(d->source, false);
1157 (d->type == PA_DEVICE_TYPE_SOURCE && d->source != call_data))
1163 new_source_state = d->source->state;
1194 (d->type == PA_DEVICE_TYPE_SOURCE && d->source != call_data))
1197 new_active_port = (d->type == PA_DEVICE_TYPE_SINK) ? d->sink->active_port : d->source->active_port;
1223 (d->type == PA_DEVICE_TYPE_SOURCE && d->source != call_data))
1226 new_proplist = (d->type == PA_DEVICE_TYPE_SINK) ? d->sink->proplist : d->source->proplist;
1289 pa_dbusiface_device *pa_dbusiface_device_new_source(pa_dbusiface_core *core, pa_source *source) {
1295 pa_assert(source);
1299 d->source = pa_source_ref(source);
1301 d->path = pa_sprintf_malloc("%s/%s%u", PA_DBUS_CORE_OBJECT_PATH, SOURCE_OBJECT_NAME, source->index);
1302 d->volume = *pa_source_get_volume(source, false);
1303 d->mute = pa_source_get_mute(source, false);
1304 d->source_state = source->state;
1307 d->active_port = source->active_port;
1308 d->proplist = pa_proplist_copy(source->proplist);
1309 d->dbus_protocol = pa_dbus_protocol_get(source->core);
1310 d->volume_changed_slot = pa_hook_connect(&source->core->hooks[PA_CORE_HOOK_SOURCE_VOLUME_CHANGED],
1312 d->mute_changed_slot = pa_hook_connect(&source->core->hooks[PA_CORE_HOOK_SOURCE_MUTE_CHANGED],
1314 d->state_changed_slot = pa_hook_connect(&source->core->hooks[PA_CORE_HOOK_SOURCE_STATE_CHANGED],
1316 d->port_changed_slot = pa_hook_connect(&source->core->hooks[PA_CORE_HOOK_SOURCE_PORT_CHANGED],
1318 d->proplist_changed_slot = pa_hook_connect(&source->core->hooks[PA_CORE_HOOK_SOURCE_PROPLIST_CHANGED],
1321 PA_HASHMAP_FOREACH(port, source->ports, state) {
1322 pa_dbusiface_device_port *p = pa_dbusiface_device_port_new(d, source->core, port, d->next_port_index++);
1349 pa_source_unref(d->source);
1376 return d->source;