PipeWire 1.0.5
Loading...
Searching...
No Matches
command.h
Go to the documentation of this file.
1/* Simple Plugin API */
2/* SPDX-FileCopyrightText: Copyright © 2018 Wim Taymans */
3/* SPDX-License-Identifier: MIT */
4
5#ifndef SPA_COMMAND_H
6#define SPA_COMMAND_H
7
8#ifdef __cplusplus
9extern "C" {
10#endif
11
12#include <spa/utils/defs.h>
13#include <spa/pod/pod.h>
14
20struct spa_command_body {
22};
23
24struct spa_command {
25 struct spa_pod pod;
27};
28
29#define SPA_COMMAND_TYPE(cmd) ((cmd)->body.body.type)
30#define SPA_COMMAND_ID(cmd,type) (SPA_COMMAND_TYPE(cmd) == (type) ? \
31 (cmd)->body.body.id : SPA_ID_INVALID)
32
33#define SPA_COMMAND_INIT_FULL(t,size,type,id,...) ((t) \
34 { { (size), SPA_TYPE_Object }, \
35 { { (type), (id) }, ##__VA_ARGS__ } })
37#define SPA_COMMAND_INIT(type,id) \
38 SPA_COMMAND_INIT_FULL(struct spa_command, \
39 sizeof(struct spa_command_body), type, id)
40
45#ifdef __cplusplus
46} /* extern "C" */
47#endif
48
49#endif /* SPA_COMMAND_H */
spa/utils/defs.h
spa/pod/pod.h
Definition command.h:25
struct spa_pod_object_body body
Definition command.h:26
Definition command.h:29
struct spa_command_body body
Definition command.h:31
struct spa_pod pod
Definition command.h:30
Definition pod.h:177
Definition pod.h:43