spa: add properties for monitor volume/mute

This commit is contained in:
Wim Taymans 2021-02-05 17:11:58 +01:00
parent 6249b00b9a
commit cf6d7b5dee
2 changed files with 10 additions and 0 deletions

View file

@ -81,6 +81,9 @@ enum spa_prop {
SPA_PROP_volumeStep, /**< a volume step (Float) */
SPA_PROP_channelMap, /**< a channelmap array
* (Array (Id enum spa_audio_channel)) */
SPA_PROP_monitorMute, /**< mute (Bool) */
SPA_PROP_monitorVolumes, /**< a volume array, one volume per
* channel (Array of Float) */
SPA_PROP_START_Video = 0x20000, /**< video related properties */
SPA_PROP_brightness,

View file

@ -77,6 +77,11 @@ static const struct spa_type_info spa_type_prop_channel_map[] = {
{ 0, 0, NULL, NULL },
};
static const struct spa_type_info spa_type_prop_monitor_volume[] = {
{ SPA_PROP_START, SPA_TYPE_Float, SPA_TYPE_INFO_BASE "monitorVolumes", NULL, },
{ 0, 0, NULL, NULL },
};
static const struct spa_type_info spa_type_props[] = {
{ SPA_PROP_START, SPA_TYPE_Id, SPA_TYPE_INFO_PROPS_BASE, spa_type_param, },
{ SPA_PROP_unknown, SPA_TYPE_None, SPA_TYPE_INFO_PROPS_BASE "unknown", NULL },
@ -105,6 +110,8 @@ static const struct spa_type_info spa_type_props[] = {
{ SPA_PROP_volumeBase, SPA_TYPE_Float, SPA_TYPE_INFO_PROPS_BASE "volumeBase", NULL },
{ SPA_PROP_volumeStep, SPA_TYPE_Float, SPA_TYPE_INFO_PROPS_BASE "volumeStep", NULL },
{ SPA_PROP_channelMap, SPA_TYPE_Array, SPA_TYPE_INFO_PROPS_BASE "channelMap", spa_type_prop_channel_map },
{ SPA_PROP_monitorMute, SPA_TYPE_Bool, SPA_TYPE_INFO_PROPS_BASE "monitorMute", NULL },
{ SPA_PROP_monitorVolumes, SPA_TYPE_Array, SPA_TYPE_INFO_PROPS_BASE "monitorVolumes", spa_type_prop_monitor_volume },
{ SPA_PROP_brightness, SPA_TYPE_Int, SPA_TYPE_INFO_PROPS_BASE "brightness", NULL },
{ SPA_PROP_contrast, SPA_TYPE_Int, SPA_TYPE_INFO_PROPS_BASE "contrast", NULL },