2 * Copyright (C) <2011> Wim Taymans <wim.taymans@gmail.com>
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.
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.
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.
20 #ifndef __GST_VIDEO_H__
21 #define __GST_VIDEO_H__
25 #include <gst/video/video-prelude.h>
27 typedef struct _GstVideoAlignment GstVideoAlignment;
29 #include <gst/video/video-format.h>
30 #include <gst/video/video-color.h>
31 #include <gst/video/video-dither.h>
32 #include <gst/video/video-info.h>
33 #include <gst/video/video-frame.h>
34 #include <gst/video/video-enumtypes.h>
35 #include <gst/video/video-converter.h>
36 #include <gst/video/video-scaler.h>
37 #include <gst/video/video-multiview.h>
43 * @padding_left: extra pixels on the left side
44 * @padding_right: extra pixels on the right side
45 * @padding_top: extra pixels on the top
46 * @padding_bottom: extra pixels on the bottom
47 * @stride_align: array with extra alignment requirements for the strides
49 * Extra alignment parameters for the memory of video buffers. This
50 * structure is usually used to configure the bufferpool if it supports the
51 * #GST_BUFFER_POOL_OPTION_VIDEO_ALIGNMENT.
53 struct _GstVideoAlignment
59 guint stride_align[GST_VIDEO_MAX_PLANES];
63 * GstVideoOrientationMethod:
64 * @GST_VIDEO_ORIENTATION_IDENTITY: Identity (no rotation)
65 * @GST_VIDEO_ORIENTATION_90R: Rotate clockwise 90 degrees
66 * @GST_VIDEO_ORIENTATION_180: Rotate 180 degrees
67 * @GST_VIDEO_ORIENTATION_90L: Rotate counter-clockwise 90 degrees
68 * @GST_VIDEO_ORIENTATION_HORIZ: Flip horizontally
69 * @GST_VIDEO_ORIENTATION_VERT: Flip vertically
70 * @GST_VIDEO_ORIENTATION_UL_LR: Flip across upper left/lower right diagonal
71 * @GST_VIDEO_ORIENTATION_UR_LL: Flip across upper right/lower left diagonal
72 * @GST_VIDEO_ORIENTATION_AUTO: Select flip method based on image-orientation tag
73 * @GST_VIDEO_ORIENTATION_CUSTOM: Current status depends on plugin internal setup
75 * The different video orientation methods.
80 GST_VIDEO_ORIENTATION_IDENTITY,
81 GST_VIDEO_ORIENTATION_90R,
82 GST_VIDEO_ORIENTATION_180,
83 GST_VIDEO_ORIENTATION_90L,
84 GST_VIDEO_ORIENTATION_HORIZ,
85 GST_VIDEO_ORIENTATION_VERT,
86 GST_VIDEO_ORIENTATION_UL_LR,
87 GST_VIDEO_ORIENTATION_UR_LL,
88 GST_VIDEO_ORIENTATION_AUTO,
89 GST_VIDEO_ORIENTATION_CUSTOM,
90 } GstVideoOrientationMethod;
93 * GST_TYPE_VIDEO_ORIENTATION_METHOD:
99 GType gst_video_orientation_method_get_type (void);
100 #define GST_TYPE_VIDEO_ORIENTATION_METHOD \
101 gst_video_orientation_method_get_type ()
103 /* metadata macros */
105 * GST_META_TAG_VIDEO_STR:
107 * This metadata is relevant for video streams.
111 #define GST_META_TAG_VIDEO_STR "video"
113 * GST_META_TAG_VIDEO_ORIENTATION_STR:
115 * This metadata stays relevant as long as video orientation is unchanged.
119 #define GST_META_TAG_VIDEO_ORIENTATION_STR "orientation"
121 * GST_META_TAG_VIDEO_SIZE_STR:
123 * This metadata stays relevant as long as video size is unchanged.
127 #define GST_META_TAG_VIDEO_SIZE_STR "size"
129 * GST_META_TAG_VIDEO_COLORSPACE_STR:
131 * This metadata stays relevant as long as video colorspace is unchanged.
135 #define GST_META_TAG_VIDEO_COLORSPACE_STR "colorspace"
138 void gst_video_alignment_reset (GstVideoAlignment *align);
141 /* some helper functions */
144 gboolean gst_video_calculate_display_ratio (guint * dar_n,
151 guint display_par_d);
154 gboolean gst_video_guess_framerate (GstClockTime duration,
155 gint * dest_n, gint * dest_d);
157 /* convert/encode video sample from one format to another */
159 typedef void (*GstVideoConvertSampleCallback) (GstSample * sample, GError *error, gpointer user_data);
162 void gst_video_convert_sample_async (GstSample * sample,
163 const GstCaps * to_caps,
164 GstClockTime timeout,
165 GstVideoConvertSampleCallback callback,
167 GDestroyNotify destroy_notify);
170 GstSample * gst_video_convert_sample (GstSample * sample,
171 const GstCaps * to_caps,
172 GstClockTime timeout,
177 #include <gst/video/colorbalancechannel.h>
178 #include <gst/video/colorbalance.h>
179 #include <gst/video/gstvideoaffinetransformationmeta.h>
180 #include <gst/video/gstvideoaggregator.h>
181 #include <gst/video/gstvideocodecalphameta.h>
182 #include <gst/video/gstvideodecoder.h>
183 #include <gst/video/gstvideoencoder.h>
184 #include <gst/video/gstvideofilter.h>
185 #include <gst/video/gstvideometa.h>
186 #include <gst/video/gstvideopool.h>
187 #include <gst/video/gstvideosink.h>
188 #include <gst/video/gstvideotimecode.h>
189 #include <gst/video/gstvideoutils.h>
190 #include <gst/video/navigation.h>
191 #include <gst/video/video-anc.h>
192 #include <gst/video/video-blend.h>
193 #include <gst/video/videodirection.h>
194 #include <gst/video/video-event.h>
195 #include <gst/video/video-hdr.h>
196 #include <gst/video/videoorientation.h>
197 #include <gst/video/video-overlay-composition.h>
198 #include <gst/video/videooverlay.h>
200 #endif /* __GST_VIDEO_H__ */