PipeWire: format.h Source File

PipeWire 0.3.34

param/format.h
Go to the documentation of this file.
1 /* Simple Plugin API
2 *
3 * Copyright © 2018 Wim Taymans
4 *
5 * Permission is hereby granted, free of charge, to any person obtaining a
6 * copy of this software and associated documentation files (the "Software"),
7 * to deal in the Software without restriction, including without limitation
8 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 * and/or sell copies of the Software, and to permit persons to whom the
10 * Software is furnished to do so, subject to the following conditions:
11 *
12 * The above copyright notice and this permission notice (including the next
13 * paragraph) shall be included in all copies or substantial portions of the
14 * Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 * DEALINGS IN THE SOFTWARE.
23 */
24
25 #ifndef SPA_PARAM_FORMAT_H
26 #define SPA_PARAM_FORMAT_H
27
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31
37 #include <spa/param/param.h>
38
40 enum spa_media_type {
41 SPA_MEDIA_TYPE_unknown,
42 SPA_MEDIA_TYPE_audio,
43 SPA_MEDIA_TYPE_video,
44 SPA_MEDIA_TYPE_image,
45 SPA_MEDIA_TYPE_binary,
46 SPA_MEDIA_TYPE_stream,
47 SPA_MEDIA_TYPE_application,
48 };
49
51 enum spa_media_subtype {
52 SPA_MEDIA_SUBTYPE_unknown,
53 SPA_MEDIA_SUBTYPE_raw,
54 SPA_MEDIA_SUBTYPE_dsp,
55 SPA_MEDIA_SUBTYPE_iec958,
57 SPA_MEDIA_SUBTYPE_START_Audio = 0x10000,
58 SPA_MEDIA_SUBTYPE_mp3,
59 SPA_MEDIA_SUBTYPE_aac,
60 SPA_MEDIA_SUBTYPE_vorbis,
61 SPA_MEDIA_SUBTYPE_wma,
62 SPA_MEDIA_SUBTYPE_ra,
63 SPA_MEDIA_SUBTYPE_sbc,
64 SPA_MEDIA_SUBTYPE_adpcm,
65 SPA_MEDIA_SUBTYPE_g723,
66 SPA_MEDIA_SUBTYPE_g726,
67 SPA_MEDIA_SUBTYPE_g729,
68 SPA_MEDIA_SUBTYPE_amr,
69 SPA_MEDIA_SUBTYPE_gsm,
70
71 SPA_MEDIA_SUBTYPE_START_Video = 0x20000,
72 SPA_MEDIA_SUBTYPE_h264,
73 SPA_MEDIA_SUBTYPE_mjpg,
74 SPA_MEDIA_SUBTYPE_dv,
75 SPA_MEDIA_SUBTYPE_mpegts,
76 SPA_MEDIA_SUBTYPE_h263,
77 SPA_MEDIA_SUBTYPE_mpeg1,
78 SPA_MEDIA_SUBTYPE_mpeg2,
79 SPA_MEDIA_SUBTYPE_mpeg4,
80 SPA_MEDIA_SUBTYPE_xvid,
81 SPA_MEDIA_SUBTYPE_vc1,
82 SPA_MEDIA_SUBTYPE_vp8,
83 SPA_MEDIA_SUBTYPE_vp9,
84 SPA_MEDIA_SUBTYPE_bayer,
85
86 SPA_MEDIA_SUBTYPE_START_Image = 0x30000,
87 SPA_MEDIA_SUBTYPE_jpeg,
88
89 SPA_MEDIA_SUBTYPE_START_Binary = 0x40000,
90
91 SPA_MEDIA_SUBTYPE_START_Stream = 0x50000,
92 SPA_MEDIA_SUBTYPE_midi,
93
94 SPA_MEDIA_SUBTYPE_START_Application = 0x60000,
95 SPA_MEDIA_SUBTYPE_control,
97 };
98
100 enum spa_format {
101 SPA_FORMAT_START,
102
103 SPA_FORMAT_mediaType,
104 SPA_FORMAT_mediaSubtype,
106 /* Audio format keys */
107 SPA_FORMAT_START_Audio = 0x10000,
108 SPA_FORMAT_AUDIO_format,
109 SPA_FORMAT_AUDIO_flags,
110 SPA_FORMAT_AUDIO_rate,
111 SPA_FORMAT_AUDIO_channels,
112 SPA_FORMAT_AUDIO_position,
114 SPA_FORMAT_AUDIO_iec958Codec,
116 /* Video Format keys */
117 SPA_FORMAT_START_Video = 0x20000,
118 SPA_FORMAT_VIDEO_format,
119 SPA_FORMAT_VIDEO_modifier,
120 SPA_FORMAT_VIDEO_size,
121 SPA_FORMAT_VIDEO_framerate,
122 SPA_FORMAT_VIDEO_maxFramerate,
123 SPA_FORMAT_VIDEO_views,
124 SPA_FORMAT_VIDEO_interlaceMode,
125 SPA_FORMAT_VIDEO_pixelAspectRatio,
126 SPA_FORMAT_VIDEO_multiviewMode,
127 SPA_FORMAT_VIDEO_multiviewFlags,
128 SPA_FORMAT_VIDEO_chromaSite,
129 SPA_FORMAT_VIDEO_colorRange,
130 SPA_FORMAT_VIDEO_colorMatrix,
131 SPA_FORMAT_VIDEO_transferFunction,
132 SPA_FORMAT_VIDEO_colorPrimaries,
133 SPA_FORMAT_VIDEO_profile,
134 SPA_FORMAT_VIDEO_level,
135 SPA_FORMAT_VIDEO_H264_streamFormat,
136 SPA_FORMAT_VIDEO_H264_alignment,
138 /* Image Format keys */
139 SPA_FORMAT_START_Image = 0x30000,
140 /* Binary Format keys */
141 SPA_FORMAT_START_Binary = 0x40000,
142 /* Stream Format keys */
143 SPA_FORMAT_START_Stream = 0x50000,
144 /* Application Format keys */
145 SPA_FORMAT_START_Application = 0x60000,
146 };
147
148 #define SPA_KEY_FORMAT_DSP "format.dsp"
155 #ifdef __cplusplus
156 } /* extern "C" */
157 #endif
158
159 #endif /* SPA_PARAM_FORMAT_H */
spa_media_type
spa_media_type
media type for SPA_TYPE_OBJECT_Format
Definition: param/format.h:40
spa_format
spa_format
properties for audio SPA_TYPE_OBJECT_Format
Definition: param/format.h:100
spa_media_subtype
spa_media_subtype
media subtype for SPA_TYPE_OBJECT_Format
Definition: param/format.h:51
SPA_MEDIA_TYPE_unknown
@ SPA_MEDIA_TYPE_unknown
Definition: param/format.h:41
SPA_MEDIA_TYPE_application
@ SPA_MEDIA_TYPE_application
Definition: param/format.h:47
SPA_MEDIA_TYPE_audio
@ SPA_MEDIA_TYPE_audio
Definition: param/format.h:42
SPA_MEDIA_TYPE_video
@ SPA_MEDIA_TYPE_video
Definition: param/format.h:43
SPA_MEDIA_TYPE_binary
@ SPA_MEDIA_TYPE_binary
Definition: param/format.h:45
SPA_MEDIA_TYPE_image
@ SPA_MEDIA_TYPE_image
Definition: param/format.h:44
SPA_MEDIA_TYPE_stream
@ SPA_MEDIA_TYPE_stream
Definition: param/format.h:46
SPA_FORMAT_VIDEO_framerate
@ SPA_FORMAT_VIDEO_framerate
frame rate (Fraction)
Definition: param/format.h:121
SPA_FORMAT_AUDIO_iec958Codec
@ SPA_FORMAT_AUDIO_iec958Codec
codec used (IEC958) (Id enum spa_audio_iec958_codec)
Definition: param/format.h:114
SPA_FORMAT_VIDEO_H264_streamFormat
@ SPA_FORMAT_VIDEO_H264_streamFormat
(Id enum spa_h264_stream_format)
Definition: param/format.h:135
SPA_FORMAT_START_Audio
@ SPA_FORMAT_START_Audio
Definition: param/format.h:107
SPA_FORMAT_VIDEO_level
@ SPA_FORMAT_VIDEO_level
(Int)
Definition: param/format.h:134
SPA_FORMAT_mediaType
@ SPA_FORMAT_mediaType
media type (Id enum spa_media_type)
Definition: param/format.h:103
SPA_FORMAT_VIDEO_size
@ SPA_FORMAT_VIDEO_size
size (Rectangle)
Definition: param/format.h:120
SPA_FORMAT_AUDIO_position
@ SPA_FORMAT_AUDIO_position
channel positions (Id enum spa_audio_position)
Definition: param/format.h:112
SPA_FORMAT_VIDEO_profile
@ SPA_FORMAT_VIDEO_profile
(Int)
Definition: param/format.h:133
SPA_FORMAT_VIDEO_modifier
@ SPA_FORMAT_VIDEO_modifier
format modifier (Long)
Definition: param/format.h:119
SPA_FORMAT_AUDIO_rate
@ SPA_FORMAT_AUDIO_rate
sample rate (Int)
Definition: param/format.h:110
SPA_FORMAT_VIDEO_multiviewMode
@ SPA_FORMAT_VIDEO_multiviewMode
(Id enum spa_video_multiview_mode)
Definition: param/format.h:126
SPA_FORMAT_START_Stream
@ SPA_FORMAT_START_Stream
Definition: param/format.h:143
SPA_FORMAT_VIDEO_interlaceMode
@ SPA_FORMAT_VIDEO_interlaceMode
(Id enum spa_video_interlace_mode)
Definition: param/format.h:124
SPA_FORMAT_VIDEO_maxFramerate
@ SPA_FORMAT_VIDEO_maxFramerate
maximum frame rate (Fraction)
Definition: param/format.h:122
SPA_FORMAT_START_Image
@ SPA_FORMAT_START_Image
Definition: param/format.h:139
SPA_FORMAT_AUDIO_flags
@ SPA_FORMAT_AUDIO_flags
optional flags (Int)
Definition: param/format.h:109
SPA_FORMAT_START_Application
@ SPA_FORMAT_START_Application
Definition: param/format.h:145
SPA_FORMAT_VIDEO_pixelAspectRatio
@ SPA_FORMAT_VIDEO_pixelAspectRatio
(Rectangle)
Definition: param/format.h:125
SPA_FORMAT_VIDEO_colorMatrix
@ SPA_FORMAT_VIDEO_colorMatrix
/Id enum spa_video_color_matrix)
Definition: param/format.h:130
SPA_FORMAT_VIDEO_format
@ SPA_FORMAT_VIDEO_format
video format (Id enum spa_video_format)
Definition: param/format.h:118
SPA_FORMAT_START_Binary
@ SPA_FORMAT_START_Binary
Definition: param/format.h:141
SPA_FORMAT_mediaSubtype
@ SPA_FORMAT_mediaSubtype
media subtype (Id enum spa_media_subtype)
Definition: param/format.h:104
SPA_FORMAT_AUDIO_format
@ SPA_FORMAT_AUDIO_format
audio format, (Id enum spa_audio_format)
Definition: param/format.h:108
SPA_FORMAT_VIDEO_chromaSite
@ SPA_FORMAT_VIDEO_chromaSite
/Id enum spa_video_chroma_site)
Definition: param/format.h:128
SPA_FORMAT_VIDEO_views
@ SPA_FORMAT_VIDEO_views
number of views (Int)
Definition: param/format.h:123
SPA_FORMAT_VIDEO_colorPrimaries
@ SPA_FORMAT_VIDEO_colorPrimaries
/Id enum spa_video_color_primaries)
Definition: param/format.h:132
SPA_FORMAT_VIDEO_transferFunction
@ SPA_FORMAT_VIDEO_transferFunction
/Id enum spa_video_transfer_function)
Definition: param/format.h:131
SPA_FORMAT_VIDEO_H264_alignment
@ SPA_FORMAT_VIDEO_H264_alignment
(Id enum spa_h264_alignment)
Definition: param/format.h:136
SPA_FORMAT_START_Video
@ SPA_FORMAT_START_Video
Definition: param/format.h:117
SPA_FORMAT_VIDEO_colorRange
@ SPA_FORMAT_VIDEO_colorRange
/Id enum spa_video_color_range)
Definition: param/format.h:129
SPA_FORMAT_AUDIO_channels
@ SPA_FORMAT_AUDIO_channels
number of audio channels (Int)
Definition: param/format.h:111
SPA_FORMAT_VIDEO_multiviewFlags
@ SPA_FORMAT_VIDEO_multiviewFlags
(Id enum spa_video_multiview_flags)
Definition: param/format.h:127
SPA_FORMAT_START
@ SPA_FORMAT_START
Definition: param/format.h:101
SPA_MEDIA_SUBTYPE_midi
@ SPA_MEDIA_SUBTYPE_midi
Definition: param/format.h:92
SPA_MEDIA_SUBTYPE_h264
@ SPA_MEDIA_SUBTYPE_h264
Definition: param/format.h:72
SPA_MEDIA_SUBTYPE_ra
@ SPA_MEDIA_SUBTYPE_ra
Definition: param/format.h:62
SPA_MEDIA_SUBTYPE_mpeg4
@ SPA_MEDIA_SUBTYPE_mpeg4
Definition: param/format.h:79
SPA_MEDIA_SUBTYPE_START_Binary
@ SPA_MEDIA_SUBTYPE_START_Binary
Definition: param/format.h:89
SPA_MEDIA_SUBTYPE_mp3
@ SPA_MEDIA_SUBTYPE_mp3
Definition: param/format.h:58
SPA_MEDIA_SUBTYPE_aac
@ SPA_MEDIA_SUBTYPE_aac
Definition: param/format.h:59
SPA_MEDIA_SUBTYPE_iec958
@ SPA_MEDIA_SUBTYPE_iec958
Definition: param/format.h:55
SPA_MEDIA_SUBTYPE_START_Video
@ SPA_MEDIA_SUBTYPE_START_Video
Definition: param/format.h:71
SPA_MEDIA_SUBTYPE_mpeg2
@ SPA_MEDIA_SUBTYPE_mpeg2
Definition: param/format.h:78
SPA_MEDIA_SUBTYPE_sbc
@ SPA_MEDIA_SUBTYPE_sbc
Definition: param/format.h:63
SPA_MEDIA_SUBTYPE_wma
@ SPA_MEDIA_SUBTYPE_wma
Definition: param/format.h:61
SPA_MEDIA_SUBTYPE_h263
@ SPA_MEDIA_SUBTYPE_h263
Definition: param/format.h:76
SPA_MEDIA_SUBTYPE_g726
@ SPA_MEDIA_SUBTYPE_g726
Definition: param/format.h:66
SPA_MEDIA_SUBTYPE_amr
@ SPA_MEDIA_SUBTYPE_amr
Definition: param/format.h:68
SPA_MEDIA_SUBTYPE_unknown
@ SPA_MEDIA_SUBTYPE_unknown
Definition: param/format.h:52
SPA_MEDIA_SUBTYPE_mjpg
@ SPA_MEDIA_SUBTYPE_mjpg
Definition: param/format.h:73
SPA_MEDIA_SUBTYPE_vp8
@ SPA_MEDIA_SUBTYPE_vp8
Definition: param/format.h:82
SPA_MEDIA_SUBTYPE_START_Image
@ SPA_MEDIA_SUBTYPE_START_Image
Definition: param/format.h:86
SPA_MEDIA_SUBTYPE_dsp
@ SPA_MEDIA_SUBTYPE_dsp
Definition: param/format.h:54
SPA_MEDIA_SUBTYPE_START_Audio
@ SPA_MEDIA_SUBTYPE_START_Audio
S/PDIF.
Definition: param/format.h:57
SPA_MEDIA_SUBTYPE_vorbis
@ SPA_MEDIA_SUBTYPE_vorbis
Definition: param/format.h:60
SPA_MEDIA_SUBTYPE_dv
@ SPA_MEDIA_SUBTYPE_dv
Definition: param/format.h:74
SPA_MEDIA_SUBTYPE_raw
@ SPA_MEDIA_SUBTYPE_raw
Definition: param/format.h:53
SPA_MEDIA_SUBTYPE_mpegts
@ SPA_MEDIA_SUBTYPE_mpegts
Definition: param/format.h:75
SPA_MEDIA_SUBTYPE_mpeg1
@ SPA_MEDIA_SUBTYPE_mpeg1
Definition: param/format.h:77
SPA_MEDIA_SUBTYPE_vc1
@ SPA_MEDIA_SUBTYPE_vc1
Definition: param/format.h:81
SPA_MEDIA_SUBTYPE_START_Stream
@ SPA_MEDIA_SUBTYPE_START_Stream
Definition: param/format.h:91
SPA_MEDIA_SUBTYPE_jpeg
@ SPA_MEDIA_SUBTYPE_jpeg
Definition: param/format.h:87
SPA_MEDIA_SUBTYPE_xvid
@ SPA_MEDIA_SUBTYPE_xvid
Definition: param/format.h:80
SPA_MEDIA_SUBTYPE_adpcm
@ SPA_MEDIA_SUBTYPE_adpcm
Definition: param/format.h:64
SPA_MEDIA_SUBTYPE_bayer
@ SPA_MEDIA_SUBTYPE_bayer
Definition: param/format.h:84
SPA_MEDIA_SUBTYPE_g723
@ SPA_MEDIA_SUBTYPE_g723
Definition: param/format.h:65
SPA_MEDIA_SUBTYPE_control
@ SPA_MEDIA_SUBTYPE_control
control stream, data contains spa_pod_sequence with control info.
Definition: param/format.h:95
SPA_MEDIA_SUBTYPE_gsm
@ SPA_MEDIA_SUBTYPE_gsm
Definition: param/format.h:69
SPA_MEDIA_SUBTYPE_START_Application
@ SPA_MEDIA_SUBTYPE_START_Application
Definition: param/format.h:94
SPA_MEDIA_SUBTYPE_g729
@ SPA_MEDIA_SUBTYPE_g729
Definition: param/format.h:67
SPA_MEDIA_SUBTYPE_vp9
@ SPA_MEDIA_SUBTYPE_vp9
Definition: param/format.h:83
param.h