pa_xfree(s);
}
+static bool is_builtin_device(pa_proplist *pl)
+{
+ /* FIXME: Determining the built-in device should be retrieved from device-manager. */
+ return pa_safe_streq(pa_proplist_gets(pl, PA_PROP_DEVICE_FORM_FACTOR), "internal");
+}
+
static bool shall_ignore(pa_object *o) {
pa_object_assert_ref(o);
- if (pa_sink_isinstance(o))
+ if (pa_sink_isinstance(o)) {
+ if (!is_builtin_device(PA_SINK(o)->proplist)) {
+ pa_log_error("sink [%s] is not an internal, skip this", PA_SINK(o)->name);
+ return true;
+ }
return !!(PA_SINK(o)->flags & PA_SINK_NETWORK);
+ }
- if (pa_source_isinstance(o))
+ if (pa_source_isinstance(o)) {
+ if (!is_builtin_device(PA_SOURCE(o)->proplist)) {
+ pa_log_error("source [%s] is not an internal, skip this", PA_SOURCE(o)->name);
+ return true;
+ }
return PA_SOURCE(o)->monitor_of || (PA_SOURCE(o)->flags & PA_SOURCE_NETWORK);
+ }
pa_assert_not_reached();
}