+ +
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 © 2018 Wim Taymans */ |
| 3 | /* SPDX-License-Identifier: MIT */ |
| 4 | |
| 5 | #ifndef SPA_EVENT_H |
| 6 | #define SPA_EVENT_H |
| 7 | |
| 8 | #include <spa/pod/pod.h> |
| 9 | |
| 10 | #ifdef __cplusplus |
| 11 | extern "C" { |
| 12 | #endif |
| 13 | |
| 14 | /** |
| 15 | * \addtogroup spa_pod |
| 16 | * \{ |
| 17 | */ |
| 18 | |
| 19 | struct spa_event_body { |
| 20 | struct spa_pod_object_body body; |
| 21 | }; |
| 22 | |
| 23 | struct spa_event { |
| 24 | struct spa_pod pod; |
| 25 | struct spa_event_body body; |
| 26 | }; |
| 27 | |
| 28 | #define SPA_EVENT_TYPE(ev) ((ev)->body.body.type) |
| 29 | #define SPA_EVENT_ID(ev,type) (SPA_EVENT_TYPE(ev) == (type) ? \ |
| 30 | (ev)->body.body.id : SPA_ID_INVALID) |
| 31 | |
| 32 | #define SPA_EVENT_INIT_FULL(t,size,type,id,...) ((t) \ |
| 33 | { { (size), SPA_TYPE_Object }, \ |
| 34 | { { (type), (id) }, ##__VA_ARGS__ } }) \ |
| 35 | |
| 36 | #define SPA_EVENT_INIT(type,id) \ |
| 37 | SPA_EVENT_INIT_FULL(struct spa_event, \ |
| 38 | sizeof(struct spa_event_body), type, id) |
| 39 | |
| 40 | /** |
| 41 | * \} |
| 42 | */ |
| 43 | |
| 44 | #ifdef __cplusplus |
| 45 | } /* extern "C" */ |
| 46 | #endif |
| 47 | |
| 48 | #endif /* SPA_EVENT_H */ |