+ +
2da5fe7 OpenAVX v0.2.0 - High-performance open-standard IP audio and video transport suite
saifmukhtar · 2026-11-24
main
| 1 | /* Simple Plugin API */ |
| 2 | /* SPDX-FileCopyrightText: Copyright © 2019 Wim Taymans */ |
| 3 | /* SPDX-License-Identifier: MIT */ |
| 4 | |
| 5 | #ifndef SPA_UTILS_KEYS_H |
| 6 | #define SPA_UTILS_KEYS_H |
| 7 | |
| 8 | #ifdef __cplusplus |
| 9 | extern "C" { |
| 10 | #endif |
| 11 | |
| 12 | /** \defgroup spa_keys Key Names |
| 13 | * Key names used by SPA plugins |
| 14 | */ |
| 15 | |
| 16 | /** |
| 17 | * \addtogroup spa_keys |
| 18 | * \{ |
| 19 | */ |
| 20 | |
| 21 | /** for objects */ |
| 22 | #define SPA_KEY_OBJECT_PATH "object.path" /**< a unique path to |
| 23 | * identity the object */ |
| 24 | |
| 25 | #define SPA_KEY_MEDIA_CLASS "media.class" /**< Media class |
| 26 | * Ex. "Audio/Device", |
| 27 | * "Video/Source",... */ |
| 28 | #define SPA_KEY_MEDIA_ROLE "media.role" /**< Role: Movie, Music, Camera, |
| 29 | * Screen, Communication, Game, |
| 30 | * Notification, DSP, Production, |
| 31 | * Accessibility, Test */ |
| 32 | /** keys for udev api */ |
| 33 | #define SPA_KEY_API_UDEV "api.udev" /**< key for the udev api */ |
| 34 | #define SPA_KEY_API_UDEV_MATCH "api.udev.match" /**< udev subsystem match */ |
| 35 | |
| 36 | /** keys for alsa api */ |
| 37 | #define SPA_KEY_API_ALSA "api.alsa" /**< key for the alsa api */ |
| 38 | #define SPA_KEY_API_ALSA_PATH "api.alsa.path" /**< alsa device path as can be |
| 39 | * used in snd_pcm_open() and |
| 40 | * snd_ctl_open(). */ |
| 41 | #define SPA_KEY_API_ALSA_CARD "api.alsa.card" /**< alsa card number */ |
| 42 | #define SPA_KEY_API_ALSA_USE_UCM "api.alsa.use-ucm" /**< if UCM should be used */ |
| 43 | #define SPA_KEY_API_ALSA_IGNORE_DB "api.alsa.ignore-dB" /**< if decibel info should be ignored */ |
| 44 | #define SPA_KEY_API_ALSA_OPEN_UCM "api.alsa.open.ucm" /**< if UCM should be opened card */ |
| 45 | #define SPA_KEY_API_ALSA_DISABLE_LONGNAME \ |
| 46 | "api.alsa.disable-longname" /**< if card long name should not be passed to MIDI port */ |
| 47 | #define SPA_KEY_API_ALSA_BIND_CTLS "api.alsa.bind-ctls" /**< alsa controls to bind as params */ |
| 48 | #define SPA_KEY_API_ALSA_SPLIT_ENABLE "api.alsa.split-enable" /**< For UCM devices with split PCMs, don't split to |
| 49 | * multiple PCMs using alsa-lib plugins, but instead |
| 50 | * add api.alsa.split properties to emitted nodes |
| 51 | * with PCM splitting information. |
| 52 | */ |
| 53 | #define SPA_KEY_API_ALSA_SPLIT_PARENT "api.alsa.split.parent" /**< PCM is UCM SplitPCM parent PCM, |
| 54 | * to be opened with SplitPCM set. |
| 55 | */ |
| 56 | |
| 57 | /** info from alsa card_info */ |
| 58 | #define SPA_KEY_API_ALSA_CARD_ID "api.alsa.card.id" /**< id from card_info */ |
| 59 | #define SPA_KEY_API_ALSA_CARD_COMPONENTS \ |
| 60 | "api.alsa.card.components" /**< components from card_info */ |
| 61 | #define SPA_KEY_API_ALSA_CARD_DRIVER "api.alsa.card.driver" /**< driver from card_info */ |
| 62 | #define SPA_KEY_API_ALSA_CARD_NAME "api.alsa.card.name" /**< name from card_info */ |
| 63 | #define SPA_KEY_API_ALSA_CARD_LONGNAME "api.alsa.card.longname" /**< longname from card_info */ |
| 64 | #define SPA_KEY_API_ALSA_CARD_MIXERNAME "api.alsa.card.mixername" /**< mixername from card_info */ |
| 65 | |
| 66 | /** info from alsa pcm_info */ |
| 67 | #define SPA_KEY_API_ALSA_PCM_ID "api.alsa.pcm.id" /**< id from pcm_info */ |
| 68 | #define SPA_KEY_API_ALSA_PCM_CARD "api.alsa.pcm.card" /**< card from pcm_info */ |
| 69 | #define SPA_KEY_API_ALSA_PCM_NAME "api.alsa.pcm.name" /**< name from pcm_info */ |
| 70 | #define SPA_KEY_API_ALSA_PCM_SUBNAME "api.alsa.pcm.subname" /**< subdevice_name from pcm_info */ |
| 71 | #define SPA_KEY_API_ALSA_PCM_STREAM "api.alsa.pcm.stream" /**< stream type from pcm_info */ |
| 72 | #define SPA_KEY_API_ALSA_PCM_CLASS "api.alsa.pcm.class" /**< class from pcm_info as string */ |
| 73 | #define SPA_KEY_API_ALSA_PCM_DEVICE "api.alsa.pcm.device" /**< device from pcm_info */ |
| 74 | #define SPA_KEY_API_ALSA_PCM_SUBDEVICE "api.alsa.pcm.subdevice" /**< subdevice from pcm_info */ |
| 75 | #define SPA_KEY_API_ALSA_PCM_SUBCLASS "api.alsa.pcm.subclass" /**< subclass from pcm_info as string */ |
| 76 | #define SPA_KEY_API_ALSA_PCM_SYNC_ID "api.alsa.pcm.sync-id" /**< sync id */ |
| 77 | |
| 78 | #define SPA_KEY_API_ALSA_SPLIT_POSITION "api.alsa.split.position" /**< (SPA JSON list) If present, this is a |
| 79 | * virtual device corresponding to a subset of |
| 80 | * channels in an underlying PCM, listed in this |
| 81 | * property. The \ref SPA_KEY_API_ALSA_PATH |
| 82 | * contains the underlying split PCM. */ |
| 83 | #define SPA_KEY_API_ALSA_SPLIT_HW_POSITION \ |
| 84 | "api.alsa.split.hw-position" /**< (SPA JSON list) Channel map of the |
| 85 | * underlying split PCM. */ |
| 86 | |
| 87 | /** keys for v4l2 api */ |
| 88 | #define SPA_KEY_API_V4L2 "api.v4l2" /**< key for the v4l2 api */ |
| 89 | #define SPA_KEY_API_V4L2_PATH "api.v4l2.path" /**< v4l2 device path as can be |
| 90 | * used in open() */ |
| 91 | |
| 92 | /** keys for libcamera api */ |
| 93 | #define SPA_KEY_API_LIBCAMERA "api.libcamera" /**< key for the libcamera api */ |
| 94 | #define SPA_KEY_API_LIBCAMERA_PATH "api.libcamera.path" /**< libcamera device path as can be |
| 95 | * used in open() */ |
| 96 | #define SPA_KEY_API_LIBCAMERA_LOCATION "api.libcamera.location" /**< location of the camera: |
| 97 | * "front", "back" or "external" */ |
| 98 | #define SPA_KEY_API_LIBCAMERA_ROTATION "api.libcamera.rotation" /**< rotation of the camera: |
| 99 | * "0", "90", "180" or "270" */ |
| 100 | |
| 101 | /** info from v4l2_capability */ |
| 102 | #define SPA_KEY_API_V4L2_CAP_DRIVER "api.v4l2.cap.driver" /**< driver from capbility */ |
| 103 | #define SPA_KEY_API_V4L2_CAP_CARD "api.v4l2.cap.card" /**< caps from capability */ |
| 104 | #define SPA_KEY_API_V4L2_CAP_BUS_INFO "api.v4l2.cap.bus_info" /**< bus_info from capability */ |
| 105 | #define SPA_KEY_API_V4L2_CAP_VERSION "api.v4l2.cap.version" /**< version from capability as %u.%u.%u */ |
| 106 | #define SPA_KEY_API_V4L2_CAP_CAPABILITIES \ |
| 107 | "api.v4l2.cap.capabilities" /**< capabilities from capability */ |
| 108 | #define SPA_KEY_API_V4L2_CAP_DEVICE_CAPS \ |
| 109 | "api.v4l2.cap.device-caps" /**< device_caps from capability */ |
| 110 | |
| 111 | |
| 112 | /** keys for bluez5 api */ |
| 113 | #define SPA_KEY_API_BLUEZ5 "api.bluez5" /**< key for the bluez5 api */ |
| 114 | #define SPA_KEY_API_BLUEZ5_PATH "api.bluez5.path" /**< a bluez5 path */ |
| 115 | #define SPA_KEY_API_BLUEZ5_DEVICE "api.bluez5.device" /**< an internal bluez5 device */ |
| 116 | #define SPA_KEY_API_BLUEZ5_CONNECTION "api.bluez5.connection" /**< bluez5 device connection status */ |
| 117 | #define SPA_KEY_API_BLUEZ5_TRANSPORT "api.bluez5.transport" /**< an internal bluez5 transport */ |
| 118 | #define SPA_KEY_API_BLUEZ5_PROFILE "api.bluez5.profile" /**< a bluetooth profile */ |
| 119 | #define SPA_KEY_API_BLUEZ5_ADDRESS "api.bluez5.address" /**< a bluetooth address */ |
| 120 | #define SPA_KEY_API_BLUEZ5_CODEC "api.bluez5.codec" /**< a bluetooth codec */ |
| 121 | #define SPA_KEY_API_BLUEZ5_CLASS "api.bluez5.class" /**< a bluetooth class */ |
| 122 | #define SPA_KEY_API_BLUEZ5_ICON "api.bluez5.icon" /**< a bluetooth icon */ |
| 123 | #define SPA_KEY_API_BLUEZ5_ROLE "api.bluez5.role" /**< "client" or "server" */ |
| 124 | |
| 125 | /** keys for jack api */ |
| 126 | #define SPA_KEY_API_JACK "api.jack" /**< key for the JACK api */ |
| 127 | #define SPA_KEY_API_JACK_SERVER "api.jack.server" /**< a jack server name */ |
| 128 | #define SPA_KEY_API_JACK_CLIENT "api.jack.client" /**< an internal jack client */ |
| 129 | |
| 130 | /** keys for glib api */ |
| 131 | #define SPA_KEY_API_GLIB_MAINLOOP "api.glib.mainloop" /**< whether glib mainloop runs |
| 132 | * in same thread as PW loop */ |
| 133 | |
| 134 | /** |
| 135 | * \} |
| 136 | */ |
| 137 | |
| 138 | #ifdef __cplusplus |
| 139 | } /* extern "C" */ |
| 140 | #endif |
| 141 | |
| 142 | #endif /* SPA_UTILS_KEYS_H */ |