mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-05-23 21:37:42 -04:00
add per type API defines
This commit is contained in:
parent
b03f2f7afa
commit
31802d4994
85 changed files with 1137 additions and 509 deletions
|
|
@ -14,6 +14,14 @@ extern "C" {
|
|||
#include <spa/utils/dict.h>
|
||||
#include <spa/pod/event.h>
|
||||
|
||||
#ifndef SPA_API_DEVICE
|
||||
#ifdef SPA_API_IMPL
|
||||
#define SPA_API_DEVICE SPA_API_IMPL
|
||||
#else
|
||||
#define SPA_API_DEVICE static inline
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \defgroup spa_device Device
|
||||
*
|
||||
|
|
@ -220,7 +228,7 @@ struct spa_device_methods {
|
|||
const struct spa_pod *param);
|
||||
};
|
||||
|
||||
SPA_API_IMPL int spa_device_add_listener(struct spa_device *object,
|
||||
SPA_API_DEVICE int spa_device_add_listener(struct spa_device *object,
|
||||
struct spa_hook *listener,
|
||||
const struct spa_device_events *events,
|
||||
void *data)
|
||||
|
|
@ -229,19 +237,19 @@ SPA_API_IMPL int spa_device_add_listener(struct spa_device *object,
|
|||
listener, events, data);
|
||||
|
||||
}
|
||||
SPA_API_IMPL int spa_device_sync(struct spa_device *object, int seq)
|
||||
SPA_API_DEVICE int spa_device_sync(struct spa_device *object, int seq)
|
||||
{
|
||||
return spa_api_method_r(int, -ENOTSUP, spa_device, &object->iface, sync, 0,
|
||||
seq);
|
||||
}
|
||||
SPA_API_IMPL int spa_device_enum_params(struct spa_device *object, int seq,
|
||||
SPA_API_DEVICE int spa_device_enum_params(struct spa_device *object, int seq,
|
||||
uint32_t id, uint32_t index, uint32_t max,
|
||||
const struct spa_pod *filter)
|
||||
{
|
||||
return spa_api_method_r(int, -ENOTSUP, spa_device, &object->iface, enum_params, 0,
|
||||
seq, id, index, max, filter);
|
||||
}
|
||||
SPA_API_IMPL int spa_device_set_param(struct spa_device *object,
|
||||
SPA_API_DEVICE int spa_device_set_param(struct spa_device *object,
|
||||
uint32_t id, uint32_t flags,
|
||||
const struct spa_pod *param)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -12,6 +12,14 @@ extern "C" {
|
|||
#include <spa/pod/builder.h>
|
||||
#include <spa/monitor/device.h>
|
||||
|
||||
#ifndef SPA_API_DEVICE_UTILS
|
||||
#ifdef SPA_API_IMPL
|
||||
#define SPA_API_DEVICE_UTILS SPA_API_IMPL
|
||||
#else
|
||||
#define SPA_API_DEVICE_UTILS static inline
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \addtogroup spa_device
|
||||
* \{
|
||||
|
|
@ -22,7 +30,7 @@ struct spa_result_device_params_data {
|
|||
struct spa_result_device_params data;
|
||||
};
|
||||
|
||||
SPA_API_IMPL void spa_result_func_device_params(void *data, int seq SPA_UNUSED, int res SPA_UNUSED,
|
||||
SPA_API_DEVICE_UTILS void spa_result_func_device_params(void *data, int seq SPA_UNUSED, int res SPA_UNUSED,
|
||||
uint32_t type SPA_UNUSED, const void *result)
|
||||
{
|
||||
struct spa_result_device_params_data *d =
|
||||
|
|
@ -36,7 +44,7 @@ SPA_API_IMPL void spa_result_func_device_params(void *data, int seq SPA_UNUSED,
|
|||
d->data.param = spa_pod_builder_deref(d->builder, offset);
|
||||
}
|
||||
|
||||
SPA_API_IMPL int spa_device_enum_params_sync(struct spa_device *device,
|
||||
SPA_API_DEVICE_UTILS int spa_device_enum_params_sync(struct spa_device *device,
|
||||
uint32_t id, uint32_t *index,
|
||||
const struct spa_pod *filter,
|
||||
struct spa_pod **param,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue