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-event.h>
28 #include <gst/video/video-format.h>
29 #include <gst/video/video-color.h>
30 #include <gst/video/video-info.h>
31 #include <gst/video/video-frame.h>
32 #include <gst/video/video-enumtypes.h>
38 * @padding_left: extra pixels on the left side
39 * @padding_right: extra pixels on the right side
40 * @padding_top: extra pixels on the top
41 * @padding_bottom: extra pixels on the bottom
42 * @stride_align: array with extra alignment requirements for the strides
44 * Extra alignment paramters for the memory of video buffers. This
45 * structure is usually used to configure the bufferpool if it supports the
46 * #GST_BUFFER_POOL_OPTION_VIDEO_ALIGNMENT.
48 struct _GstVideoAlignment
54 guint stride_align[GST_VIDEO_MAX_PLANES];
57 void gst_video_alignment_reset (GstVideoAlignment *align);
60 /* some helper functions */
61 gboolean gst_video_calculate_display_ratio (guint * dar_n,
70 /* convert/encode video sample from one format to another */
72 typedef void (*GstVideoConvertSampleCallback) (GstSample * sample, GError *error, gpointer user_data);
74 void gst_video_convert_sample_async (GstSample * sample,
75 const GstCaps * to_caps,
77 GstVideoConvertSampleCallback callback,
79 GDestroyNotify destroy_notify);
81 GstSample * gst_video_convert_sample (GstSample * sample,
82 const GstCaps * to_caps,
87 #endif /* __GST_VIDEO_H__ */