2002-09-26 12:20:12 +00:00
|
|
|
/* GStreamer
|
2011-08-18 17:15:03 +00:00
|
|
|
* Copyright (C) <2011> Wim Taymans <wim.taymans@gmail.com>
|
2002-09-26 12:20:12 +00:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the
|
2012-11-03 23:05:09 +00:00
|
|
|
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
2002-09-26 12:20:12 +00:00
|
|
|
*/
|
|
|
|
|
2002-11-09 18:31:27 +00:00
|
|
|
#ifndef __GST_VIDEO_H__
|
|
|
|
#define __GST_VIDEO_H__
|
2002-09-26 12:20:12 +00:00
|
|
|
|
|
|
|
#include <gst/gst.h>
|
2012-08-20 08:50:59 +00:00
|
|
|
|
2018-03-13 11:48:31 +00:00
|
|
|
#include <gst/video/video-prelude.h>
|
|
|
|
|
2012-08-20 08:50:59 +00:00
|
|
|
typedef struct _GstVideoAlignment GstVideoAlignment;
|
|
|
|
|
2012-06-05 10:47:22 +00:00
|
|
|
#include <gst/video/video-format.h>
|
|
|
|
#include <gst/video/video-color.h>
|
2014-12-02 10:32:28 +00:00
|
|
|
#include <gst/video/video-dither.h>
|
2012-06-05 10:47:22 +00:00
|
|
|
#include <gst/video/video-info.h>
|
|
|
|
#include <gst/video/video-frame.h>
|
2009-01-06 10:16:16 +00:00
|
|
|
#include <gst/video/video-enumtypes.h>
|
2014-09-24 14:19:30 +00:00
|
|
|
#include <gst/video/video-converter.h>
|
2014-10-24 13:25:33 +00:00
|
|
|
#include <gst/video/video-scaler.h>
|
2015-06-11 01:12:39 +00:00
|
|
|
#include <gst/video/video-multiview.h>
|
2008-12-31 13:01:30 +00:00
|
|
|
|
2012-06-05 10:47:22 +00:00
|
|
|
G_BEGIN_DECLS
|
2011-01-03 10:41:56 +00:00
|
|
|
|
2012-08-20 08:50:59 +00:00
|
|
|
/**
|
|
|
|
* GstVideoAlignment:
|
|
|
|
* @padding_left: extra pixels on the left side
|
|
|
|
* @padding_right: extra pixels on the right side
|
|
|
|
* @padding_top: extra pixels on the top
|
|
|
|
* @padding_bottom: extra pixels on the bottom
|
|
|
|
* @stride_align: array with extra alignment requirements for the strides
|
|
|
|
*
|
2017-04-19 09:47:30 +00:00
|
|
|
* Extra alignment parameters for the memory of video buffers. This
|
2012-08-20 08:50:59 +00:00
|
|
|
* structure is usually used to configure the bufferpool if it supports the
|
|
|
|
* #GST_BUFFER_POOL_OPTION_VIDEO_ALIGNMENT.
|
|
|
|
*/
|
|
|
|
struct _GstVideoAlignment
|
|
|
|
{
|
|
|
|
guint padding_top;
|
|
|
|
guint padding_bottom;
|
|
|
|
guint padding_left;
|
|
|
|
guint padding_right;
|
|
|
|
guint stride_align[GST_VIDEO_MAX_PLANES];
|
|
|
|
};
|
|
|
|
|
2016-07-26 17:14:40 +00:00
|
|
|
/**
|
|
|
|
* GstVideoOrientationMethod:
|
|
|
|
* @GST_VIDEO_ORIENTATION_IDENTITY: Identity (no rotation)
|
|
|
|
* @GST_VIDEO_ORIENTATION_90R: Rotate clockwise 90 degrees
|
|
|
|
* @GST_VIDEO_ORIENTATION_180: Rotate 180 degrees
|
|
|
|
* @GST_VIDEO_ORIENTATION_90L: Rotate counter-clockwise 90 degrees
|
|
|
|
* @GST_VIDEO_ORIENTATION_HORIZ: Flip horizontally
|
|
|
|
* @GST_VIDEO_ORIENTATION_VERT: Flip vertically
|
|
|
|
* @GST_VIDEO_ORIENTATION_UL_LR: Flip across upper left/lower right diagonal
|
|
|
|
* @GST_VIDEO_ORIENTATION_UR_LL: Flip across upper right/lower left diagonal
|
|
|
|
* @GST_VIDEO_ORIENTATION_AUTO: Select flip method based on image-orientation tag
|
|
|
|
* @GST_VIDEO_ORIENTATION_CUSTOM: Current status depends on plugin internal setup
|
|
|
|
*
|
|
|
|
* The different video orientation methods.
|
|
|
|
*
|
|
|
|
* Since: 1.10
|
|
|
|
*/
|
|
|
|
typedef enum {
|
|
|
|
GST_VIDEO_ORIENTATION_IDENTITY,
|
|
|
|
GST_VIDEO_ORIENTATION_90R,
|
|
|
|
GST_VIDEO_ORIENTATION_180,
|
|
|
|
GST_VIDEO_ORIENTATION_90L,
|
|
|
|
GST_VIDEO_ORIENTATION_HORIZ,
|
|
|
|
GST_VIDEO_ORIENTATION_VERT,
|
|
|
|
GST_VIDEO_ORIENTATION_UL_LR,
|
|
|
|
GST_VIDEO_ORIENTATION_UR_LL,
|
|
|
|
GST_VIDEO_ORIENTATION_AUTO,
|
|
|
|
GST_VIDEO_ORIENTATION_CUSTOM,
|
|
|
|
} GstVideoOrientationMethod;
|
|
|
|
|
2013-08-21 21:56:15 +00:00
|
|
|
/* metadata macros */
|
|
|
|
/**
|
|
|
|
* GST_META_TAG_VIDEO_STR:
|
2013-09-09 13:52:05 +00:00
|
|
|
*
|
2013-08-21 21:56:15 +00:00
|
|
|
* This metadata is relevant for video streams.
|
|
|
|
*
|
|
|
|
* Since: 1.2
|
|
|
|
*/
|
|
|
|
#define GST_META_TAG_VIDEO_STR "video"
|
|
|
|
/**
|
|
|
|
* GST_META_TAG_VIDEO_ORIENTATION_STR:
|
2013-09-09 13:52:05 +00:00
|
|
|
*
|
2013-08-21 21:56:15 +00:00
|
|
|
* This metadata stays relevant as long as video orientation is unchanged.
|
|
|
|
*
|
|
|
|
* Since: 1.2
|
|
|
|
*/
|
|
|
|
#define GST_META_TAG_VIDEO_ORIENTATION_STR "orientation"
|
|
|
|
/**
|
|
|
|
* GST_META_TAG_VIDEO_SIZE_STR:
|
2013-09-09 13:52:05 +00:00
|
|
|
*
|
2013-08-21 21:56:15 +00:00
|
|
|
* This metadata stays relevant as long as video size is unchanged.
|
|
|
|
*
|
|
|
|
* Since: 1.2
|
|
|
|
*/
|
|
|
|
#define GST_META_TAG_VIDEO_SIZE_STR "size"
|
|
|
|
/**
|
|
|
|
* GST_META_TAG_VIDEO_COLORSPACE_STR:
|
2013-09-09 13:52:05 +00:00
|
|
|
*
|
2013-08-21 21:56:15 +00:00
|
|
|
* This metadata stays relevant as long as video colorspace is unchanged.
|
|
|
|
*
|
|
|
|
* Since: 1.2
|
|
|
|
*/
|
|
|
|
#define GST_META_TAG_VIDEO_COLORSPACE_STR "colorspace"
|
|
|
|
|
2018-03-13 11:48:31 +00:00
|
|
|
GST_VIDEO_API
|
2012-08-20 08:50:59 +00:00
|
|
|
void gst_video_alignment_reset (GstVideoAlignment *align);
|
|
|
|
|
|
|
|
|
2011-08-18 17:15:03 +00:00
|
|
|
/* some helper functions */
|
2017-05-16 00:09:38 +00:00
|
|
|
|
2018-03-13 11:48:31 +00:00
|
|
|
GST_VIDEO_API
|
2011-05-27 22:25:00 +00:00
|
|
|
gboolean gst_video_calculate_display_ratio (guint * dar_n,
|
|
|
|
guint * dar_d,
|
|
|
|
guint video_width,
|
|
|
|
guint video_height,
|
|
|
|
guint video_par_n,
|
|
|
|
guint video_par_d,
|
|
|
|
guint display_par_n,
|
|
|
|
guint display_par_d);
|
|
|
|
|
2018-03-13 11:48:31 +00:00
|
|
|
GST_VIDEO_API
|
2014-08-14 13:53:16 +00:00
|
|
|
gboolean gst_video_guess_framerate (GstClockTime duration,
|
|
|
|
gint * dest_n, gint * dest_d);
|
|
|
|
|
2011-12-01 15:48:49 +00:00
|
|
|
/* convert/encode video sample from one format to another */
|
2011-05-27 22:25:00 +00:00
|
|
|
|
2011-12-01 15:48:49 +00:00
|
|
|
typedef void (*GstVideoConvertSampleCallback) (GstSample * sample, GError *error, gpointer user_data);
|
2011-05-27 22:25:00 +00:00
|
|
|
|
2018-03-13 11:48:31 +00:00
|
|
|
GST_VIDEO_API
|
2011-12-01 15:48:49 +00:00
|
|
|
void gst_video_convert_sample_async (GstSample * sample,
|
2011-05-27 22:25:00 +00:00
|
|
|
const GstCaps * to_caps,
|
|
|
|
GstClockTime timeout,
|
2011-12-01 15:48:49 +00:00
|
|
|
GstVideoConvertSampleCallback callback,
|
2011-05-27 22:25:00 +00:00
|
|
|
gpointer user_data,
|
|
|
|
GDestroyNotify destroy_notify);
|
|
|
|
|
2018-03-13 11:48:31 +00:00
|
|
|
GST_VIDEO_API
|
2011-12-01 15:48:49 +00:00
|
|
|
GstSample * gst_video_convert_sample (GstSample * sample,
|
2011-05-27 22:25:00 +00:00
|
|
|
const GstCaps * to_caps,
|
|
|
|
GstClockTime timeout,
|
|
|
|
GError ** error);
|
2012-12-12 17:13:10 +00:00
|
|
|
|
2005-02-09 22:31:05 +00:00
|
|
|
G_END_DECLS
|
|
|
|
|
2012-12-12 17:13:10 +00:00
|
|
|
#include <gst/video/colorbalancechannel.h>
|
|
|
|
#include <gst/video/colorbalance.h>
|
2018-12-26 17:02:42 +00:00
|
|
|
#include <gst/video/gstvideoaggregator.h>
|
2012-12-12 17:13:10 +00:00
|
|
|
#include <gst/video/gstvideodecoder.h>
|
|
|
|
#include <gst/video/gstvideoencoder.h>
|
|
|
|
#include <gst/video/gstvideofilter.h>
|
|
|
|
#include <gst/video/gstvideometa.h>
|
|
|
|
#include <gst/video/gstvideopool.h>
|
|
|
|
#include <gst/video/gstvideosink.h>
|
|
|
|
#include <gst/video/gstvideoutils.h>
|
|
|
|
#include <gst/video/navigation.h>
|
|
|
|
#include <gst/video/video-blend.h>
|
|
|
|
#include <gst/video/video-event.h>
|
2016-07-26 17:14:40 +00:00
|
|
|
#include <gst/video/videodirection.h>
|
2012-12-12 17:13:10 +00:00
|
|
|
#include <gst/video/videoorientation.h>
|
|
|
|
#include <gst/video/video-overlay-composition.h>
|
|
|
|
#include <gst/video/videooverlay.h>
|
2016-05-14 09:20:38 +00:00
|
|
|
#include <gst/video/gstvideotimecode.h>
|
2018-03-21 08:25:43 +00:00
|
|
|
#include <gst/video/gstvideoaffinetransformationmeta.h>
|
2018-02-15 12:59:56 +00:00
|
|
|
#include <gst/video/video-anc.h>
|
2019-02-18 04:20:33 +00:00
|
|
|
#include <gst/video/video-hdr.h>
|
2012-12-12 17:13:10 +00:00
|
|
|
|
2002-11-09 18:31:27 +00:00
|
|
|
#endif /* __GST_VIDEO_H__ */
|