+ +
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_PARAM_FORMAT_UTILS_H |
| 6 | #define SPA_PARAM_FORMAT_UTILS_H |
| 7 | |
| 8 | #include <spa/pod/parser.h> |
| 9 | #include <spa/param/format.h> |
| 10 | |
| 11 | #ifdef __cplusplus |
| 12 | extern "C" { |
| 13 | #endif |
| 14 | |
| 15 | |
| 16 | /** |
| 17 | * \addtogroup spa_param |
| 18 | * \{ |
| 19 | */ |
| 20 | |
| 21 | #ifndef SPA_API_FORMAT_UTILS |
| 22 | #ifdef SPA_API_IMPL |
| 23 | #define SPA_API_FORMAT_UTILS SPA_API_IMPL |
| 24 | #else |
| 25 | #define SPA_API_FORMAT_UTILS static inline |
| 26 | #endif |
| 27 | #endif |
| 28 | |
| 29 | SPA_API_FORMAT_UTILS int |
| 30 | spa_format_parse(const struct spa_pod *format, uint32_t *media_type, uint32_t *media_subtype) |
| 31 | { |
| 32 | return spa_pod_parse_object(format, |
| 33 | SPA_TYPE_OBJECT_Format, NULL, |
| 34 | SPA_FORMAT_mediaType, SPA_POD_Id(media_type), |
| 35 | SPA_FORMAT_mediaSubtype, SPA_POD_Id(media_subtype)); |
| 36 | } |
| 37 | |
| 38 | /** |
| 39 | * \} |
| 40 | */ |
| 41 | |
| 42 | #ifdef __cplusplus |
| 43 | } /* extern "C" */ |
| 44 | #endif |
| 45 | |
| 46 | #endif /* SPA_PARAM_FORMAT_UTILS_H */ |