2023-02-08 18:12:00 +01:00
|
|
|
/* Simple Plugin API */
|
|
|
|
|
/* SPDX-FileCopyrightText: Copyright © 2018 Wim Taymans */
|
|
|
|
|
/* SPDX-License-Identifier: MIT */
|
2018-08-29 14:50:58 +02:00
|
|
|
|
2019-01-14 12:58:23 +01:00
|
|
|
#ifndef SPA_PARAM_FORMAT_UTILS_H
|
|
|
|
|
#define SPA_PARAM_FORMAT_UTILS_H
|
2018-08-29 14:50:58 +02:00
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
2021-05-21 14:03:07 +10:00
|
|
|
/**
|
|
|
|
|
* \addtogroup spa_param
|
|
|
|
|
* \{
|
|
|
|
|
*/
|
|
|
|
|
|
2018-08-29 14:50:58 +02:00
|
|
|
#include <spa/pod/parser.h>
|
|
|
|
|
#include <spa/param/format.h>
|
|
|
|
|
|
|
|
|
|
static inline int
|
|
|
|
|
spa_format_parse(const struct spa_pod *format, uint32_t *media_type, uint32_t *media_subtype)
|
|
|
|
|
{
|
2019-01-16 11:05:12 +01:00
|
|
|
return spa_pod_parse_object(format,
|
|
|
|
|
SPA_TYPE_OBJECT_Format, NULL,
|
|
|
|
|
SPA_FORMAT_mediaType, SPA_POD_Id(media_type),
|
|
|
|
|
SPA_FORMAT_mediaSubtype, SPA_POD_Id(media_subtype));
|
2018-08-29 14:50:58 +02:00
|
|
|
}
|
|
|
|
|
|
2021-05-21 14:03:07 +10:00
|
|
|
/**
|
|
|
|
|
* \}
|
|
|
|
|
*/
|
|
|
|
|
|
2018-08-29 14:50:58 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
} /* extern "C" */
|
|
|
|
|
#endif
|
|
|
|
|
|
2019-01-14 12:58:23 +01:00
|
|
|
#endif /* SPA_PARAM_FORMAT_UTILS_H */
|