Blame gst-libs/gst/video/gstvideoaffinetransformationmeta.h

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