1 /* GStreamer 2 * Copyright (C) <2011> Wim Taymans <wim.taymans@gmail.com> 3 * 4 * This library is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU Library General Public 6 * License as published by the Free Software Foundation; either 7 * version 2 of the License, or (at your option) any later version. 8 * 9 * This library is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * Library General Public License for more details. 13 * 14 * You should have received a copy of the GNU Library General Public 15 * License along with this library; if not, write to the 16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 17 * Boston, MA 02110-1301, USA. 18 */ 19 20 #ifndef __GST_VIDEO_FORMAT_H__ 21 #define __GST_VIDEO_FORMAT_H__ 22 23 #include <gst/gst.h> 24 25 G_BEGIN_DECLS 26 27 #include <gst/video/video-enumtypes.h> 28 #include <gst/video/video-tile.h> 29 30 /** 31 * GstVideoFormat: 32 * @GST_VIDEO_FORMAT_UNKNOWN: Unknown or unset video format id 33 * @GST_VIDEO_FORMAT_ENCODED: Encoded video format. Only ever use that in caps for 34 * special video formats in combination with non-system 35 * memory GstCapsFeatures where it does not make sense 36 * to specify a real video format. 37 * @GST_VIDEO_FORMAT_I420: planar 4:2:0 YUV 38 * @GST_VIDEO_FORMAT_YV12: planar 4:2:0 YVU (like I420 but UV planes swapped) 39 * @GST_VIDEO_FORMAT_YUY2: packed 4:2:2 YUV (Y0-U0-Y1-V0 Y2-U2-Y3-V2 Y4 ...) 40 * @GST_VIDEO_FORMAT_UYVY: packed 4:2:2 YUV (U0-Y0-V0-Y1 U2-Y2-V2-Y3 U4 ...) 41 * @GST_VIDEO_FORMAT_VYUY: packed 4:2:2 YUV (V0-Y0-U0-Y1 V2-Y2-U2-Y3 V4 ...) 42 * @GST_VIDEO_FORMAT_AYUV: packed 4:4:4 YUV with alpha channel (A0-Y0-U0-V0 ...) 43 * @GST_VIDEO_FORMAT_RGBx: sparse rgb packed into 32 bit, space last 44 * @GST_VIDEO_FORMAT_BGRx: sparse reverse rgb packed into 32 bit, space last 45 * @GST_VIDEO_FORMAT_xRGB: sparse rgb packed into 32 bit, space first 46 * @GST_VIDEO_FORMAT_xBGR: sparse reverse rgb packed into 32 bit, space first 47 * @GST_VIDEO_FORMAT_RGBA: rgb with alpha channel last 48 * @GST_VIDEO_FORMAT_BGRA: reverse rgb with alpha channel last 49 * @GST_VIDEO_FORMAT_ARGB: rgb with alpha channel first 50 * @GST_VIDEO_FORMAT_ABGR: reverse rgb with alpha channel first 51 * @GST_VIDEO_FORMAT_RGB: RGB packed into 24 bits without padding (`R-G-B-R-G-B`) 52 * @GST_VIDEO_FORMAT_BGR: reverse RGB packed into 24 bits without padding (`B-G-R-B-G-R`) 53 * @GST_VIDEO_FORMAT_Y41B: planar 4:1:1 YUV 54 * @GST_VIDEO_FORMAT_Y42B: planar 4:2:2 YUV 55 * @GST_VIDEO_FORMAT_YVYU: packed 4:2:2 YUV (Y0-V0-Y1-U0 Y2-V2-Y3-U2 Y4 ...) 56 * @GST_VIDEO_FORMAT_Y444: planar 4:4:4 YUV 57 * @GST_VIDEO_FORMAT_v210: packed 4:2:2 10-bit YUV, complex format 58 * @GST_VIDEO_FORMAT_v216: packed 4:2:2 16-bit YUV, Y0-U0-Y1-V1 order 59 * @GST_VIDEO_FORMAT_NV12: planar 4:2:0 YUV with interleaved UV plane 60 * @GST_VIDEO_FORMAT_NV21: planar 4:2:0 YUV with interleaved VU plane 61 * @GST_VIDEO_FORMAT_NV12_10LE32: 10-bit variant of @GST_VIDEO_FORMAT_NV12, packed into 32bit words (MSB 2 bits padding) (Since: 1.14) 62 * @GST_VIDEO_FORMAT_GRAY8: 8-bit grayscale 63 * @GST_VIDEO_FORMAT_GRAY10_LE32: 10-bit grayscale, packed into 32bit words (2 bits padding) (Since: 1.14) 64 * @GST_VIDEO_FORMAT_GRAY16_BE: 16-bit grayscale, most significant byte first 65 * @GST_VIDEO_FORMAT_GRAY16_LE: 16-bit grayscale, least significant byte first 66 * @GST_VIDEO_FORMAT_v308: packed 4:4:4 YUV (Y-U-V ...) 67 * @GST_VIDEO_FORMAT_IYU2: packed 4:4:4 YUV (U-Y-V ...) (Since: 1.10) 68 * @GST_VIDEO_FORMAT_RGB16: rgb 5-6-5 bits per component 69 * @GST_VIDEO_FORMAT_BGR16: reverse rgb 5-6-5 bits per component 70 * @GST_VIDEO_FORMAT_RGB15: rgb 5-5-5 bits per component 71 * @GST_VIDEO_FORMAT_BGR15: reverse rgb 5-5-5 bits per component 72 * @GST_VIDEO_FORMAT_UYVP: packed 10-bit 4:2:2 YUV (U0-Y0-V0-Y1 U2-Y2-V2-Y3 U4 ...) 73 * @GST_VIDEO_FORMAT_A420: planar 4:4:2:0 AYUV 74 * @GST_VIDEO_FORMAT_RGB8P: 8-bit paletted RGB 75 * @GST_VIDEO_FORMAT_YUV9: planar 4:1:0 YUV 76 * @GST_VIDEO_FORMAT_YVU9: planar 4:1:0 YUV (like YUV9 but UV planes swapped) 77 * @GST_VIDEO_FORMAT_IYU1: packed 4:1:1 YUV (Cb-Y0-Y1-Cr-Y2-Y3 ...) 78 * @GST_VIDEO_FORMAT_ARGB64: rgb with alpha channel first, 16 bits (native endianness) per channel 79 * @GST_VIDEO_FORMAT_AYUV64: packed 4:4:4 YUV with alpha channel, 16 bits (native endianness) per channel (A0-Y0-U0-V0 ...) 80 * @GST_VIDEO_FORMAT_r210: packed 4:4:4 RGB, 10 bits per channel 81 * @GST_VIDEO_FORMAT_I420_10BE: planar 4:2:0 YUV, 10 bits per channel 82 * @GST_VIDEO_FORMAT_I420_10LE: planar 4:2:0 YUV, 10 bits per channel 83 * @GST_VIDEO_FORMAT_I422_10BE: planar 4:2:2 YUV, 10 bits per channel 84 * @GST_VIDEO_FORMAT_I422_10LE: planar 4:2:2 YUV, 10 bits per channel 85 * @GST_VIDEO_FORMAT_Y444_10BE: planar 4:4:4 YUV, 10 bits per channel (Since: 1.2) 86 * @GST_VIDEO_FORMAT_Y444_10LE: planar 4:4:4 YUV, 10 bits per channel (Since: 1.2) 87 * @GST_VIDEO_FORMAT_GBR: planar 4:4:4 RGB, 8 bits per channel (Since: 1.2) 88 * @GST_VIDEO_FORMAT_GBR_10BE: planar 4:4:4 RGB, 10 bits per channel (Since: 1.2) 89 * @GST_VIDEO_FORMAT_GBR_10LE: planar 4:4:4 RGB, 10 bits per channel (Since: 1.2) 90 * @GST_VIDEO_FORMAT_NV16: planar 4:2:2 YUV with interleaved UV plane (Since: 1.2) 91 * @GST_VIDEO_FORMAT_NV16_10LE32: 10-bit variant of @GST_VIDEO_FORMAT_NV16, packed into 32bit words (MSB 2 bits padding) (Since: 1.14) 92 * @GST_VIDEO_FORMAT_NV24: planar 4:4:4 YUV with interleaved UV plane (Since: 1.2) 93 * @GST_VIDEO_FORMAT_NV12_64Z32: NV12 with 64x32 tiling in zigzag pattern (Since: 1.4) 94 * @GST_VIDEO_FORMAT_A420_10BE: planar 4:4:2:0 YUV, 10 bits per channel (Since: 1.6) 95 * @GST_VIDEO_FORMAT_A420_10LE: planar 4:4:2:0 YUV, 10 bits per channel (Since: 1.6) 96 * @GST_VIDEO_FORMAT_A422_10BE: planar 4:4:2:2 YUV, 10 bits per channel (Since: 1.6) 97 * @GST_VIDEO_FORMAT_A422_10LE: planar 4:4:2:2 YUV, 10 bits per channel (Since: 1.6) 98 * @GST_VIDEO_FORMAT_A444_10BE: planar 4:4:4:4 YUV, 10 bits per channel (Since: 1.6) 99 * @GST_VIDEO_FORMAT_A444_10LE: planar 4:4:4:4 YUV, 10 bits per channel (Since: 1.6) 100 * @GST_VIDEO_FORMAT_NV61: planar 4:2:2 YUV with interleaved VU plane (Since: 1.6) 101 * @GST_VIDEO_FORMAT_P010_10BE: planar 4:2:0 YUV with interleaved UV plane, 10 bits per channel (Since: 1.10) 102 * @GST_VIDEO_FORMAT_P010_10LE: planar 4:2:0 YUV with interleaved UV plane, 10 bits per channel (Since: 1.10) 103 * @GST_VIDEO_FORMAT_GBRA: planar 4:4:4:4 ARGB, 8 bits per channel (Since: 1.12) 104 * @GST_VIDEO_FORMAT_GBRA_10BE: planar 4:4:4:4 ARGB, 10 bits per channel (Since: 1.12) 105 * @GST_VIDEO_FORMAT_GBRA_10LE: planar 4:4:4:4 ARGB, 10 bits per channel (Since: 1.12) 106 * @GST_VIDEO_FORMAT_GBR_12BE: planar 4:4:4 RGB, 12 bits per channel (Since: 1.12) 107 * @GST_VIDEO_FORMAT_GBR_12LE: planar 4:4:4 RGB, 12 bits per channel (Since: 1.12) 108 * @GST_VIDEO_FORMAT_GBRA_12BE: planar 4:4:4:4 ARGB, 12 bits per channel (Since: 1.12) 109 * @GST_VIDEO_FORMAT_GBRA_12LE: planar 4:4:4:4 ARGB, 12 bits per channel (Since: 1.12) 110 * @GST_VIDEO_FORMAT_I420_12BE: planar 4:2:0 YUV, 12 bits per channel (Since: 1.12) 111 * @GST_VIDEO_FORMAT_I420_12LE: planar 4:2:0 YUV, 12 bits per channel (Since: 1.12) 112 * @GST_VIDEO_FORMAT_I422_12BE: planar 4:2:2 YUV, 12 bits per channel (Since: 1.12) 113 * @GST_VIDEO_FORMAT_I422_12LE: planar 4:2:2 YUV, 12 bits per channel (Since: 1.12) 114 * @GST_VIDEO_FORMAT_Y444_12BE: planar 4:4:4 YUV, 12 bits per channel (Since: 1.12) 115 * @GST_VIDEO_FORMAT_Y444_12LE: planar 4:4:4 YUV, 12 bits per channel (Since: 1.12) 116 * @GST_VIDEO_FORMAT_NV12_10LE40: Fully packed variant of NV12_10LE32 (Since: 1.16) 117 * @GST_VIDEO_FORMAT_Y210: packed 4:2:2 YUV, 10 bits per channel (Since: 1.16) 118 * @GST_VIDEO_FORMAT_Y410: packed 4:4:4 YUV, 10 bits per channel(A-V-Y-U...) (Since: 1.16) 119 * @GST_VIDEO_FORMAT_VUYA: packed 4:4:4 YUV with alpha channel (V0-U0-Y0-A0...) (Since: 1.16) 120 * @GST_VIDEO_FORMAT_BGR10A2_LE: packed 4:4:4 RGB with alpha channel(B-G-R-A), 10 bits for R/G/B channel and MSB 2 bits for alpha channel (Since: 1.16) 121 * @GST_VIDEO_FORMAT_RGB10A2_LE: packed 4:4:4 RGB with alpha channel(R-G-B-A), 10 bits for R/G/B channel and MSB 2 bits for alpha channel (Since: 1.18) 122 * @GST_VIDEO_FORMAT_Y444_16BE: planar 4:4:4 YUV, 16 bits per channel (Since: 1.18) 123 * @GST_VIDEO_FORMAT_Y444_16LE: planar 4:4:4 YUV, 16 bits per channel (Since: 1.18) 124 * @GST_VIDEO_FORMAT_P016_BE: planar 4:2:0 YUV with interleaved UV plane, 16 bits per channel (Since: 1.18) 125 * @GST_VIDEO_FORMAT_P016_LE: planar 4:2:0 YUV with interleaved UV plane, 16 bits per channel (Since: 1.18) 126 * @GST_VIDEO_FORMAT_P012_BE: planar 4:2:0 YUV with interleaved UV plane, 12 bits per channel (Since: 1.18) 127 * @GST_VIDEO_FORMAT_P012_LE: planar 4:2:0 YUV with interleaved UV plane, 12 bits per channel (Since: 1.18) 128 * @GST_VIDEO_FORMAT_Y212_BE: packed 4:2:2 YUV, 12 bits per channel (Y-U-Y-V) (Since: 1.18) 129 * @GST_VIDEO_FORMAT_Y212_LE: packed 4:2:2 YUV, 12 bits per channel (Y-U-Y-V) (Since: 1.18) 130 * @GST_VIDEO_FORMAT_Y412_BE: packed 4:4:4:4 YUV, 12 bits per channel(U-Y-V-A...) (Since: 1.18) 131 * @GST_VIDEO_FORMAT_Y412_LE: packed 4:4:4:4 YUV, 12 bits per channel(U-Y-V-A...) (Since: 1.18) 132 * @GST_VIDEO_FORMAT_NV12_4L4: NV12 with 4x4 tiles in linear order (Since: 1.18) 133 * @GST_VIDEO_FORMAT_NV12_32L32: NV12 with 32x32 tiles in linear order (Since: 1.18) 134 * @GST_VIDEO_FORMAT_RGBP: planar 4:4:4 RGB, 8 bits per channel (Since: 1.20) 135 * @GST_VIDEO_FORMAT_BGRP: planar 4:4:4 RGB, 8 bits per channel (Since: 1.20) 136 * @GST_VIDEO_FORMAT_AV12: Planar 4:2:0 YUV with interleaved UV plane with alpha as 3rd plane (Since: 1.20) 137 * @GST_VIDEO_FORMAT_ARGB64_LE: RGB with alpha channel first, 16 bits per channel 138 * @GST_VIDEO_FORMAT_ARGB64_BE: RGB with alpha channel first, 16 bits per channel 139 * @GST_VIDEO_FORMAT_RGBA64_LE: RGB with alpha channel last, 16 bits per channel 140 * @GST_VIDEO_FORMAT_RGBA64_BE: RGB with alpha channel last, 16 bits per channel 141 * @GST_VIDEO_FORMAT_BGRA64_LE: reverse RGB with alpha channel last, 16 bits per channel 142 * @GST_VIDEO_FORMAT_BGRA64_BE: reverse RGB with alpha channel last, 16 bits per channel 143 * @GST_VIDEO_FORMAT_ABGR64_LE: reverse RGB with alpha channel first, 16 bits per channel 144 * @GST_VIDEO_FORMAT_ABGR64_BE: reverse RGB with alpha channel first, 16 bits per channel 145 * 146 * Enum value describing the most common video formats. 147 * 148 * See the [GStreamer raw video format design document](https://gstreamer.freedesktop.org/documentation/additional/design/mediatype-video-raw.html#formats) 149 * for details about the layout and packing of these formats in memory. 150 */ 151 typedef enum { 152 GST_VIDEO_FORMAT_UNKNOWN, 153 GST_VIDEO_FORMAT_ENCODED, 154 GST_VIDEO_FORMAT_I420, 155 GST_VIDEO_FORMAT_YV12, 156 GST_VIDEO_FORMAT_YUY2, 157 GST_VIDEO_FORMAT_UYVY, 158 GST_VIDEO_FORMAT_AYUV, 159 GST_VIDEO_FORMAT_RGBx, 160 GST_VIDEO_FORMAT_BGRx, 161 GST_VIDEO_FORMAT_xRGB, 162 GST_VIDEO_FORMAT_xBGR, 163 GST_VIDEO_FORMAT_RGBA, 164 GST_VIDEO_FORMAT_BGRA, 165 GST_VIDEO_FORMAT_ARGB, 166 GST_VIDEO_FORMAT_ABGR, 167 GST_VIDEO_FORMAT_RGB, 168 GST_VIDEO_FORMAT_BGR, 169 GST_VIDEO_FORMAT_Y41B, 170 GST_VIDEO_FORMAT_Y42B, 171 GST_VIDEO_FORMAT_YVYU, 172 GST_VIDEO_FORMAT_Y444, 173 GST_VIDEO_FORMAT_v210, 174 GST_VIDEO_FORMAT_v216, 175 GST_VIDEO_FORMAT_NV12, 176 GST_VIDEO_FORMAT_NV21, 177 GST_VIDEO_FORMAT_GRAY8, 178 GST_VIDEO_FORMAT_GRAY16_BE, 179 GST_VIDEO_FORMAT_GRAY16_LE, 180 GST_VIDEO_FORMAT_v308, 181 GST_VIDEO_FORMAT_RGB16, 182 GST_VIDEO_FORMAT_BGR16, 183 GST_VIDEO_FORMAT_RGB15, 184 GST_VIDEO_FORMAT_BGR15, 185 GST_VIDEO_FORMAT_UYVP, 186 GST_VIDEO_FORMAT_A420, 187 GST_VIDEO_FORMAT_RGB8P, 188 GST_VIDEO_FORMAT_YUV9, 189 GST_VIDEO_FORMAT_YVU9, 190 GST_VIDEO_FORMAT_IYU1, 191 GST_VIDEO_FORMAT_ARGB64, 192 GST_VIDEO_FORMAT_AYUV64, 193 GST_VIDEO_FORMAT_r210, 194 GST_VIDEO_FORMAT_I420_10BE, 195 GST_VIDEO_FORMAT_I420_10LE, 196 GST_VIDEO_FORMAT_I422_10BE, 197 GST_VIDEO_FORMAT_I422_10LE, 198 GST_VIDEO_FORMAT_Y444_10BE, 199 GST_VIDEO_FORMAT_Y444_10LE, 200 GST_VIDEO_FORMAT_GBR, 201 GST_VIDEO_FORMAT_GBR_10BE, 202 GST_VIDEO_FORMAT_GBR_10LE, 203 GST_VIDEO_FORMAT_NV16, 204 GST_VIDEO_FORMAT_NV24, 205 GST_VIDEO_FORMAT_NV12_64Z32, 206 GST_VIDEO_FORMAT_A420_10BE, 207 GST_VIDEO_FORMAT_A420_10LE, 208 GST_VIDEO_FORMAT_A422_10BE, 209 GST_VIDEO_FORMAT_A422_10LE, 210 GST_VIDEO_FORMAT_A444_10BE, 211 GST_VIDEO_FORMAT_A444_10LE, 212 GST_VIDEO_FORMAT_NV61, 213 GST_VIDEO_FORMAT_P010_10BE, 214 GST_VIDEO_FORMAT_P010_10LE, 215 GST_VIDEO_FORMAT_IYU2, 216 GST_VIDEO_FORMAT_VYUY, 217 GST_VIDEO_FORMAT_GBRA, 218 GST_VIDEO_FORMAT_GBRA_10BE, 219 GST_VIDEO_FORMAT_GBRA_10LE, 220 GST_VIDEO_FORMAT_GBR_12BE, 221 GST_VIDEO_FORMAT_GBR_12LE, 222 GST_VIDEO_FORMAT_GBRA_12BE, 223 GST_VIDEO_FORMAT_GBRA_12LE, 224 GST_VIDEO_FORMAT_I420_12BE, 225 GST_VIDEO_FORMAT_I420_12LE, 226 GST_VIDEO_FORMAT_I422_12BE, 227 GST_VIDEO_FORMAT_I422_12LE, 228 GST_VIDEO_FORMAT_Y444_12BE, 229 GST_VIDEO_FORMAT_Y444_12LE, 230 GST_VIDEO_FORMAT_GRAY10_LE32, 231 GST_VIDEO_FORMAT_NV12_10LE32, 232 GST_VIDEO_FORMAT_NV16_10LE32, 233 GST_VIDEO_FORMAT_NV12_10LE40, 234 GST_VIDEO_FORMAT_Y210, 235 GST_VIDEO_FORMAT_Y410, 236 GST_VIDEO_FORMAT_VUYA, 237 GST_VIDEO_FORMAT_BGR10A2_LE, 238 GST_VIDEO_FORMAT_RGB10A2_LE, 239 GST_VIDEO_FORMAT_Y444_16BE, 240 GST_VIDEO_FORMAT_Y444_16LE, 241 GST_VIDEO_FORMAT_P016_BE, 242 GST_VIDEO_FORMAT_P016_LE, 243 GST_VIDEO_FORMAT_P012_BE, 244 GST_VIDEO_FORMAT_P012_LE, 245 GST_VIDEO_FORMAT_Y212_BE, 246 GST_VIDEO_FORMAT_Y212_LE, 247 GST_VIDEO_FORMAT_Y412_BE, 248 GST_VIDEO_FORMAT_Y412_LE, 249 /** 250 * GST_VIDEO_FORMAT_NV12_4L4: 251 * 252 * NV12 with 4x4 tiles in linear order. 253 * 254 * Since: 1.18 255 */ 256 GST_VIDEO_FORMAT_NV12_4L4, 257 /** 258 * GST_VIDEO_FORMAT_NV12_32L32: 259 * 260 * NV12 with 32x32 tiles in linear order. 261 * 262 * Since: 1.18 263 */ 264 GST_VIDEO_FORMAT_NV12_32L32, 265 266 /** 267 * GST_VIDEO_FORMAT_RGBP: 268 * 269 * Planar 4:4:4 RGB, R-G-B order 270 * 271 * Since: 1.20 272 */ 273 GST_VIDEO_FORMAT_RGBP, 274 275 /** 276 * GST_VIDEO_FORMAT_BGRP: 277 * 278 * Planar 4:4:4 RGB, B-G-R order 279 * 280 * Since: 1.20 281 */ 282 GST_VIDEO_FORMAT_BGRP, 283 284 /** 285 * GST_VIDEO_FORMAT_AV12: 286 * 287 * Planar 4:2:0 YUV with interleaved UV plane with alpha as 288 * 3rd plane. 289 * 290 * Since: 1.20 291 */ 292 GST_VIDEO_FORMAT_AV12, 293 294 /** 295 * GST_VIDEO_FORMAT_ARGB64_LE: 296 * 297 * RGB with alpha channel first, 16 bits (little endian) 298 * per channel. 299 * 300 * Since: 1.20 301 */ 302 GST_VIDEO_FORMAT_ARGB64_LE, 303 304 /** 305 * GST_VIDEO_FORMAT_ARGB64_BE: 306 * 307 * RGB with alpha channel first, 16 bits (big endian) 308 * per channel. 309 * 310 * Since: 1.20 311 */ 312 GST_VIDEO_FORMAT_ARGB64_BE, 313 314 /** 315 * GST_VIDEO_FORMAT_RGBA64_LE: 316 * 317 * RGB with alpha channel last, 16 bits (little endian) 318 * per channel. 319 * 320 * Since: 1.20 321 */ 322 GST_VIDEO_FORMAT_RGBA64_LE, 323 324 /** 325 * GST_VIDEO_FORMAT_RGBA64_BE: 326 * 327 * RGB with alpha channel last, 16 bits (big endian) 328 * per channel. 329 * 330 * Since: 1.20 331 */ 332 GST_VIDEO_FORMAT_RGBA64_BE, 333 334 /** 335 * GST_VIDEO_FORMAT_BGRA64_LE: 336 * 337 * Reverse RGB with alpha channel last, 16 bits (little endian) 338 * per channel. 339 * 340 * Since: 1.20 341 */ 342 GST_VIDEO_FORMAT_BGRA64_LE, 343 344 /** 345 * GST_VIDEO_FORMAT_BGRA64_BE: 346 * 347 * Reverse RGB with alpha channel last, 16 bits (big endian) 348 * per channel. 349 * 350 * Since: 1.20 351 */ 352 GST_VIDEO_FORMAT_BGRA64_BE, 353 354 /** 355 * GST_VIDEO_FORMAT_ABGR64_LE: 356 * 357 * Reverse RGB with alpha channel first, 16 bits (little endian) 358 * per channel. 359 * 360 * Since: 1.20 361 */ 362 GST_VIDEO_FORMAT_ABGR64_LE, 363 364 /** 365 * GST_VIDEO_FORMAT_ABGR64_BE: 366 * 367 * Reverse RGB with alpha channel first, 16 bits (big endian) 368 * per channel. 369 * 370 * Since: 1.20 371 */ 372 GST_VIDEO_FORMAT_ABGR64_BE, 373 } GstVideoFormat; 374 375 #define GST_VIDEO_MAX_PLANES 4 376 #define GST_VIDEO_MAX_COMPONENTS 4 377 378 typedef struct _GstVideoFormatInfo GstVideoFormatInfo; 379 380 /** 381 * GstVideoFormatFlags: 382 * @GST_VIDEO_FORMAT_FLAG_YUV: The video format is YUV, components are numbered 383 * 0=Y, 1=U, 2=V. 384 * @GST_VIDEO_FORMAT_FLAG_RGB: The video format is RGB, components are numbered 385 * 0=R, 1=G, 2=B. 386 * @GST_VIDEO_FORMAT_FLAG_GRAY: The video is gray, there is one gray component 387 * with index 0. 388 * @GST_VIDEO_FORMAT_FLAG_ALPHA: The video format has an alpha components with 389 * the number 3. 390 * @GST_VIDEO_FORMAT_FLAG_LE: The video format has data stored in little 391 * endianness. 392 * @GST_VIDEO_FORMAT_FLAG_PALETTE: The video format has a palette. The palette 393 * is stored in the second plane and indexes are stored in the first plane. 394 * @GST_VIDEO_FORMAT_FLAG_COMPLEX: The video format has a complex layout that 395 * can't be described with the usual information in the #GstVideoFormatInfo. 396 * @GST_VIDEO_FORMAT_FLAG_UNPACK: This format can be used in a 397 * #GstVideoFormatUnpack and #GstVideoFormatPack function. 398 * @GST_VIDEO_FORMAT_FLAG_TILED: The format is tiled, there is tiling information 399 * in the last plane. 400 * 401 * The different video flags that a format info can have. 402 */ 403 typedef enum 404 { 405 GST_VIDEO_FORMAT_FLAG_YUV = (1 << 0), 406 GST_VIDEO_FORMAT_FLAG_RGB = (1 << 1), 407 GST_VIDEO_FORMAT_FLAG_GRAY = (1 << 2), 408 GST_VIDEO_FORMAT_FLAG_ALPHA = (1 << 3), 409 GST_VIDEO_FORMAT_FLAG_LE = (1 << 4), 410 GST_VIDEO_FORMAT_FLAG_PALETTE = (1 << 5), 411 GST_VIDEO_FORMAT_FLAG_COMPLEX = (1 << 6), 412 GST_VIDEO_FORMAT_FLAG_UNPACK = (1 << 7), 413 GST_VIDEO_FORMAT_FLAG_TILED = (1 << 8) 414 } GstVideoFormatFlags; 415 416 /* YUV components */ 417 #define GST_VIDEO_COMP_Y 0 418 #define GST_VIDEO_COMP_U 1 419 #define GST_VIDEO_COMP_V 2 420 421 /* RGB components */ 422 #define GST_VIDEO_COMP_R 0 423 #define GST_VIDEO_COMP_G 1 424 #define GST_VIDEO_COMP_B 2 425 426 /* alpha component */ 427 #define GST_VIDEO_COMP_A 3 428 429 /* palette components */ 430 #define GST_VIDEO_COMP_INDEX 0 431 #define GST_VIDEO_COMP_PALETTE 1 432 433 #include <gst/video/video-chroma.h> 434 435 /** 436 * GstVideoPackFlags: 437 * @GST_VIDEO_PACK_FLAG_NONE: No flag 438 * @GST_VIDEO_PACK_FLAG_TRUNCATE_RANGE: When the source has a smaller depth 439 * than the target format, set the least significant bits of the target 440 * to 0. This is likely slightly faster but less accurate. When this flag 441 * is not specified, the most significant bits of the source are duplicated 442 * in the least significant bits of the destination. 443 * @GST_VIDEO_PACK_FLAG_INTERLACED: The source is interlaced. The unpacked 444 * format will be interlaced as well with each line containing 445 * information from alternating fields. (Since: 1.2) 446 * 447 * The different flags that can be used when packing and unpacking. 448 */ 449 typedef enum 450 { 451 GST_VIDEO_PACK_FLAG_NONE = 0, 452 GST_VIDEO_PACK_FLAG_TRUNCATE_RANGE = (1 << 0), 453 GST_VIDEO_PACK_FLAG_INTERLACED = (1 << 1) 454 } GstVideoPackFlags; 455 456 /** 457 * GstVideoFormatUnpack: 458 * @info: a #GstVideoFormatInfo 459 * @flags: flags to control the unpacking 460 * @dest: a destination array 461 * @data: pointers to the data planes 462 * @stride: strides of the planes 463 * @x: the x position in the image to start from 464 * @y: the y position in the image to start from 465 * @width: the amount of pixels to unpack. 466 * 467 * Unpacks @width pixels from the given planes and strides containing data of 468 * format @info. The pixels will be unpacked into @dest with each component 469 * interleaved as per @info's unpack_format, which will usually be one of 470 * #GST_VIDEO_FORMAT_ARGB, #GST_VIDEO_FORMAT_AYUV, #GST_VIDEO_FORMAT_ARGB64 or 471 * #GST_VIDEO_FORMAT_AYUV64 depending on the format to unpack. 472 * @dest should at least be big enough to hold @width * bytes_per_pixel bytes 473 * where bytes_per_pixel relates to the unpack format and will usually be 474 * either 4 or 8 depending on the unpack format. bytes_per_pixel will be 475 * the same as the pixel stride for plane 0 for the above formats. 476 * 477 * For subsampled formats, the components will be duplicated in the destination 478 * array. Reconstruction of the missing components can be performed in a 479 * separate step after unpacking. 480 */ 481 typedef void (*GstVideoFormatUnpack) (const GstVideoFormatInfo *info, 482 GstVideoPackFlags flags, gpointer dest, 483 const gpointer data[GST_VIDEO_MAX_PLANES], 484 const gint stride[GST_VIDEO_MAX_PLANES], 485 gint x, gint y, gint width); 486 /** 487 * GstVideoFormatPack: 488 * @info: a #GstVideoFormatInfo 489 * @flags: flags to control the packing 490 * @src: a source array 491 * @sstride: the source array stride 492 * @data: pointers to the destination data planes 493 * @stride: strides of the destination planes 494 * @chroma_site: the chroma siting of the target when subsampled (not used) 495 * @y: the y position in the image to pack to 496 * @width: the amount of pixels to pack. 497 * 498 * Packs @width pixels from @src to the given planes and strides in the 499 * format @info. The pixels from source have each component interleaved 500 * and will be packed into the planes in @data. 501 * 502 * This function operates on pack_lines lines, meaning that @src should 503 * contain at least pack_lines lines with a stride of @sstride and @y 504 * should be a multiple of pack_lines. 505 * 506 * Subsampled formats will use the horizontally and vertically cosited 507 * component from the source. Subsampling should be performed before 508 * packing. 509 * 510 * Because this function does not have a x coordinate, it is not possible to 511 * pack pixels starting from an unaligned position. For tiled images this 512 * means that packing should start from a tile coordinate. For subsampled 513 * formats this means that a complete pixel needs to be packed. 514 */ 515 /* FIXME(2.0): remove the chroma_site, it is unused and is not relevant for 516 * packing, chroma subsampling based on chroma-site should be done in a separate 517 * step before packing*/ 518 typedef void (*GstVideoFormatPack) (const GstVideoFormatInfo *info, 519 GstVideoPackFlags flags, 520 const gpointer src, gint sstride, 521 gpointer data[GST_VIDEO_MAX_PLANES], 522 const gint stride[GST_VIDEO_MAX_PLANES], 523 GstVideoChromaSite chroma_site, 524 gint y, gint width); 525 526 /** 527 * GstVideoFormatInfo: 528 * @format: #GstVideoFormat 529 * @name: string representation of the format 530 * @description: use readable description of the format 531 * @flags: #GstVideoFormatFlags 532 * @bits: The number of bits used to pack data items. This can be less than 8 533 * when multiple pixels are stored in a byte. for values > 8 multiple bytes 534 * should be read according to the endianness flag before applying the shift 535 * and mask. 536 * @n_components: the number of components in the video format. 537 * @shift: the number of bits to shift away to get the component data 538 * @depth: the depth in bits for each component 539 * @pixel_stride: the pixel stride of each component. This is the amount of 540 * bytes to the pixel immediately to the right. When bits < 8, the stride is 541 * expressed in bits. For 24-bit RGB, this would be 3 bytes, for example, 542 * while it would be 4 bytes for RGBx or ARGB. 543 * @n_planes: the number of planes for this format. The number of planes can be 544 * less than the amount of components when multiple components are packed into 545 * one plane. 546 * @plane: the plane number where a component can be found 547 * @poffset: the offset in the plane where the first pixel of the components 548 * can be found. 549 * @w_sub: subsampling factor of the width for the component. Use 550 * GST_VIDEO_SUB_SCALE to scale a width. 551 * @h_sub: subsampling factor of the height for the component. Use 552 * GST_VIDEO_SUB_SCALE to scale a height. 553 * @unpack_format: the format of the unpacked pixels. This format must have the 554 * #GST_VIDEO_FORMAT_FLAG_UNPACK flag set. 555 * @unpack_func: an unpack function for this format 556 * @pack_lines: the amount of lines that will be packed 557 * @pack_func: an pack function for this format 558 * @tile_mode: The tiling mode 559 * @tile_ws: The width of a tile, in bytes, represented as a shift 560 * @tile_hs: The height of a tile, in bytes, represented as a shift 561 * 562 * Information for a video format. 563 */ 564 struct _GstVideoFormatInfo { 565 GstVideoFormat format; 566 const gchar *name; 567 const gchar *description; 568 GstVideoFormatFlags flags; 569 guint bits; 570 guint n_components; 571 guint shift[GST_VIDEO_MAX_COMPONENTS]; 572 guint depth[GST_VIDEO_MAX_COMPONENTS]; 573 gint pixel_stride[GST_VIDEO_MAX_COMPONENTS]; 574 guint n_planes; 575 guint plane[GST_VIDEO_MAX_COMPONENTS]; 576 guint poffset[GST_VIDEO_MAX_COMPONENTS]; 577 guint w_sub[GST_VIDEO_MAX_COMPONENTS]; 578 guint h_sub[GST_VIDEO_MAX_COMPONENTS]; 579 580 GstVideoFormat unpack_format; 581 GstVideoFormatUnpack unpack_func; 582 gint pack_lines; 583 GstVideoFormatPack pack_func; 584 585 GstVideoTileMode tile_mode; 586 guint tile_ws; 587 guint tile_hs; 588 589 /*< private >*/ 590 gpointer _gst_reserved[GST_PADDING]; 591 }; 592 593 #define GST_VIDEO_FORMAT_INFO_FORMAT(info) ((info)->format) 594 #define GST_VIDEO_FORMAT_INFO_NAME(info) ((info)->name) 595 #define GST_VIDEO_FORMAT_INFO_FLAGS(info) ((info)->flags) 596 597 #define GST_VIDEO_FORMAT_INFO_IS_YUV(info) (((info)->flags & GST_VIDEO_FORMAT_FLAG_YUV) != 0) 598 #define GST_VIDEO_FORMAT_INFO_IS_RGB(info) (((info)->flags & GST_VIDEO_FORMAT_FLAG_RGB) != 0) 599 #define GST_VIDEO_FORMAT_INFO_IS_GRAY(info) (((info)->flags & GST_VIDEO_FORMAT_FLAG_GRAY) != 0) 600 #define GST_VIDEO_FORMAT_INFO_HAS_ALPHA(info) (((info)->flags & GST_VIDEO_FORMAT_FLAG_ALPHA) != 0) 601 #define GST_VIDEO_FORMAT_INFO_IS_LE(info) (((info)->flags & GST_VIDEO_FORMAT_FLAG_LE) != 0) 602 #define GST_VIDEO_FORMAT_INFO_HAS_PALETTE(info) (((info)->flags & GST_VIDEO_FORMAT_FLAG_PALETTE) != 0) 603 #define GST_VIDEO_FORMAT_INFO_IS_COMPLEX(info) (((info)->flags & GST_VIDEO_FORMAT_FLAG_COMPLEX) != 0) 604 #define GST_VIDEO_FORMAT_INFO_IS_TILED(info) (((info)->flags & GST_VIDEO_FORMAT_FLAG_TILED) != 0) 605 606 #define GST_VIDEO_FORMAT_INFO_BITS(info) ((info)->bits) 607 #define GST_VIDEO_FORMAT_INFO_N_COMPONENTS(info) ((info)->n_components) 608 #define GST_VIDEO_FORMAT_INFO_SHIFT(info,c) ((info)->shift[c]) 609 #define GST_VIDEO_FORMAT_INFO_DEPTH(info,c) ((info)->depth[c]) 610 /** 611 * GST_VIDEO_FORMAT_INFO_PSTRIDE: 612 * @info: a #GstVideoFormatInfo 613 * @c: the component index 614 * 615 * pixel stride for the given component. This is the amount of bytes to the 616 * pixel immediately to the right, so basically bytes from one pixel to the 617 * next. When bits < 8, the stride is expressed in bits. 618 * 619 * Examples: for 24-bit RGB, the pixel stride would be 3 bytes, while it 620 * would be 4 bytes for RGBx or ARGB, and 8 bytes for ARGB64 or AYUV64. 621 * For planar formats such as I420 the pixel stride is usually 1. For 622 * YUY2 it would be 2 bytes. 623 */ 624 #define GST_VIDEO_FORMAT_INFO_PSTRIDE(info,c) ((info)->pixel_stride[c]) 625 /** 626 * GST_VIDEO_FORMAT_INFO_N_PLANES: 627 * @info: a #GstVideoFormatInfo 628 * 629 * Number of planes. This is the number of planes the pixel layout is 630 * organized in in memory. The number of planes can be less than the 631 * number of components (e.g. Y,U,V,A or R, G, B, A) when multiple 632 * components are packed into one plane. 633 * 634 * Examples: RGB/RGBx/RGBA: 1 plane, 3/3/4 components; 635 * I420: 3 planes, 3 components; NV21/NV12: 2 planes, 3 components. 636 */ 637 #define GST_VIDEO_FORMAT_INFO_N_PLANES(info) ((info)->n_planes) 638 /** 639 * GST_VIDEO_FORMAT_INFO_PLANE: 640 * @info: a #GstVideoFormatInfo 641 * @c: the component index 642 * 643 * Plane number where the given component can be found. A plane may 644 * contain data for multiple components. 645 */ 646 #define GST_VIDEO_FORMAT_INFO_PLANE(info,c) ((info)->plane[c]) 647 #define GST_VIDEO_FORMAT_INFO_POFFSET(info,c) ((info)->poffset[c]) 648 #define GST_VIDEO_FORMAT_INFO_W_SUB(info,c) ((info)->w_sub[c]) 649 #define GST_VIDEO_FORMAT_INFO_H_SUB(info,c) ((info)->h_sub[c]) 650 651 /* rounds up */ 652 #define GST_VIDEO_SUB_SCALE(scale,val) (-((-((gint)(val)))>>(scale))) 653 654 #define GST_VIDEO_FORMAT_INFO_SCALE_WIDTH(info,c,w) GST_VIDEO_SUB_SCALE ((info)->w_sub[c],(w)) 655 #define GST_VIDEO_FORMAT_INFO_SCALE_HEIGHT(info,c,h) GST_VIDEO_SUB_SCALE ((info)->h_sub[c],(h)) 656 657 #define GST_VIDEO_FORMAT_INFO_DATA(info,planes,comp) \ 658 (((guint8*)(planes)[(info)->plane[comp]]) + (info)->poffset[comp]) 659 /** 660 * GST_VIDEO_FORMAT_INFO_STRIDE: 661 * @info: a #GstVideoFormatInfo 662 * @strides: an array of strides 663 * @comp: the component index 664 * 665 * Row stride in bytes, that is number of bytes from the first pixel component 666 * of a row to the first pixel component in the next row. This might include 667 * some row padding (memory not actually used for anything, to make sure the 668 * beginning of the next row is aligned in a particular way). 669 */ 670 #define GST_VIDEO_FORMAT_INFO_STRIDE(info,strides,comp) ((strides)[(info)->plane[comp]]) 671 #define GST_VIDEO_FORMAT_INFO_OFFSET(info,offsets,comp) \ 672 (((offsets)[(info)->plane[comp]]) + (info)->poffset[comp]) 673 674 #define GST_VIDEO_FORMAT_INFO_TILE_MODE(info) ((info)->tile_mode) 675 #define GST_VIDEO_FORMAT_INFO_TILE_WS(info) ((info)->tile_ws) 676 #define GST_VIDEO_FORMAT_INFO_TILE_HS(info) ((info)->tile_hs) 677 678 GST_VIDEO_API 679 void gst_video_format_info_component (const GstVideoFormatInfo *info, guint plane, gint components[GST_VIDEO_MAX_COMPONENTS]); 680 681 /* format properties */ 682 683 GST_VIDEO_API 684 GstVideoFormat gst_video_format_from_masks (gint depth, gint bpp, gint endianness, 685 guint red_mask, guint green_mask, 686 guint blue_mask, guint alpha_mask) G_GNUC_CONST; 687 688 GST_VIDEO_API 689 GstVideoFormat gst_video_format_from_fourcc (guint32 fourcc) G_GNUC_CONST; 690 691 GST_VIDEO_API 692 GstVideoFormat gst_video_format_from_string (const gchar *format) G_GNUC_CONST; 693 694 GST_VIDEO_API 695 guint32 gst_video_format_to_fourcc (GstVideoFormat format) G_GNUC_CONST; 696 697 GST_VIDEO_API 698 const gchar * gst_video_format_to_string (GstVideoFormat format) G_GNUC_CONST; 699 700 GST_VIDEO_API 701 const GstVideoFormatInfo * 702 gst_video_format_get_info (GstVideoFormat format) G_GNUC_CONST; 703 704 GST_VIDEO_API 705 gconstpointer gst_video_format_get_palette (GstVideoFormat format, gsize *size); 706 707 #define GST_VIDEO_SIZE_RANGE "(int) [ 1, max ]" 708 #define GST_VIDEO_FPS_RANGE "(fraction) [ 0, max ]" 709 710 #if G_BYTE_ORDER == G_LITTLE_ENDIAN 711 # define GST_VIDEO_NE(s) G_STRINGIFY(s)"_LE" 712 # define GST_VIDEO_OE(s) G_STRINGIFY(s)"_BE" 713 #else 714 # define GST_VIDEO_NE(s) G_STRINGIFY(s)"_BE" 715 # define GST_VIDEO_OE(s) G_STRINGIFY(s)"_LE" 716 #endif 717 718 /** 719 * GST_VIDEO_FORMATS_ALL: 720 * 721 * List of all video formats, for use in template caps strings. 722 * 723 * Formats are sorted by decreasing "quality", using these criteria by priority: 724 * - number of components 725 * - depth 726 * - subsampling factor of the width 727 * - subsampling factor of the height 728 * - number of planes 729 * - native endianness preferred 730 * - pixel stride 731 * - poffset 732 * - prefer non-complex formats 733 * - prefer YUV formats over RGB ones 734 * - prefer I420 over YV12 735 * - format name 736 */ 737 #if G_BYTE_ORDER == G_BIG_ENDIAN 738 #define GST_VIDEO_FORMATS_ALL "{ ABGR64_BE, BGRA64_BE, AYUV64, ARGB64_BE, ARGB64, " \ 739 "RGBA64_BE, ABGR64_LE, BGRA64_LE, ARGB64_LE, RGBA64_LE, GBRA_12BE, GBRA_12LE, Y412_BE, " \ 740 "Y412_LE, A444_10BE, GBRA_10BE, A444_10LE, GBRA_10LE, A422_10BE, A422_10LE, " \ 741 "A420_10BE, A420_10LE, Y410, RGB10A2_LE, BGR10A2_LE, GBRA, ABGR, VUYA, BGRA, " \ 742 "AYUV, ARGB, RGBA, A420, AV12, Y444_16BE, Y444_16LE, v216, P016_BE, P016_LE, Y444_12BE, " \ 743 "GBR_12BE, Y444_12LE, GBR_12LE, I422_12BE, I422_12LE, Y212_BE, Y212_LE, I420_12BE, " \ 744 "I420_12LE, P012_BE, P012_LE, Y444_10BE, GBR_10BE, Y444_10LE, GBR_10LE, r210, " \ 745 "I422_10BE, I422_10LE, NV16_10LE32, Y210, v210, UYVP, I420_10BE, I420_10LE, " \ 746 "P010_10BE, P010_10LE, NV12_10LE32, NV12_10LE40, Y444, RGBP, GBR, BGRP, NV24, xBGR, BGRx, " \ 747 "xRGB, RGBx, BGR, IYU2, v308, RGB, Y42B, NV61, NV16, VYUY, UYVY, YVYU, YUY2, I420, " \ 748 "YV12, NV21, NV12, NV12_64Z32, NV12_4L4, NV12_32L32, Y41B, IYU1, YVU9, YUV9, RGB16, " \ 749 "BGR16, RGB15, BGR15, RGB8P, GRAY16_BE, GRAY16_LE, GRAY10_LE32, GRAY8 }" 750 #elif G_BYTE_ORDER == G_LITTLE_ENDIAN 751 #define GST_VIDEO_FORMATS_ALL "{ ABGR64_LE, BGRA64_LE, AYUV64, ARGB64_LE, ARGB64, " \ 752 "RGBA64_LE, ABGR64_BE, BGRA64_BE, ARGB64_BE, RGBA64_BE, GBRA_12LE, GBRA_12BE, Y412_LE, " \ 753 "Y412_BE, A444_10LE, GBRA_10LE, A444_10BE, GBRA_10BE, A422_10LE, A422_10BE, " \ 754 "A420_10LE, A420_10BE, RGB10A2_LE, BGR10A2_LE, Y410, GBRA, ABGR, VUYA, BGRA, " \ 755 "AYUV, ARGB, RGBA, A420, AV12, Y444_16LE, Y444_16BE, v216, P016_LE, P016_BE, Y444_12LE, " \ 756 "GBR_12LE, Y444_12BE, GBR_12BE, I422_12LE, I422_12BE, Y212_LE, Y212_BE, I420_12LE, " \ 757 "I420_12BE, P012_LE, P012_BE, Y444_10LE, GBR_10LE, Y444_10BE, GBR_10BE, r210, " \ 758 "I422_10LE, I422_10BE, NV16_10LE32, Y210, v210, UYVP, I420_10LE, I420_10BE, " \ 759 "P010_10LE, NV12_10LE32, NV12_10LE40, P010_10BE, Y444, RGBP, GBR, BGRP, NV24, xBGR, BGRx, " \ 760 "xRGB, RGBx, BGR, IYU2, v308, RGB, Y42B, NV61, NV16, VYUY, UYVY, YVYU, YUY2, I420, " \ 761 "YV12, NV21, NV12, NV12_64Z32, NV12_4L4, NV12_32L32, Y41B, IYU1, YVU9, YUV9, RGB16, " \ 762 "BGR16, RGB15, BGR15, RGB8P, GRAY16_LE, GRAY16_BE, GRAY10_LE32, GRAY8 }" 763 #endif 764 765 GST_VIDEO_API 766 const GstVideoFormat * gst_video_formats_raw (guint * len); 767 768 /** 769 * GST_VIDEO_CAPS_MAKE: 770 * @format: string format that describes the pixel layout, as string 771 * (e.g. "I420", "RGB", "YV12", "YUY2", "AYUV", etc.) 772 * 773 * Generic caps string for video, for use in pad templates. 774 */ 775 #define GST_VIDEO_CAPS_MAKE(format) \ 776 "video/x-raw, " \ 777 "format = (string) " format ", " \ 778 "width = " GST_VIDEO_SIZE_RANGE ", " \ 779 "height = " GST_VIDEO_SIZE_RANGE ", " \ 780 "framerate = " GST_VIDEO_FPS_RANGE 781 782 /** 783 * GST_VIDEO_CAPS_MAKE_WITH_FEATURES: 784 * @format: string format that describes the pixel layout, as string 785 * (e.g. "I420", "RGB", "YV12", "YUY2", "AYUV", etc.) 786 * @features: Requires caps features as a string, e.g. 787 * "memory:SystemMemory". 788 * 789 * Generic caps string for video, for use in pad templates. 790 * 791 * Since: 1.2 792 */ 793 #define GST_VIDEO_CAPS_MAKE_WITH_FEATURES(features,format) \ 794 "video/x-raw(" features "), " \ 795 "format = (string) " format ", " \ 796 "width = " GST_VIDEO_SIZE_RANGE ", " \ 797 "height = " GST_VIDEO_SIZE_RANGE ", " \ 798 "framerate = " GST_VIDEO_FPS_RANGE 799 800 GST_VIDEO_API 801 GstCaps * gst_video_make_raw_caps (const GstVideoFormat formats[], guint len); 802 803 GST_VIDEO_API 804 GstCaps * gst_video_make_raw_caps_with_features (const GstVideoFormat formats[], guint len, 805 GstCapsFeatures * features); 806 807 G_END_DECLS 808 809 #endif /* __GST_VIDEO_FORMAT_H__ */ 810