23 |
23 |
24 #include <gst/gst.h> |
24 #include <gst/gst.h> |
25 |
25 |
26 G_BEGIN_DECLS |
26 G_BEGIN_DECLS |
27 |
27 |
|
28 #include <gst/video/video-enumtypes.h> |
|
29 |
28 /** |
30 /** |
29 * GstVideoFormat: |
31 * GstVideoFormat: |
30 * @GST_VIDEO_FORMAT_UNKNOWN, |
32 * @GST_VIDEO_FORMAT_UNKNOWN: Unknown or unset video format id |
31 * @GST_VIDEO_FORMAT_I420: planar 4:2:0 YUV |
33 * @GST_VIDEO_FORMAT_I420: planar 4:2:0 YUV |
32 * @GST_VIDEO_FORMAT_YV12: planar 4:2:0 YVU (like I420 but UV planes swapped) |
34 * @GST_VIDEO_FORMAT_YV12: planar 4:2:0 YVU (like I420 but UV planes swapped) |
33 * @GST_VIDEO_FORMAT_YUY2: packed 4:2:2 YUV (Y0-U0-Y1-V0 Y2-U2-Y3-V2 Y4 ...) |
35 * @GST_VIDEO_FORMAT_YUY2: packed 4:2:2 YUV (Y0-U0-Y1-V0 Y2-U2-Y3-V2 Y4 ...) |
34 * @GST_VIDEO_FORMAT_UYVY: packed 4:2:2 YUV (U0-Y0-V0-Y1 U2-Y2-V2-Y3 U4 ...) |
36 * @GST_VIDEO_FORMAT_UYVY: packed 4:2:2 YUV (U0-Y0-V0-Y1 U2-Y2-V2-Y3 U4 ...) |
35 * @GST_VIDEO_FORMAT_AYUV: packed 4:4:4 YUV with alpha channel (A0-Y0-U0-V0 ...) |
37 * @GST_VIDEO_FORMAT_AYUV: packed 4:4:4 YUV with alpha channel (A0-Y0-U0-V0 ...) |
36 * @GST_VIDEO_FORMAT_RGBx: |
38 * @GST_VIDEO_FORMAT_RGBx: sparse rgb packed into 32 bit, space last |
37 * @GST_VIDEO_FORMAT_BGRx: |
39 * @GST_VIDEO_FORMAT_BGRx: sparse reverse rgb packed into 32 bit, space last |
38 * @GST_VIDEO_FORMAT_xRGB: |
40 * @GST_VIDEO_FORMAT_xRGB: sparse rgb packed into 32 bit, space first |
39 * @GST_VIDEO_FORMAT_xBGR: |
41 * @GST_VIDEO_FORMAT_xBGR: sparse reverse rgb packed into 32 bit, space first |
40 * @GST_VIDEO_FORMAT_RGBA: |
42 * @GST_VIDEO_FORMAT_RGBA: rgb with alpha channel last |
41 * @GST_VIDEO_FORMAT_BGRA: |
43 * @GST_VIDEO_FORMAT_BGRA: reverse rgb with alpha channel last |
42 * @GST_VIDEO_FORMAT_ARGB: |
44 * @GST_VIDEO_FORMAT_ARGB: rgb with alpha channel first |
43 * @GST_VIDEO_FORMAT_ABGR: |
45 * @GST_VIDEO_FORMAT_ABGR: reverse rgb with alpha channel first |
44 * @GST_VIDEO_FORMAT_RGB: |
46 * @GST_VIDEO_FORMAT_RGB: rgb |
45 * @GST_VIDEO_FORMAT_BGR: |
47 * @GST_VIDEO_FORMAT_BGR: reverse rgb |
46 * @GST_VIDEO_FORMAT_Y41B: planar 4:1:1 YUV (Since: 0.10.18) |
48 * @GST_VIDEO_FORMAT_Y41B: planar 4:1:1 YUV (Since: 0.10.18) |
47 * @GST_VIDEO_FORMAT_Y42B: planar 4:2:2 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) |
48 * |
54 * |
49 * Enum value describing the most common video formats. |
55 * Enum value describing the most common video formats. |
50 */ |
56 */ |
51 typedef enum { |
57 typedef enum { |
52 GST_VIDEO_FORMAT_UNKNOWN, |
58 GST_VIDEO_FORMAT_UNKNOWN, |
64 GST_VIDEO_FORMAT_ARGB, |
70 GST_VIDEO_FORMAT_ARGB, |
65 GST_VIDEO_FORMAT_ABGR, |
71 GST_VIDEO_FORMAT_ABGR, |
66 GST_VIDEO_FORMAT_RGB, |
72 GST_VIDEO_FORMAT_RGB, |
67 GST_VIDEO_FORMAT_BGR, |
73 GST_VIDEO_FORMAT_BGR, |
68 GST_VIDEO_FORMAT_Y41B, |
74 GST_VIDEO_FORMAT_Y41B, |
69 GST_VIDEO_FORMAT_Y42B |
75 GST_VIDEO_FORMAT_Y42B, |
|
76 GST_VIDEO_FORMAT_YVYU, |
|
77 GST_VIDEO_FORMAT_Y444, |
|
78 GST_VIDEO_FORMAT_v210, |
|
79 GST_VIDEO_FORMAT_v216 |
70 } GstVideoFormat; |
80 } GstVideoFormat; |
71 |
81 |
72 #define GST_VIDEO_BYTE1_MASK_32 "0xFF000000" |
82 #define GST_VIDEO_BYTE1_MASK_32 "0xFF000000" |
73 #define GST_VIDEO_BYTE2_MASK_32 "0x00FF0000" |
83 #define GST_VIDEO_BYTE2_MASK_32 "0x00FF0000" |
74 #define GST_VIDEO_BYTE3_MASK_32 "0x0000FF00" |
84 #define GST_VIDEO_BYTE3_MASK_32 "0x0000FF00" |
225 "format = (fourcc) " fourcc ", " \ |
235 "format = (fourcc) " fourcc ", " \ |
226 "width = " GST_VIDEO_SIZE_RANGE ", " \ |
236 "width = " GST_VIDEO_SIZE_RANGE ", " \ |
227 "height = " GST_VIDEO_SIZE_RANGE ", " \ |
237 "height = " GST_VIDEO_SIZE_RANGE ", " \ |
228 "framerate = " GST_VIDEO_FPS_RANGE |
238 "framerate = " GST_VIDEO_FPS_RANGE |
229 |
239 |
|
240 /* buffer flags */ |
|
241 |
|
242 /** |
|
243 * GST_VIDEO_BUFFER_TFF: |
|
244 * |
|
245 * If the #GstBuffer is interlaced, then the first field in the video frame is |
|
246 * the top field. If unset, the bottom field is first. |
|
247 * |
|
248 * Since: 0.10.23 |
|
249 */ |
|
250 #define GST_VIDEO_BUFFER_TFF GST_BUFFER_FLAG_MEDIA1 |
|
251 |
|
252 /** |
|
253 * GST_VIDEO_BUFFER_RFF: |
|
254 * |
|
255 * If the #GstBuffer is interlaced, then the first field (as defined by the |
|
256 * %GST_VIDEO_BUFFER_TFF flag setting) is repeated. |
|
257 * |
|
258 * Since: 0.10.23 |
|
259 */ |
|
260 #define GST_VIDEO_BUFFER_RFF GST_BUFFER_FLAG_MEDIA2 |
|
261 |
|
262 /** |
|
263 * GST_VIDEO_BUFFER_ONEFIELD: |
|
264 * |
|
265 * If the #GstBuffer is interlaced, then only the first field (as defined by the |
|
266 * %GST_VIDEO_BUFFER_TFF flag setting) is to be displayed. |
|
267 * |
|
268 * Since: 0.10.23 |
|
269 */ |
|
270 #define GST_VIDEO_BUFFER_ONEFIELD GST_BUFFER_FLAG_MEDIA3 |
|
271 |
230 /* functions */ |
272 /* functions */ |
231 #ifdef __SYMBIAN32__ |
273 #ifdef __SYMBIAN32__ |
232 IMPORT_C |
274 IMPORT_C |
233 #endif |
275 #endif |
234 |
276 |
273 #endif |
320 #endif |
274 |
321 |
275 GstCaps * gst_video_format_new_caps (GstVideoFormat format, |
322 GstCaps * gst_video_format_new_caps (GstVideoFormat format, |
276 int width, int height, int framerate_n, int framerate_d, |
323 int width, int height, int framerate_n, int framerate_d, |
277 int par_n, int par_d); |
324 int par_n, int par_d); |
|
325 #ifdef __SYMBIAN32__ |
|
326 IMPORT_C |
|
327 #endif |
|
328 |
|
329 GstCaps * gst_video_format_new_caps_interlaced (GstVideoFormat format, |
|
330 int width, int height, int framerate_n, int framerate_d, |
|
331 int par_n, int par_d, gboolean interlaced); |
278 #ifdef __SYMBIAN32__ |
332 #ifdef __SYMBIAN32__ |
279 IMPORT_C |
333 IMPORT_C |
280 #endif |
334 #endif |
281 |
335 |
282 GstVideoFormat gst_video_format_from_fourcc (guint32 fourcc); |
336 GstVideoFormat gst_video_format_from_fourcc (guint32 fourcc); |