mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-03-18 05:34:07 -04:00
data-loop: add functions to get name and class
This can be used to force nodes in the same class or data-loop.
This commit is contained in:
parent
4f352ca46b
commit
8459f6d25c
2 changed files with 35 additions and 0 deletions
|
|
@ -193,6 +193,36 @@ pw_data_loop_get_loop(struct pw_data_loop *loop)
|
||||||
return loop->loop;
|
return loop->loop;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Get the loop name
|
||||||
|
* \param loop the data loop to query
|
||||||
|
* \return the data loop name
|
||||||
|
*
|
||||||
|
* Get the name of the data loop. The data loop name is a unique name that
|
||||||
|
* identifies this data loop.
|
||||||
|
*
|
||||||
|
* \since 1.1.0
|
||||||
|
*/
|
||||||
|
SPA_EXPORT
|
||||||
|
const char * pw_data_loop_get_name(struct pw_data_loop *loop)
|
||||||
|
{
|
||||||
|
return loop->name;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get the loop class
|
||||||
|
* \param loop the data loop to query
|
||||||
|
* \return the data loop class
|
||||||
|
*
|
||||||
|
* Get the class of the data loop. Multiple data loop can have the same class
|
||||||
|
* and processing can be assigned to any data loop from the same class.
|
||||||
|
*
|
||||||
|
* \since 1.1.0
|
||||||
|
*/
|
||||||
|
SPA_EXPORT
|
||||||
|
const char * pw_data_loop_get_class(struct pw_data_loop *loop)
|
||||||
|
{
|
||||||
|
return loop->class;
|
||||||
|
}
|
||||||
|
|
||||||
/** Start a data loop
|
/** Start a data loop
|
||||||
* \param loop the data loop to start
|
* \param loop the data loop to start
|
||||||
* \return 0 if ok, -1 on error
|
* \return 0 if ok, -1 on error
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,11 @@ void pw_data_loop_exit(struct pw_data_loop *loop);
|
||||||
struct pw_loop *
|
struct pw_loop *
|
||||||
pw_data_loop_get_loop(struct pw_data_loop *loop);
|
pw_data_loop_get_loop(struct pw_data_loop *loop);
|
||||||
|
|
||||||
|
/** Get the loop name. Since 1.1.0 */
|
||||||
|
const char * pw_data_loop_get_name(struct pw_data_loop *loop);
|
||||||
|
/** Get the loop class. Since 1.1.0 */
|
||||||
|
const char * pw_data_loop_get_class(struct pw_data_loop *loop);
|
||||||
|
|
||||||
/** Destroy the loop */
|
/** Destroy the loop */
|
||||||
void pw_data_loop_destroy(struct pw_data_loop *loop);
|
void pw_data_loop_destroy(struct pw_data_loop *loop);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue