mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-18 07:00:06 -05:00
conf: support property rules
Add pw_conf_section_update_props_rules() that will not only update the properties of a section but wil also apply rules in section.rules and match against the context properties. Use this by default when using pw_context_conf_update_props(). Add a new method to get a string name of the VM type. Place the cpu.vm.name in the context properties. This makes it possible to deprecate the vm.overrides with something more flexible based on rules. Update the conf files and docs to refect this.
This commit is contained in:
parent
afd0affd97
commit
7e9e261fa6
12 changed files with 178 additions and 41 deletions
|
|
@ -87,6 +87,46 @@ struct spa_cpu { struct spa_interface iface; };
|
|||
#define SPA_CPU_VM_ACRN (1 << 13)
|
||||
#define SPA_CPU_VM_POWERVM (1 << 14)
|
||||
|
||||
static inline const char *spa_cpu_vm_type_to_string(uint32_t vm_type)
|
||||
{
|
||||
switch(vm_type) {
|
||||
case SPA_CPU_VM_NONE:
|
||||
return NULL;
|
||||
case SPA_CPU_VM_KVM:
|
||||
return "kvm";
|
||||
case SPA_CPU_VM_QEMU:
|
||||
return "qemu";
|
||||
case SPA_CPU_VM_BOCHS:
|
||||
return "bochs";
|
||||
case SPA_CPU_VM_XEN:
|
||||
return "xen";
|
||||
case SPA_CPU_VM_UML:
|
||||
return "uml";
|
||||
case SPA_CPU_VM_VMWARE:
|
||||
return "vmware";
|
||||
case SPA_CPU_VM_ORACLE:
|
||||
return "oracle";
|
||||
case SPA_CPU_VM_MICROSOFT:
|
||||
return "microsoft";
|
||||
case SPA_CPU_VM_ZVM:
|
||||
return "zvm";
|
||||
case SPA_CPU_VM_PARALLELS:
|
||||
return "parallels";
|
||||
case SPA_CPU_VM_BHYVE:
|
||||
return "bhyve";
|
||||
case SPA_CPU_VM_QNX:
|
||||
return "qnx";
|
||||
case SPA_CPU_VM_ACRN:
|
||||
return "acrn";
|
||||
case SPA_CPU_VM_POWERVM:
|
||||
return "powervm";
|
||||
case SPA_CPU_VM_OTHER:
|
||||
return "other";
|
||||
default:
|
||||
return "unknown";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* methods
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue