doc: Change variable name to 'SPA_PLUGIN_DIR'

Sync with 'SPA_PLUGIN_DIR' name that is used in code.

Change-Id: Ibd8f84dd2aaf4ba7f581ad44140bf7b46ae43709
This commit is contained in:
Mersad Jelacic 2022-12-12 10:53:15 +01:00
parent 63f279c826
commit 72f5dbe6a6

View file

@ -19,7 +19,7 @@ To use a plugin, the following steps are required:
In pseudo-code, loading a logger interface looks like this: In pseudo-code, loading a logger interface looks like this:
\code{.py} \code{.py}
handle = dlopen("$SPA_PLUGIN_PATH/support/libspa-support.so") handle = dlopen("$SPA_PLUGIN_DIR/support/libspa-support.so")
factory_enumeration_func = dlsym(handle, SPA_HANDLE_FACTORY_ENUM_FUNC_NAME) factory_enumeration_func = dlsym(handle, SPA_HANDLE_FACTORY_ENUM_FUNC_NAME)
spa_log *logger = NULL spa_log *logger = NULL
@ -49,8 +49,8 @@ are versioned and many versions can live on the same system.
The `spa-inspect` tool provides a CLI interface to inspect SPA plugins: The `spa-inspect` tool provides a CLI interface to inspect SPA plugins:
\verbatim \verbatim
$ export SPA_PLUGIN_PATH=$(pkg-config --variable plugindir libspa-0.2) $ export SPA_PLUGIN_DIR=$(pkg-config --variable plugindir libspa-0.2)
$ spa-inspect ${SPA_PLUGIN_PATH}/support/libspa-support.so $ spa-inspect ${SPA_PLUGIN_DIR}/support/libspa-support.so
... ...
factory version: 1 factory version: 1
factory name: 'support.cpu' factory name: 'support.cpu'
@ -87,11 +87,11 @@ later, instead of hardcoding the plugin name.
To `dlopen` a plugin we then need to prefix the plugin path like this: To `dlopen` a plugin we then need to prefix the plugin path like this:
\code{.c} \code{.c}
#define SPA_PLUGIN_PATH /usr/lib64/spa-0.2/" #define SPA_PLUGIN_DIR /usr/lib64/spa-0.2/"
void *hnd = dlopen(SPA_PLUGIN_PATH"/support/libspa-support.so", RTLD_NOW); void *hnd = dlopen(SPA_PLUGIN_DIR"/support/libspa-support.so", RTLD_NOW);
\endcode \endcode
The environment variable `SPA_PLUGIN_PATH` and `pkg-config` variable The environment variable `SPA_PLUGIN_DIR` and `pkg-config` variable
`plugindir` are usually used to find the location of the plugins. You will `plugindir` are usually used to find the location of the plugins. You will
have to do some more work to construct the shared object path. have to do some more work to construct the shared object path.