2011-12-13 15:53:15 +00:00
|
|
|
/*
|
|
|
|
* gstvaapisurface_priv.h - VA surface abstraction (private data)
|
|
|
|
*
|
2013-01-29 13:03:27 +00:00
|
|
|
* Copyright (C) 2011-2012 Intel Corporation
|
2011-12-13 15:53:15 +00:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2.1
|
|
|
|
* 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
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free
|
|
|
|
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301 USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef GST_VAAPI_SURFACE_PRIV_H
|
|
|
|
#define GST_VAAPI_SURFACE_PRIV_H
|
|
|
|
|
2012-01-18 09:42:38 +00:00
|
|
|
#include <gst/vaapi/gstvaapicontext.h>
|
2011-12-13 15:53:15 +00:00
|
|
|
#include <gst/vaapi/gstvaapisurface.h>
|
2013-07-08 09:43:27 +00:00
|
|
|
#include "gstvaapiobject_priv.h"
|
|
|
|
|
|
|
|
typedef struct _GstVaapiSurfaceClass GstVaapiSurfaceClass;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GstVaapiSurface:
|
|
|
|
*
|
|
|
|
* A VA surface wrapper.
|
|
|
|
*/
|
|
|
|
struct _GstVaapiSurface {
|
|
|
|
/*< private >*/
|
|
|
|
GstVaapiObject parent_instance;
|
|
|
|
|
2013-07-09 17:08:37 +00:00
|
|
|
GstVideoFormat format;
|
2013-07-08 09:43:27 +00:00
|
|
|
guint width;
|
|
|
|
guint height;
|
|
|
|
GstVaapiChromaType chroma_type;
|
|
|
|
GPtrArray *subpictures;
|
|
|
|
GstVaapiContext *parent_context;
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GstVaapiSurfaceClass:
|
|
|
|
*
|
|
|
|
* A VA surface wrapper class.
|
|
|
|
*/
|
|
|
|
struct _GstVaapiSurfaceClass {
|
|
|
|
/*< private >*/
|
|
|
|
GstVaapiObjectClass parent_class;
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GST_VAAPI_SURFACE_SURFACE_CHROMA_TYPE:
|
|
|
|
* @surface: a #GstVaapiSurface
|
|
|
|
*
|
|
|
|
* Macro that evaluates to the @surface chroma type.
|
|
|
|
*
|
|
|
|
* This is an internal macro that does not do any run-time type check.
|
|
|
|
*/
|
|
|
|
#undef GST_VAAPI_SURFACE_CHROMA_TYPE
|
|
|
|
#define GST_VAAPI_SURFACE_CHROMA_TYPE(surface) \
|
|
|
|
GST_VAAPI_SURFACE(surface)->chroma_type
|
|
|
|
|
2013-07-09 17:08:37 +00:00
|
|
|
/**
|
|
|
|
* GST_VAAPI_SURFACE_SURFACE_FORMAT:
|
|
|
|
* @surface: a #GstVaapiSurface
|
|
|
|
*
|
|
|
|
* Macro that evaluates to the @surface format.
|
|
|
|
*
|
|
|
|
* This is an internal macro that does not do any run-time type check.
|
|
|
|
*/
|
|
|
|
#undef GST_VAAPI_SURFACE_FORMAT
|
|
|
|
#define GST_VAAPI_SURFACE_FORMAT(surface) \
|
|
|
|
GST_VAAPI_SURFACE(surface)->format
|
|
|
|
|
2013-07-08 09:43:27 +00:00
|
|
|
/**
|
|
|
|
* GST_VAAPI_SURFACE_SURFACE_WIDTH:
|
|
|
|
* @surface: a #GstVaapiSurface
|
|
|
|
*
|
|
|
|
* Macro that evaluates to the @surface width in pixels.
|
|
|
|
*
|
|
|
|
* This is an internal macro that does not do any run-time type check.
|
|
|
|
*/
|
|
|
|
#undef GST_VAAPI_SURFACE_WIDTH
|
|
|
|
#define GST_VAAPI_SURFACE_WIDTH(surface) \
|
|
|
|
GST_VAAPI_SURFACE(surface)->width
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GST_VAAPI_SURFACE_SURFACE_HEIGHT:
|
|
|
|
* @surface: a #GstVaapiSurface
|
|
|
|
*
|
|
|
|
* Macro that evaluates to the @surface height in pixels.
|
|
|
|
*
|
|
|
|
* This is an internal macro that does not do any run-time type check.
|
|
|
|
*/
|
|
|
|
#undef GST_VAAPI_SURFACE_HEIGHT
|
|
|
|
#define GST_VAAPI_SURFACE_HEIGHT(surface) \
|
|
|
|
GST_VAAPI_SURFACE(surface)->height
|
2011-12-13 15:53:15 +00:00
|
|
|
|
2012-07-19 15:55:00 +00:00
|
|
|
G_GNUC_INTERNAL
|
2011-12-13 15:53:15 +00:00
|
|
|
void
|
|
|
|
gst_vaapi_surface_set_parent_context(
|
|
|
|
GstVaapiSurface *surface,
|
|
|
|
GstVaapiContext *context
|
2012-07-19 15:55:00 +00:00
|
|
|
);
|
2011-12-13 15:53:15 +00:00
|
|
|
|
2012-07-19 15:55:00 +00:00
|
|
|
G_GNUC_INTERNAL
|
2012-01-18 09:42:38 +00:00
|
|
|
GstVaapiContext *
|
2012-07-19 15:55:00 +00:00
|
|
|
gst_vaapi_surface_get_parent_context(GstVaapiSurface *surface);
|
2012-01-18 09:42:38 +00:00
|
|
|
|
2011-12-13 15:53:15 +00:00
|
|
|
#endif /* GST_VAAPI_SURFACE_PRIV_H */
|