|
Packit |
971217 |
/* GStreamer
|
|
Packit |
971217 |
* Copyright (C) Collabora Ltd.
|
|
Packit |
971217 |
* Author: Matthieu Bouron <matthieu.bouron@collabora.com>
|
|
Packit |
971217 |
* Copyright (C) 2015, Matthew Waters <matthew@centricular.com>
|
|
Packit |
971217 |
*
|
|
Packit |
971217 |
* This library is free software; you can redistribute it and/or
|
|
Packit |
971217 |
* modify it under the terms of the GNU Library General Public
|
|
Packit |
971217 |
* License as published by the Free Software Foundation; either
|
|
Packit |
971217 |
* version 2 of the License, or (at your option) any later version.
|
|
Packit |
971217 |
*
|
|
Packit |
971217 |
* This library is distributed in the hope that it will be useful,
|
|
Packit |
971217 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
971217 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit |
971217 |
* Library General Public License for more details.
|
|
Packit |
971217 |
*
|
|
Packit |
971217 |
* You should have received a copy of the GNU Library General Public
|
|
Packit |
971217 |
* License along with this library; if not, write to the
|
|
Packit |
971217 |
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
Packit |
971217 |
* Boston, MA 02110-1301, USA.
|
|
Packit |
971217 |
*/
|
|
Packit |
971217 |
|
|
Packit |
971217 |
#ifndef __GST_VIDEO_AFFINE_TRANSFORMATION_META_H__
|
|
Packit |
971217 |
#define __GST_VIDEO_AFFINE_TRANSFORMATION_META_H__
|
|
Packit |
971217 |
|
|
Packit |
971217 |
#include <gst/gst.h>
|
|
Packit |
971217 |
#include <gst/video/video.h>
|
|
Packit |
971217 |
|
|
Packit |
971217 |
G_BEGIN_DECLS
|
|
Packit |
971217 |
|
|
Packit |
971217 |
#define GST_VIDEO_AFFINE_TRANSFORMATION_META_API_TYPE (gst_video_affine_transformation_meta_api_get_type())
|
|
Packit |
971217 |
#define GST_VIDEO_AFFINE_TRANSFORMATION_META_INFO (gst_video_affine_transformation_meta_get_info())
|
|
Packit |
971217 |
|
|
Packit |
971217 |
typedef struct _GstVideoAffineTransformationMeta GstVideoAffineTransformationMeta;
|
|
Packit |
971217 |
typedef gboolean (*GstVideoAffineTransformationGetMatrix) (GstVideoAffineTransformationMeta * meta, gfloat * matrix);
|
|
Packit |
971217 |
|
|
Packit |
971217 |
#define GST_CAPS_FEATURE_META_GST_VIDEO_AFFINE_TRANSFORMATION_META "meta:GstVideoAffineTransformation"
|
|
Packit |
971217 |
#define GST_BUFFER_POOL_OPTION_VIDEO_AFFINE_TRANSFORMATION_META "GstBufferPoolOptionVideoAffineTransformation"
|
|
Packit |
971217 |
|
|
Packit |
971217 |
/**
|
|
Packit |
971217 |
* GstVideoAffineTransformationMeta:
|
|
Packit |
971217 |
* @meta: parent #GstMeta
|
|
Packit |
971217 |
* @matrix: the column-major 4x4 transformation matrix
|
|
Packit |
971217 |
*
|
|
Packit |
971217 |
* Extra buffer metadata for performing an affine transformation using a 4x4
|
|
Packit |
971217 |
* matrix. The transformation matrix can be composed with
|
|
Packit |
971217 |
* gst_video_affine_transformation_meta_apply_matrix().
|
|
Packit |
971217 |
*
|
|
Packit |
971217 |
* The vertices operated on are all in the range 0 to 1, not in
|
|
Packit |
971217 |
* Normalized Device Coordinates (-1 to +1). Transforming points in this space
|
|
Packit |
971217 |
* are assumed to have an origin at (0.5, 0.5, 0.5) in a left-handed coordinate
|
|
Packit |
971217 |
* system with the x-axis moving horizontally (positive values to the right),
|
|
Packit |
971217 |
* the y-axis moving vertically (positive values up the screen) and the z-axis
|
|
Packit |
971217 |
* perpendicular to the screen (positive values into the screen).
|
|
Packit |
971217 |
*
|
|
Packit |
971217 |
* Since: 1.8
|
|
Packit |
971217 |
*/
|
|
Packit |
971217 |
struct _GstVideoAffineTransformationMeta
|
|
Packit |
971217 |
{
|
|
Packit |
971217 |
GstMeta meta;
|
|
Packit |
971217 |
|
|
Packit |
971217 |
gfloat matrix[16];
|
|
Packit |
971217 |
};
|
|
Packit |
971217 |
|
|
Packit |
971217 |
GST_VIDEO_API
|
|
Packit |
971217 |
GType gst_video_affine_transformation_meta_api_get_type (void);
|
|
Packit |
971217 |
|
|
Packit |
971217 |
GST_VIDEO_API
|
|
Packit |
971217 |
const GstMetaInfo *gst_video_affine_transformation_meta_get_info (void);
|
|
Packit |
971217 |
|
|
Packit |
971217 |
#define gst_buffer_get_video_affine_transformation_meta(b) \
|
|
Packit |
971217 |
((GstVideoAffineTransformationMeta *)gst_buffer_get_meta((b),GST_VIDEO_AFFINE_TRANSFORMATION_META_API_TYPE))
|
|
Packit |
971217 |
GST_VIDEO_API
|
|
Packit |
971217 |
GstVideoAffineTransformationMeta *gst_buffer_add_video_affine_transformation_meta (GstBuffer * buffer);
|
|
Packit |
971217 |
|
|
Packit |
971217 |
GST_VIDEO_API
|
|
Packit |
971217 |
void gst_video_affine_transformation_meta_apply_matrix (GstVideoAffineTransformationMeta * meta,
|
|
Packit |
971217 |
const gfloat matrix[16]);
|
|
Packit |
971217 |
|
|
Packit |
971217 |
G_END_DECLS
|
|
Packit |
971217 |
|
|
Packit |
971217 |
#endif /* __GST_VIDEO_AFFINE_TRANSFORMATION_META_H__ */
|