2 * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
3 * Library <2002> Ronald Bultje <rbultje@ronald.bitfreak.net>
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
15 * You should have received a copy of the GNU Library General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
21 #ifndef __GST_VIDEO_H__
22 #define __GST_VIDEO_H__
28 #include <gst/video/video-enumtypes.h>
32 * @GST_VIDEO_FORMAT_UNKNOWN: Unknown or unset video format id
33 * @GST_VIDEO_FORMAT_I420: planar 4:2:0 YUV
34 * @GST_VIDEO_FORMAT_YV12: planar 4:2:0 YVU (like I420 but UV planes swapped)
35 * @GST_VIDEO_FORMAT_YUY2: packed 4:2:2 YUV (Y0-U0-Y1-V0 Y2-U2-Y3-V2 Y4 ...)
36 * @GST_VIDEO_FORMAT_UYVY: packed 4:2:2 YUV (U0-Y0-V0-Y1 U2-Y2-V2-Y3 U4 ...)
37 * @GST_VIDEO_FORMAT_AYUV: packed 4:4:4 YUV with alpha channel (A0-Y0-U0-V0 ...)
38 * @GST_VIDEO_FORMAT_RGBx: sparse rgb packed into 32 bit, space last
39 * @GST_VIDEO_FORMAT_BGRx: sparse reverse rgb packed into 32 bit, space last
40 * @GST_VIDEO_FORMAT_xRGB: sparse rgb packed into 32 bit, space first
41 * @GST_VIDEO_FORMAT_xBGR: sparse reverse rgb packed into 32 bit, space first
42 * @GST_VIDEO_FORMAT_RGBA: rgb with alpha channel last
43 * @GST_VIDEO_FORMAT_BGRA: reverse rgb with alpha channel last
44 * @GST_VIDEO_FORMAT_ARGB: rgb with alpha channel first
45 * @GST_VIDEO_FORMAT_ABGR: reverse rgb with alpha channel first
46 * @GST_VIDEO_FORMAT_RGB: rgb
47 * @GST_VIDEO_FORMAT_BGR: reverse rgb
48 * @GST_VIDEO_FORMAT_Y41B: planar 4:1:1 YUV (Since: 0.10.18)
49 * @GST_VIDEO_FORMAT_Y42B: planar 4:2:2 YUV (Since: 0.10.18)
50 * @GST_VIDEO_FORMAT_YVYU: packed 4:2:2 YUV (Y0-V0-Y1-U0 Y2-V2-Y3-U2 Y4 ...) (Since: 0.10.23)
51 * @GST_VIDEO_FORMAT_Y444: planar 4:4:4 YUV (Since: 0.10.24)
52 * @GST_VIDEO_FORMAT_v210: packed 4:2:2 10-bit YUV, complex format (Since: 0.10.24)
53 * @GST_VIDEO_FORMAT_v216: packed 4:2:2 16-bit YUV, Y0-U0-Y1-V1 order (Since: 0.10.24)
54 * @GST_VIDEO_FORMAT_NV12: planar 4:2:0 YUV with interleaved UV plane (Since: 0.10.26)
55 * @GST_VIDEO_FORMAT_NV21: planar 4:2:0 YUV with interleaved VU plane (Since: 0.10.26)
56 * @GST_VIDEO_FORMAT_GRAY8: 8-bit grayscale (Since: 0.10.29)
57 * @GST_VIDEO_FORMAT_GRAY16_BE: 16-bit grayscale, most significant byte first (Since: 0.10.29)
58 * @GST_VIDEO_FORMAT_GRAY16_LE: 16-bit grayscale, least significant byte first (Since: 0.10.29)
59 * @GST_VIDEO_FORMAT_v308: packed 4:4:4 YUV (Since: 0.10.29)
60 * @GST_VIDEO_FORMAT_Y800: same as GST_VIDEO_FORMAT_GRAY8 (Since: 0.10.30)
61 * @GST_VIDEO_FORMAT_Y16: same as GST_VIDEO_FORMAT_GRAY16_LE (Since: 0.10.30)
62 * @GST_VIDEO_FORMAT_RGB16: rgb 5-6-5 bits per component (Since: 0.10.30)
63 * @GST_VIDEO_FORMAT_BGR16: reverse rgb 5-6-5 bits per component (Since: 0.10.30)
64 * @GST_VIDEO_FORMAT_RGB15: rgb 5-5-5 bits per component (Since: 0.10.30)
65 * @GST_VIDEO_FORMAT_BGR15: reverse rgb 5-5-5 bits per component (Since: 0.10.30)
66 * @GST_VIDEO_FORMAT_UYVP: packed 10-bit 4:2:2 YUV (U0-Y0-V0-Y1 U2-Y2-V2-Y3 U4 ...) (Since: 0.10.31)
67 * @GST_VIDEO_FORMAT_A420: planar 4:4:2:0 AYUV (Since: 0.10.31)
68 * @GST_VIDEO_FORMAT_RGB8_PALETTED: 8-bit paletted RGB (Since: 0.10.32)
69 * @GST_VIDEO_FORMAT_YUV9: planar 4:1:0 YUV (Since: 0.10.32)
70 * @GST_VIDEO_FORMAT_YVU9: planar 4:1:0 YUV (like YUV9 but UV planes swapped) (Since: 0.10.32)
71 * @GST_VIDEO_FORMAT_IYU1: packed 4:1:1 YUV (Cb-Y0-Y1-Cr-Y2-Y3 ...) (Since: 0.10.32)
72 * @GST_VIDEO_FORMAT_ARGB64: rgb with alpha channel first, 16 bits per channel (Since: 0.10.33)
73 * @GST_VIDEO_FORMAT_AY64: packed 4:4:4 YUV with alpha channel, 16 bits per channel (A0-Y0-U0-V0 ...) (Since: 0.10.33)
75 * Enum value describing the most common video formats.
78 GST_VIDEO_FORMAT_UNKNOWN,
79 GST_VIDEO_FORMAT_I420,
80 GST_VIDEO_FORMAT_YV12,
81 GST_VIDEO_FORMAT_YUY2,
82 GST_VIDEO_FORMAT_UYVY,
83 GST_VIDEO_FORMAT_AYUV,
84 GST_VIDEO_FORMAT_RGBx,
85 GST_VIDEO_FORMAT_BGRx,
86 GST_VIDEO_FORMAT_xRGB,
87 GST_VIDEO_FORMAT_xBGR,
88 GST_VIDEO_FORMAT_RGBA,
89 GST_VIDEO_FORMAT_BGRA,
90 GST_VIDEO_FORMAT_ARGB,
91 GST_VIDEO_FORMAT_ABGR,
94 GST_VIDEO_FORMAT_Y41B,
95 GST_VIDEO_FORMAT_Y42B,
96 GST_VIDEO_FORMAT_YVYU,
97 GST_VIDEO_FORMAT_Y444,
98 GST_VIDEO_FORMAT_v210,
99 GST_VIDEO_FORMAT_v216,
100 GST_VIDEO_FORMAT_NV12,
101 GST_VIDEO_FORMAT_NV21,
102 GST_VIDEO_FORMAT_GRAY8,
103 GST_VIDEO_FORMAT_GRAY16_BE,
104 GST_VIDEO_FORMAT_GRAY16_LE,
105 GST_VIDEO_FORMAT_v308,
106 GST_VIDEO_FORMAT_Y800,
107 GST_VIDEO_FORMAT_Y16,
108 GST_VIDEO_FORMAT_RGB16,
109 GST_VIDEO_FORMAT_BGR16,
110 GST_VIDEO_FORMAT_RGB15,
111 GST_VIDEO_FORMAT_BGR15,
112 GST_VIDEO_FORMAT_UYVP,
113 GST_VIDEO_FORMAT_A420,
114 GST_VIDEO_FORMAT_RGB8_PALETTED,
115 GST_VIDEO_FORMAT_YUV9,
116 GST_VIDEO_FORMAT_YVU9,
117 GST_VIDEO_FORMAT_IYU1,
118 GST_VIDEO_FORMAT_ARGB64,
119 GST_VIDEO_FORMAT_AYUV64
122 #define GST_VIDEO_BYTE1_MASK_32 "0xFF000000"
123 #define GST_VIDEO_BYTE2_MASK_32 "0x00FF0000"
124 #define GST_VIDEO_BYTE3_MASK_32 "0x0000FF00"
125 #define GST_VIDEO_BYTE4_MASK_32 "0x000000FF"
127 #define GST_VIDEO_BYTE1_MASK_24 "0x00FF0000"
128 #define GST_VIDEO_BYTE2_MASK_24 "0x0000FF00"
129 #define GST_VIDEO_BYTE3_MASK_24 "0x000000FF"
131 #define GST_VIDEO_BYTE1_MASK_32_INT 0xFF000000
132 #define GST_VIDEO_BYTE2_MASK_32_INT 0x00FF0000
133 #define GST_VIDEO_BYTE3_MASK_32_INT 0x0000FF00
134 #define GST_VIDEO_BYTE4_MASK_32_INT 0x000000FF
136 #define GST_VIDEO_BYTE1_MASK_24_INT 0x00FF0000
137 #define GST_VIDEO_BYTE2_MASK_24_INT 0x0000FF00
138 #define GST_VIDEO_BYTE3_MASK_24_INT 0x000000FF
140 #define GST_VIDEO_COMP1_MASK_16 "0xf800"
141 #define GST_VIDEO_COMP2_MASK_16 "0x07e0"
142 #define GST_VIDEO_COMP3_MASK_16 "0x001f"
144 #define GST_VIDEO_COMP1_MASK_15 "0x7c00"
145 #define GST_VIDEO_COMP2_MASK_15 "0x03e0"
146 #define GST_VIDEO_COMP3_MASK_15 "0x001f"
148 #define GST_VIDEO_COMP1_MASK_16_INT 0xf800
149 #define GST_VIDEO_COMP2_MASK_16_INT 0x07e0
150 #define GST_VIDEO_COMP3_MASK_16_INT 0x001f
152 #define GST_VIDEO_COMP1_MASK_15_INT 0x7c00
153 #define GST_VIDEO_COMP2_MASK_15_INT 0x03e0
154 #define GST_VIDEO_COMP3_MASK_15_INT 0x001f
156 #ifndef GST_DISABLE_DEPRECATED
157 #define GST_VIDEO_RED_MASK_16 GST_VIDEO_COMP1_MASK_16
158 #define GST_VIDEO_GREEN_MASK_16 GST_VIDEO_COMP2_MASK_16
159 #define GST_VIDEO_BLUE_MASK_16 GST_VIDEO_COMP3_MASK_16
161 #define GST_VIDEO_RED_MASK_15 GST_VIDEO_COMP1_MASK_15
162 #define GST_VIDEO_GREEN_MASK_15 GST_VIDEO_COMP2_MASK_15
163 #define GST_VIDEO_BLUE_MASK_15 GST_VIDEO_COMP3_MASK_15
165 #define GST_VIDEO_RED_MASK_16_INT GST_VIDEO_COMP1_MASK_16_INT
166 #define GST_VIDEO_GREEN_MASK_16_INT GST_VIDEO_COMP2_MASK_16_INT
167 #define GST_VIDEO_BLUE_MASK_16_INT GST_VIDEO_COMP3_MASK_16_INT
169 #define GST_VIDEO_RED_MASK_15_INT GST_VIDEO_COMP1_MASK_15_INT
170 #define GST_VIDEO_GREEN_MASK_15_INT GST_VIDEO_COMP2_MASK_15_INT
171 #define GST_VIDEO_BLUE_MASK_15_INT GST_VIDEO_COMP3_MASK_15_INT
174 #define GST_VIDEO_SIZE_RANGE "(int) [ 1, max ]"
175 #define GST_VIDEO_FPS_RANGE "(fraction) [ 0, max ]"
177 /* consider the next 2 protected */
178 #define __GST_VIDEO_CAPS_MAKE_32A(R, G, B, A) \
179 "video/x-raw-rgb, " \
181 "depth = (int) 32, " \
182 "endianness = (int) BIG_ENDIAN, " \
183 "red_mask = (int) " GST_VIDEO_BYTE ## R ## _MASK_32 ", " \
184 "green_mask = (int) " GST_VIDEO_BYTE ## G ## _MASK_32 ", " \
185 "blue_mask = (int) " GST_VIDEO_BYTE ## B ## _MASK_32 ", " \
186 "alpha_mask = (int) " GST_VIDEO_BYTE ## A ## _MASK_32 ", " \
187 "width = " GST_VIDEO_SIZE_RANGE ", " \
188 "height = " GST_VIDEO_SIZE_RANGE ", " \
189 "framerate = " GST_VIDEO_FPS_RANGE
191 #define __GST_VIDEO_CAPS_MAKE_32(R, G, B) \
192 "video/x-raw-rgb, " \
194 "depth = (int) 24, " \
195 "endianness = (int) BIG_ENDIAN, " \
196 "red_mask = (int) " GST_VIDEO_BYTE ## R ## _MASK_32 ", " \
197 "green_mask = (int) " GST_VIDEO_BYTE ## G ## _MASK_32 ", " \
198 "blue_mask = (int) " GST_VIDEO_BYTE ## B ## _MASK_32 ", " \
199 "width = " GST_VIDEO_SIZE_RANGE ", " \
200 "height = " GST_VIDEO_SIZE_RANGE ", " \
201 "framerate = " GST_VIDEO_FPS_RANGE
203 #define __GST_VIDEO_CAPS_MAKE_24(R, G, B) \
204 "video/x-raw-rgb, " \
206 "depth = (int) 24, " \
207 "endianness = (int) BIG_ENDIAN, " \
208 "red_mask = (int) " GST_VIDEO_BYTE ## R ## _MASK_24 ", " \
209 "green_mask = (int) " GST_VIDEO_BYTE ## G ## _MASK_24 ", " \
210 "blue_mask = (int) " GST_VIDEO_BYTE ## B ## _MASK_24 ", " \
211 "width = " GST_VIDEO_SIZE_RANGE ", " \
212 "height = " GST_VIDEO_SIZE_RANGE ", " \
213 "framerate = " GST_VIDEO_FPS_RANGE
215 #define __GST_VIDEO_CAPS_MAKE_16(R, G, B) \
216 "video/x-raw-rgb, " \
218 "depth = (int) 16, " \
219 "endianness = (int) BYTE_ORDER, " \
220 "red_mask = (int) " GST_VIDEO_COMP ## R ## _MASK_16 ", " \
221 "green_mask = (int) " GST_VIDEO_COMP ## G ## _MASK_16 ", " \
222 "blue_mask = (int) " GST_VIDEO_COMP ## B ## _MASK_16 ", " \
223 "width = " GST_VIDEO_SIZE_RANGE ", " \
224 "height = " GST_VIDEO_SIZE_RANGE ", " \
225 "framerate = " GST_VIDEO_FPS_RANGE
227 #define __GST_VIDEO_CAPS_MAKE_15(R, G, B) \
228 "video/x-raw-rgb, " \
230 "depth = (int) 15, " \
231 "endianness = (int) BYTE_ORDER, " \
232 "red_mask = (int) " GST_VIDEO_COMP ## R ## _MASK_15 ", " \
233 "green_mask = (int) " GST_VIDEO_COMP ## G ## _MASK_15 ", " \
234 "blue_mask = (int) " GST_VIDEO_COMP ## B ## _MASK_15 ", " \
235 "width = " GST_VIDEO_SIZE_RANGE ", " \
236 "height = " GST_VIDEO_SIZE_RANGE ", " \
237 "framerate = " GST_VIDEO_FPS_RANGE
239 #define __GST_VIDEO_CAPS_MAKE_64A(R, G, B, A) \
240 "video/x-raw-rgb, " \
242 "depth = (int) 64, " \
243 "endianness = (int) BIG_ENDIAN, " \
244 "red_mask = (int) " GST_VIDEO_BYTE ## R ## _MASK_32 ", " \
245 "green_mask = (int) " GST_VIDEO_BYTE ## G ## _MASK_32 ", " \
246 "blue_mask = (int) " GST_VIDEO_BYTE ## B ## _MASK_32 ", " \
247 "alpha_mask = (int) " GST_VIDEO_BYTE ## A ## _MASK_32 ", " \
248 "width = " GST_VIDEO_SIZE_RANGE ", " \
249 "height = " GST_VIDEO_SIZE_RANGE ", " \
250 "framerate = " GST_VIDEO_FPS_RANGE
255 #define GST_VIDEO_CAPS_RGB \
256 __GST_VIDEO_CAPS_MAKE_24 (1, 2, 3)
258 #define GST_VIDEO_CAPS_BGR \
259 __GST_VIDEO_CAPS_MAKE_24 (3, 2, 1)
263 #define GST_VIDEO_CAPS_RGBx \
264 __GST_VIDEO_CAPS_MAKE_32 (1, 2, 3)
266 #define GST_VIDEO_CAPS_xRGB \
267 __GST_VIDEO_CAPS_MAKE_32 (2, 3, 4)
269 #define GST_VIDEO_CAPS_BGRx \
270 __GST_VIDEO_CAPS_MAKE_32 (3, 2, 1)
272 #define GST_VIDEO_CAPS_xBGR \
273 __GST_VIDEO_CAPS_MAKE_32 (4, 3, 2)
277 #define GST_VIDEO_CAPS_RGBA \
278 __GST_VIDEO_CAPS_MAKE_32A (1, 2, 3, 4)
280 #define GST_VIDEO_CAPS_ARGB \
281 __GST_VIDEO_CAPS_MAKE_32A (2, 3, 4, 1)
283 #define GST_VIDEO_CAPS_BGRA \
284 __GST_VIDEO_CAPS_MAKE_32A (3, 2, 1, 4)
286 #define GST_VIDEO_CAPS_ABGR \
287 __GST_VIDEO_CAPS_MAKE_32A (4, 3, 2, 1)
289 /* note: the macro name uses the order on BE systems */
290 #if G_BYTE_ORDER == G_BIG_ENDIAN
291 #define GST_VIDEO_CAPS_xRGB_HOST_ENDIAN \
293 #define GST_VIDEO_CAPS_BGRx_HOST_ENDIAN \
296 #define GST_VIDEO_CAPS_xRGB_HOST_ENDIAN \
298 #define GST_VIDEO_CAPS_BGRx_HOST_ENDIAN \
304 #define GST_VIDEO_CAPS_RGB_16 \
305 __GST_VIDEO_CAPS_MAKE_16 (1, 2, 3)
307 #define GST_VIDEO_CAPS_BGR_16 \
308 __GST_VIDEO_CAPS_MAKE_16 (3, 2, 1)
310 #define GST_VIDEO_CAPS_RGB_15 \
311 __GST_VIDEO_CAPS_MAKE_15 (1, 2, 3)
313 #define GST_VIDEO_CAPS_BGR_15 \
314 __GST_VIDEO_CAPS_MAKE_15 (3, 2, 1)
318 #define GST_VIDEO_CAPS_ARGB_64 \
319 __GST_VIDEO_CAPS_MAKE_64A (2, 3, 4, 1)
322 * GST_VIDEO_CAPS_RGB8_PALETTED:
324 * Generic caps string for 8-bit paletted RGB video, for use in pad templates.
328 #define GST_VIDEO_CAPS_RGB8_PALETTED \
329 "video/x-raw-rgb, bpp = (int)8, depth = (int)8, " \
330 "width = "GST_VIDEO_SIZE_RANGE" , " \
331 "height = " GST_VIDEO_SIZE_RANGE ", " \
332 "framerate = "GST_VIDEO_FPS_RANGE
335 * GST_VIDEO_CAPS_YUV:
336 * @fourcc: YUV fourcc format that describes the pixel layout, as string
337 * (e.g. "I420", "YV12", "YUY2", "AYUV", etc.)
339 * Generic caps string for YUV video, for use in pad templates.
341 #define GST_VIDEO_CAPS_YUV(fourcc) \
342 "video/x-raw-yuv, " \
343 "format = (fourcc) " fourcc ", " \
344 "width = " GST_VIDEO_SIZE_RANGE ", " \
345 "height = " GST_VIDEO_SIZE_RANGE ", " \
346 "framerate = " GST_VIDEO_FPS_RANGE
349 * GST_VIDEO_CAPS_GRAY8:
351 * Generic caps string for 8-bit grayscale video, for use in pad templates.
355 #define GST_VIDEO_CAPS_GRAY8 \
356 "video/x-raw-gray, " \
358 "depth = (int) 8, " \
359 "width = " GST_VIDEO_SIZE_RANGE ", " \
360 "height = " GST_VIDEO_SIZE_RANGE ", " \
361 "framerate = " GST_VIDEO_FPS_RANGE
364 * GST_VIDEO_CAPS_GRAY16:
365 * @endianness: endianness as string, ie. either "1234", "4321", "BIG_ENDIAN"
368 * Generic caps string for 16-bit grayscale video, for use in pad templates.
372 #define GST_VIDEO_CAPS_GRAY16(endianness) \
373 "video/x-raw-gray, " \
375 "depth = (int) 16, " \
376 "endianness = (int) " endianness ", " \
377 "width = " GST_VIDEO_SIZE_RANGE ", " \
378 "height = " GST_VIDEO_SIZE_RANGE ", " \
379 "framerate = " GST_VIDEO_FPS_RANGE
384 * GST_VIDEO_BUFFER_TFF:
386 * If the #GstBuffer is interlaced, then the first field in the video frame is
387 * the top field. If unset, the bottom field is first.
391 #define GST_VIDEO_BUFFER_TFF GST_BUFFER_FLAG_MEDIA1
394 * GST_VIDEO_BUFFER_RFF:
396 * If the #GstBuffer is interlaced, then the first field (as defined by the
397 * %GST_VIDEO_BUFFER_TFF flag setting) is repeated.
401 #define GST_VIDEO_BUFFER_RFF GST_BUFFER_FLAG_MEDIA2
404 * GST_VIDEO_BUFFER_ONEFIELD:
406 * If the #GstBuffer is interlaced, then only the first field (as defined by the
407 * %GST_VIDEO_BUFFER_TFF flag setting) is to be displayed.
411 #define GST_VIDEO_BUFFER_ONEFIELD GST_BUFFER_FLAG_MEDIA3
414 * GST_VIDEO_BUFFER_PROGRESSIVE:
416 * If the #GstBuffer is telecined, then the buffer is progressive if the
417 * %GST_VIDEO_BUFFER_PROGRESSIVE flag is set, else it is telecine mixed.
421 #define GST_VIDEO_BUFFER_PROGRESSIVE GST_BUFFER_FLAG_MEDIA4
424 const GValue *gst_video_frame_rate (GstPad *pad);
425 gboolean gst_video_get_size (GstPad *pad,
429 gboolean gst_video_calculate_display_ratio (guint *dar_n, guint *dar_d,
430 guint video_width, guint video_height,
431 guint video_par_n, guint video_par_d,
432 guint display_par_n, guint display_par_d);
434 gboolean gst_video_format_parse_caps (GstCaps *caps, GstVideoFormat *format,
435 int *width, int *height);
436 gboolean gst_video_format_parse_caps_interlaced (GstCaps *caps, gboolean *interlaced);
437 gboolean gst_video_parse_caps_framerate (GstCaps *caps,
438 int *fps_n, int *fps_d);
439 gboolean gst_video_parse_caps_pixel_aspect_ratio (GstCaps *caps,
440 int *par_n, int *par_d);
441 const char *gst_video_parse_caps_color_matrix (GstCaps * caps);
442 const char *gst_video_parse_caps_chroma_site (GstCaps * caps);
443 GstBuffer *gst_video_parse_caps_palette (GstCaps * caps);
444 GstCaps * gst_video_format_new_caps (GstVideoFormat format,
445 int width, int height, int framerate_n, int framerate_d,
446 int par_n, int par_d);
447 GstCaps * gst_video_format_new_caps_interlaced (GstVideoFormat format,
448 int width, int height, int framerate_n, int framerate_d,
449 int par_n, int par_d, gboolean interlaced);
450 GstVideoFormat gst_video_format_from_fourcc (guint32 fourcc);
451 guint32 gst_video_format_to_fourcc (GstVideoFormat format);
452 gboolean gst_video_format_is_rgb (GstVideoFormat format);
453 gboolean gst_video_format_is_yuv (GstVideoFormat format);
454 gboolean gst_video_format_is_gray (GstVideoFormat format);
455 gboolean gst_video_format_has_alpha (GstVideoFormat format);
456 int gst_video_format_get_component_depth (GstVideoFormat format, int component);
457 int gst_video_format_get_row_stride (GstVideoFormat format, int component,
459 int gst_video_format_get_pixel_stride (GstVideoFormat format, int component);
460 int gst_video_format_get_component_width (GstVideoFormat format, int component,
462 int gst_video_format_get_component_height (GstVideoFormat format, int component,
464 int gst_video_format_get_component_offset (GstVideoFormat format, int component,
465 int width, int height);
466 int gst_video_format_get_size (GstVideoFormat format, int width, int height);
467 gboolean gst_video_format_convert (GstVideoFormat format, int width, int height,
468 int fps_n, int fps_d,
469 GstFormat src_format, gint64 src_value,
470 GstFormat dest_format, gint64 * dest_value);
472 GstEvent *gst_video_event_new_still_frame (gboolean in_still);
473 gboolean gst_video_event_parse_still_frame (GstEvent *event, gboolean *in_still);
475 GstBuffer *gst_video_convert_frame(GstBuffer *buf, const GstCaps *to_caps,
476 GstClockTime timeout, GError **error);
478 typedef void (*GstVideoConvertFrameCallback) (GstBuffer *buf, GError *error, gpointer user_data);
479 void gst_video_convert_frame_async(GstBuffer *buf, const GstCaps *to_caps,
480 GstClockTime timeout, GstVideoConvertFrameCallback callback,
481 gpointer user_data, GDestroyNotify destroy_notify);
485 #endif /* __GST_VIDEO_H__ */