for (item = monitor->devices; item; item = item->next) {
dev = item->data;
- if (dev->device_index == idx) {
+ if (((facility == PA_SUBSCRIPTION_EVENT_SOURCE &&
+ dev->type == GST_PULSE_DEVICE_TYPE_SOURCE) ||
+ (facility == PA_SUBSCRIPTION_EVENT_SINK &&
+ dev->type == GST_PULSE_DEVICE_TYPE_SINK)) &&
+ dev->device_index == idx) {
gst_object_ref (dev);
break;
}
"display-name", device_name, "caps", caps, "klass", klass,
"internal-name", internal_name, NULL);
+ gstdev->type = type;
gstdev->device_index = device_index;
gstdev->element = element;