PipeWire  0.3.49
raw.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_VIDEO_RAW_H
26 #define SPA_VIDEO_RAW_H
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
37 #include <spa/utils/defs.h>
38 #include <spa/param/video/chroma.h>
39 #include <spa/param/video/color.h>
41 
42 #define SPA_VIDEO_MAX_PLANES 4
43 #define SPA_VIDEO_MAX_COMPONENTS 4
44 
56 enum spa_video_format {
59 
149  /* Aliases */
151 };
156 enum spa_video_flags {
158  SPA_VIDEO_FLAG_VARIABLE_FPS = (1 << 0),
161 };
162 
183 };
184 
187 struct spa_video_info_raw {
188  enum spa_video_format format;
189  int64_t modifier;
191  struct spa_rectangle size;
192  struct spa_fraction framerate;
193  struct spa_fraction max_framerate;
195  uint32_t views;
207 };
209 #define SPA_VIDEO_INFO_RAW_INIT(...) (struct spa_video_info_raw) { __VA_ARGS__ }
211 struct spa_video_info_dsp {
213  int64_t modifier;
214 };
215 
216 #define SPA_VIDEO_INFO_DSP_INIT(...) (struct spa_video_info_dsp) { __VA_ARGS__ }
222 #ifdef __cplusplus
223 } /* extern "C" */
224 #endif
226 #endif /* SPA_VIDEO_RAW_H */
Definition: raw.h:119
Definition: raw.h:219
Definition: raw.h:124
spa_video_format
Video formats.
Definition: raw.h:63
Definition: raw.h:65
Definition: raw.h:109
Definition: raw.h:68
32-bit x:R:G:B 2:10:10:10 little endian
Definition: raw.h:147
Definition: raw.h:87
Definition: raw.h:85
enum spa_video_format format
Definition: raw.h:220
Definition: raw.h:125
all frames are progressive
Definition: raw.h:175
32-bit A:R:G:B 2:10:10:10 little endian
Definition: raw.h:151
frames contains both interlaced and progressive video, the buffer flags describe the frame and fields...
Definition: raw.h:178
spa_video_multiview_mode
All possible stereoscopic 3D and multiview representations.
Definition: multiview.h:47
Definition: raw.h:114
Definition: raw.h:157
Definition: raw.h:135
Definition: raw.h:73
Definition: raw.h:92
Each color has been scaled by the alpha value.
Definition: raw.h:167
32-bit A:B:G:R 2:10:10:10 little endian
Definition: raw.h:152
Definition: raw.h:137
Definition: raw.h:94
spa/utils/defs.h
Definition: raw.h:88
Definition: raw.h:96
Definition: raw.h:69
Definition: raw.h:113
Definition: raw.h:100
Definition: raw.h:77
Definition: raw.h:129
Definition: raw.h:139
Definition: raw.h:98
Definition: raw.h:107
struct spa_fraction max_framerate
the maximum framerate of the video.
Definition: raw.h:200
Definition: raw.h:82
Definition: raw.h:93
Definition: defs.h:100
spa/param/video/chroma.h
enum spa_video_multiview_mode multiview_mode
multiview mode
Definition: raw.h:205
Definition: raw.h:108
Definition: raw.h:121
Definition: raw.h:145
Definition: raw.h:106
Definition: raw.h:115
Definition: defs.h:121
enum spa_video_transfer_function transfer_function
the transfer function.
Definition: raw.h:212
Definition: raw.h:126
Definition: raw.h:71
Definition: raw.h:79
enum spa_video_color_matrix color_matrix
the color matrix.
Definition: raw.h:210
spa_video_color_matrix
The color matrix is used to convert between Y&#39;PbPr and non-linear RGB (R&#39;G&#39;B&#39;)
Definition: color.h:57
Definition: raw.h:144
Definition: raw.h:74
uint32_t views
the number of views in this video
Definition: raw.h:202
enum spa_video_color_range color_range
the color range.
Definition: raw.h:208
enum spa_video_multiview_flags multiview_flags
multiview flags
Definition: raw.h:206
spa_video_transfer_function
The video transfer function defines the formula for converting between non-linear RGB (R&#39;G&#39;B&#39;) and li...
Definition: color.h:71
spa_video_color_primaries
The color primaries define the how to transform linear RGB values to and from the CIE XYZ colorspace...
Definition: color.h:93
Definition: raw.h:116
Definition: raw.h:130
int64_t modifier
format modifier only used with DMA-BUF
Definition: raw.h:196
Definition: raw.h:72
Definition: raw.h:76
Definition: raw.h:95
int64_t modifier
Definition: raw.h:221
Definition: raw.h:140
Definition: raw.h:70
32-bit R:G:B:x 10:10:10:2 little endian
Definition: raw.h:149
no flags
Definition: raw.h:164
Definition: raw.h:103
enum spa_video_format format
the format
Definition: raw.h:195
Definition: raw.h:134
Definition: raw.h:117
Definition: raw.h:78
spa_video_chroma_site
Various Chroma settings.
Definition: chroma.h:44
Definition: raw.h:89
Definition: raw.h:104
spa/param/video/color.h
spa_video_color_range
Possible color range values.
Definition: color.h:46
spa_video_multiview_flags
spa_video_multiview_flags are used to indicate extra properties of a stereo/multiview stream beyond t...
Definition: multiview.h:101
32-bit x:B:G:R 2:10:10:10 little endian
Definition: raw.h:148
struct spa_fraction framerate
the framerate of the video, 0/1 means variable rate
Definition: raw.h:199
Definition: raw.h:80
spa_video_interlace_mode
The possible values of the spa_video_interlace_mode describing the interlace mode of the stream...
Definition: raw.h:174
Definition: raw.h:127
Definition: raw.h:105
Definition: raw.h:118
Definition: raw.h:142
32-bit B:G:R:x 10:10:10:2 little endian
Definition: raw.h:150
Definition: raw.h:90
Definition: raw.h:83
Definition: raw.h:112
Definition: raw.h:86
struct spa_fraction pixel_aspect_ratio
the pixel aspect ratio
Definition: raw.h:204
Definition: raw.h:64
Definition: raw.h:84
Definition: raw.h:110
Definition: raw.h:194
Definition: raw.h:132
Definition: raw.h:111
enum spa_video_interlace_mode interlace_mode
the interlace mode
Definition: raw.h:203
32-bit B:G:R:A 10:10:10:2 little endian
Definition: raw.h:154
Definition: raw.h:101
a variable fps is selected, fps_n and fps_d denote the maximum fps of the video
Definition: raw.h:165
Definition: raw.h:102
spa/param/video/multiview.h
Definition: raw.h:123
Definition: raw.h:128
enum spa_video_color_primaries color_primaries
color primaries.
Definition: raw.h:213
Definition: raw.h:133
Definition: raw.h:67
Definition: raw.h:120
Definition: raw.h:136
Definition: raw.h:97
Definition: raw.h:138
spa_video_flags
Extra video flags.
Definition: raw.h:163
2 fields are interleaved in one video frame.
Definition: raw.h:176
Definition: raw.h:122
Definition: raw.h:91
Definition: raw.h:75
32-bit R:G:B:A 10:10:10:2 little endian
Definition: raw.h:153
2 fields are stored in one buffer, use the frame ID to get access to the required field...
Definition: raw.h:181
Definition: raw.h:99
struct spa_rectangle size
the frame size of the video
Definition: raw.h:198
Definition: raw.h:131
Definition: raw.h:81
enum spa_video_chroma_site chroma_site
the chroma siting
Definition: raw.h:207
Definition: raw.h:141