PipeWire  0.3.33
video/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 
59 
136 
139 
140  /* Aliases */
142 };
143 
149  SPA_VIDEO_FLAG_VARIABLE_FPS = (1 << 0),
152 };
153 
174 };
175 
179  enum spa_video_format format;
180  int64_t modifier;
181  struct spa_rectangle size;
182  struct spa_fraction framerate;
183  struct spa_fraction max_framerate;
185  uint32_t views;
197 };
198 
199 #define SPA_VIDEO_INFO_RAW_INIT(...) (struct spa_video_info_raw) { __VA_ARGS__ }
200 
203  int64_t modifier;
204 };
205 
206 #define SPA_VIDEO_INFO_DSP_INIT(...) (struct spa_video_info_dsp) { __VA_ARGS__ }
207 
212 #ifdef __cplusplus
213 } /* extern "C" */
214 #endif
215 
216 #endif /* SPA_VIDEO_RAW_H */
SPA_VIDEO_FORMAT_v216
@ SPA_VIDEO_FORMAT_v216
Definition: video/raw.h:80
SPA_VIDEO_FORMAT_ENCODED
@ SPA_VIDEO_FORMAT_ENCODED
Definition: video/raw.h:58
SPA_VIDEO_FORMAT_YV12
@ SPA_VIDEO_FORMAT_YV12
Definition: video/raw.h:61
spa_video_color_range
spa_video_color_range
Possible color range values.
Definition: color.h:41
SPA_VIDEO_FORMAT_GBRA_12BE
@ SPA_VIDEO_FORMAT_GBRA_12BE
Definition: video/raw.h:128
SPA_VIDEO_FORMAT_DSP_F32
@ SPA_VIDEO_FORMAT_DSP_F32
Definition: video/raw.h:141
SPA_VIDEO_FORMAT_BGRx
@ SPA_VIDEO_FORMAT_BGRx
Definition: video/raw.h:66
spa_video_info_raw::color_primaries
enum spa_video_color_primaries color_primaries
color primaries.
Definition: video/raw.h:196
SPA_VIDEO_FORMAT_BGR
@ SPA_VIDEO_FORMAT_BGR
Definition: video/raw.h:74
SPA_VIDEO_FORMAT_A444_10BE
@ SPA_VIDEO_FORMAT_A444_10BE
Definition: video/raw.h:116
SPA_VIDEO_FORMAT_GBRA_10BE
@ SPA_VIDEO_FORMAT_GBRA_10BE
Definition: video/raw.h:124
SPA_VIDEO_FORMAT_NV61
@ SPA_VIDEO_FORMAT_NV61
Definition: video/raw.h:118
SPA_VIDEO_FORMAT_GRAY16_LE
@ SPA_VIDEO_FORMAT_GRAY16_LE
Definition: video/raw.h:85
spa_video_transfer_function
spa_video_transfer_function
The video transfer function defines the formula for converting between non-linear RGB (R'G'B') and li...
Definition: color.h:66
SPA_VIDEO_INTERLACE_MODE_PROGRESSIVE
@ SPA_VIDEO_INTERLACE_MODE_PROGRESSIVE
all frames are progressive
Definition: video/raw.h:159
SPA_VIDEO_FORMAT_xBGR
@ SPA_VIDEO_FORMAT_xBGR
Definition: video/raw.h:68
SPA_VIDEO_FORMAT_GRAY16_BE
@ SPA_VIDEO_FORMAT_GRAY16_BE
Definition: video/raw.h:84
SPA_VIDEO_FORMAT_RGB16
@ SPA_VIDEO_FORMAT_RGB16
Definition: video/raw.h:87
spa_video_info_raw::size
struct spa_rectangle size
the frame size of the video
Definition: video/raw.h:181
spa_video_info_raw::views
uint32_t views
the number of views in this video
Definition: video/raw.h:185
SPA_VIDEO_FORMAT_BGRA
@ SPA_VIDEO_FORMAT_BGRA
Definition: video/raw.h:70
spa_video_chroma_site
spa_video_chroma_site
Various Chroma settings.
Definition: chroma.h:39
SPA_VIDEO_FORMAT_A420_10BE
@ SPA_VIDEO_FORMAT_A420_10BE
Definition: video/raw.h:112
SPA_VIDEO_FORMAT_I420_10BE
@ SPA_VIDEO_FORMAT_I420_10BE
Definition: video/raw.h:100
SPA_VIDEO_FLAG_PREMULTIPLIED_ALPHA
@ SPA_VIDEO_FLAG_PREMULTIPLIED_ALPHA
Each color has been scaled by the alpha value.
Definition: video/raw.h:151
spa_video_info_raw::modifier
int64_t modifier
format modifier
Definition: video/raw.h:180
spa_video_multiview_mode
spa_video_multiview_mode
All possible stereoscopic 3D and multiview representations.
Definition: multiview.h:42
SPA_VIDEO_FORMAT_GBR_10BE
@ SPA_VIDEO_FORMAT_GBR_10BE
Definition: video/raw.h:107
SPA_VIDEO_FORMAT_Y444
@ SPA_VIDEO_FORMAT_Y444
Definition: video/raw.h:78
SPA_VIDEO_FORMAT_YUY2
@ SPA_VIDEO_FORMAT_YUY2
Definition: video/raw.h:62
SPA_VIDEO_FORMAT_I422_12BE
@ SPA_VIDEO_FORMAT_I422_12BE
Definition: video/raw.h:132
spa_fraction
Definition: defs.h:104
SPA_VIDEO_FORMAT_GBR_10LE
@ SPA_VIDEO_FORMAT_GBR_10LE
Definition: video/raw.h:108
spa_video_color_primaries
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:88
SPA_VIDEO_FORMAT_AYUV
@ SPA_VIDEO_FORMAT_AYUV
Definition: video/raw.h:64
SPA_VIDEO_FORMAT_Y41B
@ SPA_VIDEO_FORMAT_Y41B
Definition: video/raw.h:75
spa_video_info_raw::transfer_function
enum spa_video_transfer_function transfer_function
the transfer function.
Definition: video/raw.h:195
SPA_VIDEO_FORMAT_v308
@ SPA_VIDEO_FORMAT_v308
Definition: video/raw.h:86
SPA_VIDEO_FORMAT_RGBA_F16
@ SPA_VIDEO_FORMAT_RGBA_F16
Definition: video/raw.h:137
SPA_VIDEO_FORMAT_I420_12BE
@ SPA_VIDEO_FORMAT_I420_12BE
Definition: video/raw.h:130
spa_video_info_raw::max_framerate
struct spa_fraction max_framerate
the maximum framerate of the video.
Definition: video/raw.h:183
spa_video_info_raw::color_matrix
enum spa_video_color_matrix color_matrix
the color matrix.
Definition: video/raw.h:193
SPA_VIDEO_FORMAT_RGB15
@ SPA_VIDEO_FORMAT_RGB15
Definition: video/raw.h:89
SPA_VIDEO_FORMAT_I420_10LE
@ SPA_VIDEO_FORMAT_I420_10LE
Definition: video/raw.h:101
SPA_VIDEO_FORMAT_GBR
@ SPA_VIDEO_FORMAT_GBR
Definition: video/raw.h:106
SPA_VIDEO_FORMAT_NV12
@ SPA_VIDEO_FORMAT_NV12
Definition: video/raw.h:81
SPA_VIDEO_FORMAT_RGB8P
@ SPA_VIDEO_FORMAT_RGB8P
Definition: video/raw.h:93
spa_video_info_raw::framerate
struct spa_fraction framerate
the framerate of the video, 0/1 means variable rate
Definition: video/raw.h:182
spa_video_info_dsp::format
enum spa_video_format format
Definition: video/raw.h:202
SPA_VIDEO_FORMAT_UYVP
@ SPA_VIDEO_FORMAT_UYVP
Definition: video/raw.h:91
SPA_VIDEO_FORMAT_GBRA
@ SPA_VIDEO_FORMAT_GBRA
Definition: video/raw.h:123
SPA_VIDEO_FORMAT_P010_10BE
@ SPA_VIDEO_FORMAT_P010_10BE
Definition: video/raw.h:119
SPA_VIDEO_FORMAT_RGBx
@ SPA_VIDEO_FORMAT_RGBx
Definition: video/raw.h:65
spa_video_multiview_flags
spa_video_multiview_flags
spa_video_multiview_flags are used to indicate extra properties of a stereo/multiview stream beyond t...
Definition: multiview.h:96
spa_rectangle
Definition: defs.h:86
SPA_VIDEO_FORMAT_ABGR
@ SPA_VIDEO_FORMAT_ABGR
Definition: video/raw.h:72
spa_video_flags
spa_video_flags
Extra video flags.
Definition: video/raw.h:147
SPA_VIDEO_FORMAT_xRGB
@ SPA_VIDEO_FORMAT_xRGB
Definition: video/raw.h:67
SPA_VIDEO_FORMAT_BGR16
@ SPA_VIDEO_FORMAT_BGR16
Definition: video/raw.h:88
SPA_VIDEO_FORMAT_RGBA_F32
@ SPA_VIDEO_FORMAT_RGBA_F32
Definition: video/raw.h:138
SPA_VIDEO_FORMAT_r210
@ SPA_VIDEO_FORMAT_r210
Definition: video/raw.h:99
SPA_VIDEO_FORMAT_VYUY
@ SPA_VIDEO_FORMAT_VYUY
Definition: video/raw.h:122
chroma.h
spa_video_info_raw::multiview_mode
enum spa_video_multiview_mode multiview_mode
multiview mode
Definition: video/raw.h:188
SPA_VIDEO_FORMAT_ARGB64
@ SPA_VIDEO_FORMAT_ARGB64
Definition: video/raw.h:97
SPA_VIDEO_FORMAT_A422_10BE
@ SPA_VIDEO_FORMAT_A422_10BE
Definition: video/raw.h:114
SPA_VIDEO_FORMAT_UYVY
@ SPA_VIDEO_FORMAT_UYVY
Definition: video/raw.h:63
SPA_VIDEO_FORMAT_NV16
@ SPA_VIDEO_FORMAT_NV16
Definition: video/raw.h:109
spa_video_info_raw
Definition: video/raw.h:178
spa_video_info_raw::format
enum spa_video_format format
the format
Definition: video/raw.h:179
spa_video_info_raw::interlace_mode
enum spa_video_interlace_mode interlace_mode
the interlace mode
Definition: video/raw.h:186
SPA_VIDEO_FORMAT_NV12_64Z32
@ SPA_VIDEO_FORMAT_NV12_64Z32
Definition: video/raw.h:111
SPA_VIDEO_FORMAT_AYUV64
@ SPA_VIDEO_FORMAT_AYUV64
Definition: video/raw.h:98
SPA_VIDEO_FORMAT_Y42B
@ SPA_VIDEO_FORMAT_Y42B
Definition: video/raw.h:76
spa_video_info_raw::color_range
enum spa_video_color_range color_range
the color range.
Definition: video/raw.h:191
SPA_VIDEO_FORMAT_RGBA
@ SPA_VIDEO_FORMAT_RGBA
Definition: video/raw.h:69
SPA_VIDEO_FORMAT_I422_12LE
@ SPA_VIDEO_FORMAT_I422_12LE
Definition: video/raw.h:133
SPA_VIDEO_FORMAT_GBR_12LE
@ SPA_VIDEO_FORMAT_GBR_12LE
Definition: video/raw.h:127
SPA_VIDEO_FORMAT_NV24
@ SPA_VIDEO_FORMAT_NV24
Definition: video/raw.h:110
SPA_VIDEO_FORMAT_GBRA_10LE
@ SPA_VIDEO_FORMAT_GBRA_10LE
Definition: video/raw.h:125
SPA_VIDEO_FORMAT_ARGB
@ SPA_VIDEO_FORMAT_ARGB
Definition: video/raw.h:71
spa_video_info_dsp
Definition: video/raw.h:201
SPA_VIDEO_FORMAT_Y444_12LE
@ SPA_VIDEO_FORMAT_Y444_12LE
Definition: video/raw.h:135
spa_video_info_dsp::modifier
int64_t modifier
Definition: video/raw.h:203
SPA_VIDEO_FORMAT_YUV9
@ SPA_VIDEO_FORMAT_YUV9
Definition: video/raw.h:94
SPA_VIDEO_FORMAT_YVU9
@ SPA_VIDEO_FORMAT_YVU9
Definition: video/raw.h:95
SPA_VIDEO_FORMAT_RGB
@ SPA_VIDEO_FORMAT_RGB
Definition: video/raw.h:73
SPA_VIDEO_FLAG_NONE
@ SPA_VIDEO_FLAG_NONE
no flags
Definition: video/raw.h:148
SPA_VIDEO_FORMAT_I422_10LE
@ SPA_VIDEO_FORMAT_I422_10LE
Definition: video/raw.h:103
SPA_VIDEO_FORMAT_IYU1
@ SPA_VIDEO_FORMAT_IYU1
Definition: video/raw.h:96
SPA_VIDEO_FORMAT_UNKNOWN
@ SPA_VIDEO_FORMAT_UNKNOWN
Definition: video/raw.h:57
SPA_VIDEO_INTERLACE_MODE_INTERLEAVED
@ SPA_VIDEO_INTERLACE_MODE_INTERLEAVED
2 fields are interleaved in one video frame.
Definition: video/raw.h:160
spa_video_info_raw::pixel_aspect_ratio
struct spa_fraction pixel_aspect_ratio
the pixel aspect ratio
Definition: video/raw.h:187
spa_video_format
spa_video_format
Video formats.
Definition: video/raw.h:56
SPA_VIDEO_FORMAT_NV21
@ SPA_VIDEO_FORMAT_NV21
Definition: video/raw.h:82
SPA_VIDEO_INTERLACE_MODE_FIELDS
@ SPA_VIDEO_INTERLACE_MODE_FIELDS
2 fields are stored in one buffer, use the frame ID to get access to the required field.
Definition: video/raw.h:165
SPA_VIDEO_FORMAT_A420
@ SPA_VIDEO_FORMAT_A420
Definition: video/raw.h:92
color.h
defs.h
SPA_VIDEO_FORMAT_Y444_10LE
@ SPA_VIDEO_FORMAT_Y444_10LE
Definition: video/raw.h:105
SPA_VIDEO_FORMAT_Y444_12BE
@ SPA_VIDEO_FORMAT_Y444_12BE
Definition: video/raw.h:134
SPA_VIDEO_FORMAT_I420
@ SPA_VIDEO_FORMAT_I420
Definition: video/raw.h:60
spa_video_info_raw::multiview_flags
enum spa_video_multiview_flags multiview_flags
multiview flags
Definition: video/raw.h:189
SPA_VIDEO_FORMAT_BGR15
@ SPA_VIDEO_FORMAT_BGR15
Definition: video/raw.h:90
SPA_VIDEO_FORMAT_I420_12LE
@ SPA_VIDEO_FORMAT_I420_12LE
Definition: video/raw.h:131
spa_video_info_raw::chroma_site
enum spa_video_chroma_site chroma_site
the chroma siting
Definition: video/raw.h:190
spa_video_interlace_mode
spa_video_interlace_mode
The possible values of the spa_video_interlace_mode describing the interlace mode of the stream.
Definition: video/raw.h:158
SPA_VIDEO_FORMAT_P010_10LE
@ SPA_VIDEO_FORMAT_P010_10LE
Definition: video/raw.h:120
SPA_VIDEO_FORMAT_GBRA_12LE
@ SPA_VIDEO_FORMAT_GBRA_12LE
Definition: video/raw.h:129
SPA_VIDEO_FORMAT_Y444_10BE
@ SPA_VIDEO_FORMAT_Y444_10BE
Definition: video/raw.h:104
SPA_VIDEO_FORMAT_I422_10BE
@ SPA_VIDEO_FORMAT_I422_10BE
Definition: video/raw.h:102
SPA_VIDEO_FORMAT_GRAY8
@ SPA_VIDEO_FORMAT_GRAY8
Definition: video/raw.h:83
SPA_VIDEO_FLAG_VARIABLE_FPS
@ SPA_VIDEO_FLAG_VARIABLE_FPS
a variable fps is selected, fps_n and fps_d denote the maximum fps of the video
Definition: video/raw.h:149
multiview.h
spa_video_color_matrix
spa_video_color_matrix
The color matrix is used to convert between Y'PbPr and non-linear RGB (R'G'B')
Definition: color.h:52
SPA_VIDEO_FORMAT_v210
@ SPA_VIDEO_FORMAT_v210
Definition: video/raw.h:79
SPA_VIDEO_FORMAT_IYU2
@ SPA_VIDEO_FORMAT_IYU2
Definition: video/raw.h:121
SPA_VIDEO_FORMAT_A420_10LE
@ SPA_VIDEO_FORMAT_A420_10LE
Definition: video/raw.h:113
SPA_VIDEO_FORMAT_GBR_12BE
@ SPA_VIDEO_FORMAT_GBR_12BE
Definition: video/raw.h:126
SPA_VIDEO_FORMAT_A444_10LE
@ SPA_VIDEO_FORMAT_A444_10LE
Definition: video/raw.h:117
SPA_VIDEO_INTERLACE_MODE_MIXED
@ SPA_VIDEO_INTERLACE_MODE_MIXED
frames contains both interlaced and progressive video, the buffer flags describe the frame and fields...
Definition: video/raw.h:162
SPA_VIDEO_FORMAT_YVYU
@ SPA_VIDEO_FORMAT_YVYU
Definition: video/raw.h:77
SPA_VIDEO_FORMAT_A422_10LE
@ SPA_VIDEO_FORMAT_A422_10LE
Definition: video/raw.h:115