Loading...
Searching...
No Matches
iec958-types.h
Go to the documentation of this file.
/* Simple Plugin API */
/* SPDX-FileCopyrightText: Copyright © 2018 Wim Taymans */
/* SPDX-License-Identifier: MIT */
#ifndef SPA_AUDIO_IEC958_TYPES_H
#define SPA_AUDIO_IEC958_TYPES_H
#include <spa/utils/type.h>
#include <spa/param/audio/iec958.h>
#ifdef __cplusplus
extern "C" {
#endif
#ifndef SPA_API_AUDIO_IEC958_TYPES
#ifdef SPA_API_IMPL
#define SPA_API_AUDIO_IEC958_TYPES SPA_API_IMPL
#else
#define SPA_API_AUDIO_IEC958_TYPES static inline
#endif
#endif
#define SPA_TYPE_INFO_AudioIEC958Codec SPA_TYPE_INFO_ENUM_BASE "AudioIEC958Codec"
#define SPA_TYPE_INFO_AUDIO_IEC958_CODEC_BASE SPA_TYPE_INFO_AudioIEC958Codec ":"
static const struct spa_type_info spa_type_audio_iec958_codec[] = {
{ SPA_AUDIO_IEC958_CODEC_UNKNOWN, SPA_TYPE_Int, SPA_TYPE_INFO_AUDIO_IEC958_CODEC_BASE "UNKNOWN", NULL },
{ SPA_AUDIO_IEC958_CODEC_PCM, SPA_TYPE_Int, SPA_TYPE_INFO_AUDIO_IEC958_CODEC_BASE "PCM", NULL },
{ SPA_AUDIO_IEC958_CODEC_DTS, SPA_TYPE_Int, SPA_TYPE_INFO_AUDIO_IEC958_CODEC_BASE "DTS", NULL },
{ SPA_AUDIO_IEC958_CODEC_AC3, SPA_TYPE_Int, SPA_TYPE_INFO_AUDIO_IEC958_CODEC_BASE "AC3", NULL },
{ SPA_AUDIO_IEC958_CODEC_MPEG, SPA_TYPE_Int, SPA_TYPE_INFO_AUDIO_IEC958_CODEC_BASE "MPEG", NULL },
{ SPA_AUDIO_IEC958_CODEC_MPEG2_AAC, SPA_TYPE_Int, SPA_TYPE_INFO_AUDIO_IEC958_CODEC_BASE "MPEG2-AAC", NULL },
{ SPA_AUDIO_IEC958_CODEC_EAC3, SPA_TYPE_Int, SPA_TYPE_INFO_AUDIO_IEC958_CODEC_BASE "EAC3", NULL },
{ SPA_AUDIO_IEC958_CODEC_TRUEHD, SPA_TYPE_Int, SPA_TYPE_INFO_AUDIO_IEC958_CODEC_BASE "TrueHD", NULL },
{ SPA_AUDIO_IEC958_CODEC_DTSHD, SPA_TYPE_Int, SPA_TYPE_INFO_AUDIO_IEC958_CODEC_BASE "DTS-HD", NULL },
{ 0, 0, NULL, NULL },
};
SPA_API_AUDIO_IEC958_TYPES uint32_t spa_type_audio_iec958_codec_from_short_name(const char *name)
{
return spa_type_from_short_name(name, spa_type_audio_iec958_codec, SPA_AUDIO_IEC958_CODEC_UNKNOWN);
}
SPA_API_AUDIO_IEC958_TYPES const char * spa_type_audio_iec958_codec_to_short_name(uint32_t type)
{
return spa_type_to_short_name(type, spa_type_audio_iec958_codec, "UNKNOWN");
}
* \}
*/
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* SPA_AUDIO_RAW_IEC958_TYPES_H */
spa_type_audio_iec958_codec_to_short_name
SPA_API_AUDIO_IEC958_TYPES const char * spa_type_audio_iec958_codec_to_short_name(uint32_t type)
Definition iec958-types.h:57
spa_type_audio_iec958_codec
static const struct spa_type_info spa_type_audio_iec958_codec[]
Definition iec958-types.h:40
SPA_API_AUDIO_IEC958_TYPES
#define SPA_API_AUDIO_IEC958_TYPES
Definition iec958-types.h:31
SPA_TYPE_INFO_AUDIO_IEC958_CODEC_BASE
#define SPA_TYPE_INFO_AUDIO_IEC958_CODEC_BASE
Definition iec958-types.h:38
spa_type_audio_iec958_codec_from_short_name
SPA_API_AUDIO_IEC958_TYPES uint32_t spa_type_audio_iec958_codec_from_short_name(const char *name)
Definition iec958-types.h:53
SPA_AUDIO_IEC958_CODEC_MPEG2_AAC
@ SPA_AUDIO_IEC958_CODEC_MPEG2_AAC
MPEG-2 AAC.
Definition iec958.h:30
SPA_AUDIO_IEC958_CODEC_AC3
@ SPA_AUDIO_IEC958_CODEC_AC3
Definition iec958.h:28
SPA_AUDIO_IEC958_CODEC_UNKNOWN
@ SPA_AUDIO_IEC958_CODEC_UNKNOWN
Definition iec958.h:24
SPA_AUDIO_IEC958_CODEC_MPEG
@ SPA_AUDIO_IEC958_CODEC_MPEG
MPEG-1 or MPEG-2 (Part 3, not AAC).
Definition iec958.h:29
SPA_AUDIO_IEC958_CODEC_DTSHD
@ SPA_AUDIO_IEC958_CODEC_DTSHD
DTS-HD Master Audio.
Definition iec958.h:35
SPA_AUDIO_IEC958_CODEC_EAC3
@ SPA_AUDIO_IEC958_CODEC_EAC3
Definition iec958.h:32
SPA_AUDIO_IEC958_CODEC_TRUEHD
@ SPA_AUDIO_IEC958_CODEC_TRUEHD
Dolby TrueHD.
Definition iec958.h:34
SPA_AUDIO_IEC958_CODEC_PCM
@ SPA_AUDIO_IEC958_CODEC_PCM
Definition iec958.h:26
SPA_AUDIO_IEC958_CODEC_DTS
@ SPA_AUDIO_IEC958_CODEC_DTS
Definition iec958.h:27
spa_type_from_short_name
SPA_API_TYPE uint32_t spa_type_from_short_name(const char *name, const struct spa_type_info *info, uint32_t unknown)
Definition type.h:176
spa_type_to_short_name
SPA_API_TYPE const char * spa_type_to_short_name(uint32_t type, const struct spa_type_info *info, const char *unknown)
Definition type.h:197
SPA_TYPE_Int
@ SPA_TYPE_Int
Definition type.h:45
iec958.h
spa/param/audio/iec958.h
type.h
spa/utils/type.h
spa_type_info
Definition type.h:156
spa_type_info::type
uint32_t type
Definition type.h:157