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 typedef struct _GstVideoAlignment GstVideoAlignment;
27 #include <gst/video/video-format.h>
28 #include <gst/video/video-color.h>
29 #include <gst/video/video-info.h>
30 #include <gst/video/video-frame.h>
31 #include <gst/video/video-enumtypes.h>
37 * @padding_left: extra pixels on the left side
38 * @padding_right: extra pixels on the right side
39 * @padding_top: extra pixels on the top
40 * @padding_bottom: extra pixels on the bottom
41 * @stride_align: array with extra alignment requirements for the strides
43 * Extra alignment paramters for the memory of video buffers. This
44 * structure is usually used to configure the bufferpool if it supports the
45 * #GST_BUFFER_POOL_OPTION_VIDEO_ALIGNMENT.
47 struct _GstVideoAlignment
53 guint stride_align[GST_VIDEO_MAX_PLANES];
58 * GST_META_TAG_VIDEO_STR:
60 * This metadata is relevant for video streams.
64 #define GST_META_TAG_VIDEO_STR "video"
66 * GST_META_TAG_VIDEO_ORIENTATION_STR:
68 * This metadata stays relevant as long as video orientation is unchanged.
72 #define GST_META_TAG_VIDEO_ORIENTATION_STR "orientation"
74 * GST_META_TAG_VIDEO_SIZE_STR:
76 * This metadata stays relevant as long as video size is unchanged.
80 #define GST_META_TAG_VIDEO_SIZE_STR "size"
82 * GST_META_TAG_VIDEO_COLORSPACE_STR:
84 * This metadata stays relevant as long as video colorspace is unchanged.
88 #define GST_META_TAG_VIDEO_COLORSPACE_STR "colorspace"
90 void gst_video_alignment_reset (GstVideoAlignment *align);
93 /* some helper functions */
94 gboolean gst_video_calculate_display_ratio (guint * dar_n,
101 guint display_par_d);
103 gboolean gst_video_guess_framerate (GstClockTime duration,
104 gint * dest_n, gint * dest_d);
106 /* convert/encode video sample from one format to another */
108 typedef void (*GstVideoConvertSampleCallback) (GstSample * sample, GError *error, gpointer user_data);
110 void gst_video_convert_sample_async (GstSample * sample,
111 const GstCaps * to_caps,
112 GstClockTime timeout,
113 GstVideoConvertSampleCallback callback,
115 GDestroyNotify destroy_notify);
117 GstSample * gst_video_convert_sample (GstSample * sample,
118 const GstCaps * to_caps,
119 GstClockTime timeout,
124 #include <gst/video/colorbalancechannel.h>
125 #include <gst/video/colorbalance.h>
126 #include <gst/video/gstvideodecoder.h>
127 #include <gst/video/gstvideoencoder.h>
128 #include <gst/video/gstvideofilter.h>
129 #include <gst/video/gstvideometa.h>
130 #include <gst/video/gstvideopool.h>
131 #include <gst/video/gstvideosink.h>
132 #include <gst/video/gstvideoutils.h>
133 #include <gst/video/navigation.h>
134 #include <gst/video/video-blend.h>
135 #include <gst/video/video-event.h>
136 #include <gst/video/videoorientation.h>
137 #include <gst/video/video-overlay-composition.h>
138 #include <gst/video/videooverlay.h>
140 #endif /* __GST_VIDEO_H__ */