PipeWire: spa/param/audio/iec958-types.h Source File

PipeWire 1.6.8

Loading...
Searching...
No Matches
iec958-types.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_AUDIO_IEC958_TYPES_H
6#define SPA_AUDIO_IEC958_TYPES_H
7
8#include <spa/utils/type.h>
9#include <spa/param/audio/iec958.h>
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
19
20#ifndef SPA_API_AUDIO_IEC958_TYPES
21 #ifdef SPA_API_IMPL
22 #define SPA_API_AUDIO_IEC958_TYPES SPA_API_IMPL
23 #else
24 #define SPA_API_AUDIO_IEC958_TYPES static inline
25 #endif
26#endif
27
28#define SPA_TYPE_INFO_AudioIEC958Codec SPA_TYPE_INFO_ENUM_BASE "AudioIEC958Codec"
29#define SPA_TYPE_INFO_AUDIO_IEC958_CODEC_BASE SPA_TYPE_INFO_AudioIEC958Codec ":"
30
31 static const struct spa_type_info spa_type_audio_iec958_codec[] = {
32 { SPA_AUDIO_IEC958_CODEC_UNKNOWN, SPA_TYPE_Int, SPA_TYPE_INFO_AUDIO_IEC958_CODEC_BASE "UNKNOWN", NULL },
33 { SPA_AUDIO_IEC958_CODEC_PCM, SPA_TYPE_Int, SPA_TYPE_INFO_AUDIO_IEC958_CODEC_BASE "PCM", NULL },
34 { SPA_AUDIO_IEC958_CODEC_DTS, SPA_TYPE_Int, SPA_TYPE_INFO_AUDIO_IEC958_CODEC_BASE "DTS", NULL },
35 { SPA_AUDIO_IEC958_CODEC_AC3, SPA_TYPE_Int, SPA_TYPE_INFO_AUDIO_IEC958_CODEC_BASE "AC3", NULL },
36 { SPA_AUDIO_IEC958_CODEC_MPEG, SPA_TYPE_Int, SPA_TYPE_INFO_AUDIO_IEC958_CODEC_BASE "MPEG", NULL },
37 { SPA_AUDIO_IEC958_CODEC_MPEG2_AAC, SPA_TYPE_Int, SPA_TYPE_INFO_AUDIO_IEC958_CODEC_BASE "MPEG2-AAC", NULL },
38 { SPA_AUDIO_IEC958_CODEC_EAC3, SPA_TYPE_Int, SPA_TYPE_INFO_AUDIO_IEC958_CODEC_BASE "EAC3", NULL },
39 { SPA_AUDIO_IEC958_CODEC_TRUEHD, SPA_TYPE_Int, SPA_TYPE_INFO_AUDIO_IEC958_CODEC_BASE "TrueHD", NULL },
40 { SPA_AUDIO_IEC958_CODEC_DTSHD, SPA_TYPE_Int, SPA_TYPE_INFO_AUDIO_IEC958_CODEC_BASE "DTS-HD", NULL },
41 { 0, 0, NULL, NULL },
42};
43
44 SPA_API_AUDIO_IEC958_TYPES uint32_t spa_type_audio_iec958_codec_from_short_name(const char *name)
45{
46 return spa_type_from_short_name(name, spa_type_audio_iec958_codec, SPA_AUDIO_IEC958_CODEC_UNKNOWN);
47}
48 SPA_API_AUDIO_IEC958_TYPES const char * spa_type_audio_iec958_codec_to_short_name(uint32_t type)
49{
50 return spa_type_to_short_name(type, spa_type_audio_iec958_codec, "UNKNOWN");
51}
52
53 * \}
54 */
55
56#ifdef __cplusplus
57} /* extern "C" */
58#endif
59
60#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