2010-04-23 16:00:50 +00:00
|
|
|
/*
|
|
|
|
* gstvaapisurfaceproxy.h - VA surface proxy
|
|
|
|
*
|
2012-01-16 09:41:10 +00:00
|
|
|
* Copyright (C) 2010-2011 Splitted-Desktop Systems
|
2013-11-22 04:57:18 +00:00
|
|
|
* Author: Gwenole Beauchesne <gwenole.beauchesne@splitted-desktop.com>
|
2013-11-22 05:37:12 +00:00
|
|
|
* Copyright (C) 2011-2013 Intel Corporation
|
2013-11-22 04:57:18 +00:00
|
|
|
* Author: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
|
2010-04-23 16:00:50 +00:00
|
|
|
*
|
2010-05-03 07:07:27 +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.
|
2010-04-23 16:00:50 +00:00
|
|
|
*
|
2010-05-03 07:07:27 +00:00
|
|
|
* This library is distributed in the hope that it will be useful,
|
2010-04-23 16:00:50 +00:00
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2010-05-03 07:07:27 +00:00
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
2010-04-23 16:00:50 +00:00
|
|
|
*
|
2010-05-03 07:07:27 +00:00
|
|
|
* 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
|
2010-04-23 16:00:50 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef GST_VAAPI_SURFACE_PROXY_H
|
|
|
|
#define GST_VAAPI_SURFACE_PROXY_H
|
|
|
|
|
|
|
|
#include <gst/vaapi/gstvaapisurface.h>
|
2013-04-03 09:37:44 +00:00
|
|
|
#include <gst/vaapi/gstvaapisurfacepool.h>
|
2010-04-23 16:00:50 +00:00
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2013-04-16 16:35:48 +00:00
|
|
|
/**
|
|
|
|
* GstVaapiSurfaceProxyFlags:
|
|
|
|
* @GST_VAAPI_SURFACE_PROXY_FLAG_INTERLACED: interlaced frame
|
|
|
|
* @GST_VAAPI_SURFACE_PROXY_FLAG_TFF: top-field-first
|
2014-11-13 14:13:24 +00:00
|
|
|
* @GST_VAAPI_SURFACE_PROXY_FLAG_RFF: repeat-first-field
|
2013-04-16 16:35:48 +00:00
|
|
|
* @GST_VAAPI_SURFACE_PROXY_FLAG_ONEFIELD: only one field is available
|
2014-06-30 17:01:35 +00:00
|
|
|
* @GST_VAAPI_SURFACE_PROXY_FLAG_FFB: first frame in bundle, e.g. the first
|
|
|
|
* view component of a MultiView Coded (MVC) frame
|
2013-04-16 16:35:48 +00:00
|
|
|
* @GST_VAAPI_SURFACE_PROXY_FLAG_LAST: first flag that can be used by subclasses
|
|
|
|
*
|
|
|
|
* Flags for #GstVaapiDecoderFrame.
|
|
|
|
*/
|
|
|
|
typedef enum {
|
|
|
|
GST_VAAPI_SURFACE_PROXY_FLAG_INTERLACED = (1 << 0),
|
|
|
|
GST_VAAPI_SURFACE_PROXY_FLAG_TFF = (1 << 1),
|
|
|
|
GST_VAAPI_SURFACE_PROXY_FLAG_RFF = (1 << 2),
|
|
|
|
GST_VAAPI_SURFACE_PROXY_FLAG_ONEFIELD = (1 << 3),
|
2014-06-30 17:01:35 +00:00
|
|
|
GST_VAAPI_SURFACE_PROXY_FLAG_FFB = (1 << 4),
|
2013-04-16 16:35:48 +00:00
|
|
|
GST_VAAPI_SURFACE_PROXY_FLAG_LAST = (1 << 8)
|
|
|
|
} GstVaapiSurfaceProxyFlags;
|
|
|
|
|
2010-04-29 12:52:27 +00:00
|
|
|
/**
|
|
|
|
* GST_VAAPI_SURFACE_PROXY_SURFACE:
|
2013-04-16 16:35:48 +00:00
|
|
|
* @proxy: a #GstVaapiSurfaceProxy
|
|
|
|
*
|
|
|
|
* Macro that evaluates to the #GstVaapiSurface of @proxy.
|
|
|
|
*/
|
|
|
|
#define GST_VAAPI_SURFACE_PROXY_SURFACE(proxy) \
|
|
|
|
gst_vaapi_surface_proxy_get_surface(proxy)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GST_VAAPI_SURFACE_PROXY_SURFACE_ID:
|
|
|
|
* @proxy: a #GstVaapiSurfaceProxy
|
2010-04-29 12:52:27 +00:00
|
|
|
*
|
2013-04-16 16:35:48 +00:00
|
|
|
* Macro that evaluates to the VA surface ID of the underlying @proxy
|
|
|
|
* surface.
|
2010-04-29 12:52:27 +00:00
|
|
|
*/
|
2013-04-16 16:35:48 +00:00
|
|
|
#define GST_VAAPI_SURFACE_PROXY_SURFACE_ID(proxy) \
|
|
|
|
gst_vaapi_surface_proxy_get_surface_id(proxy)
|
|
|
|
|
2014-06-30 17:01:35 +00:00
|
|
|
/**
|
|
|
|
* GST_VAAPI_SURFACE_PROXY_VIEW_ID:
|
|
|
|
* @proxy: a #GstVaapiSurfaceProxy
|
|
|
|
*
|
|
|
|
* Macro that evaluates to the decoded view ID of the underlying @proxy
|
|
|
|
* surface.
|
|
|
|
*/
|
|
|
|
#define GST_VAAPI_SURFACE_PROXY_VIEW_ID(proxy) \
|
|
|
|
gst_vaapi_surface_proxy_get_view_id(proxy)
|
|
|
|
|
2013-04-16 16:35:48 +00:00
|
|
|
/**
|
|
|
|
* GST_VAAPI_SURFACE_PROXY_TIMESTAMP:
|
|
|
|
* @proxy: a #GstVaapiSurfaceProxy
|
|
|
|
*
|
|
|
|
* Macro that evaluates to the presentation timestamp of the
|
|
|
|
* underlying @proxy surface.
|
|
|
|
*/
|
|
|
|
#define GST_VAAPI_SURFACE_PROXY_TIMESTAMP(proxy) \
|
|
|
|
gst_vaapi_surface_proxy_get_timestamp(proxy)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GST_VAAPI_SURFACE_PROXY_DURATION:
|
|
|
|
* @proxy: a #GstVaapiSurfaceProxy
|
|
|
|
*
|
|
|
|
* Macro that evaluates to the presentation duration of the
|
|
|
|
* underlying @proxy surface.
|
|
|
|
*/
|
|
|
|
#define GST_VAAPI_SURFACE_PROXY_DURATION(proxy) \
|
|
|
|
gst_vaapi_surface_proxy_get_duration(proxy)
|
2010-04-29 12:52:27 +00:00
|
|
|
|
2013-04-03 09:37:44 +00:00
|
|
|
GstVaapiSurfaceProxy *
|
|
|
|
gst_vaapi_surface_proxy_new_from_pool(GstVaapiSurfacePool *pool);
|
|
|
|
|
2013-11-28 16:25:05 +00:00
|
|
|
GstVaapiSurfaceProxy *
|
|
|
|
gst_vaapi_surface_proxy_copy(GstVaapiSurfaceProxy *proxy);
|
|
|
|
|
2012-12-03 12:46:28 +00:00
|
|
|
GstVaapiSurfaceProxy *
|
|
|
|
gst_vaapi_surface_proxy_ref(GstVaapiSurfaceProxy *proxy);
|
2010-04-23 16:00:50 +00:00
|
|
|
|
2012-12-03 12:46:28 +00:00
|
|
|
void
|
|
|
|
gst_vaapi_surface_proxy_unref(GstVaapiSurfaceProxy *proxy);
|
2010-04-23 16:00:50 +00:00
|
|
|
|
2012-12-03 12:46:28 +00:00
|
|
|
void
|
|
|
|
gst_vaapi_surface_proxy_replace(GstVaapiSurfaceProxy **old_proxy_ptr,
|
|
|
|
GstVaapiSurfaceProxy *new_proxy);
|
2010-04-23 16:00:50 +00:00
|
|
|
|
2013-04-16 16:35:48 +00:00
|
|
|
guint
|
|
|
|
gst_vaapi_surface_proxy_get_flags(GstVaapiSurfaceProxy *proxy);
|
|
|
|
|
2010-04-23 16:00:50 +00:00
|
|
|
GstVaapiSurface *
|
|
|
|
gst_vaapi_surface_proxy_get_surface(GstVaapiSurfaceProxy *proxy);
|
|
|
|
|
2012-01-05 15:59:57 +00:00
|
|
|
GstVaapiID
|
|
|
|
gst_vaapi_surface_proxy_get_surface_id(GstVaapiSurfaceProxy *proxy);
|
|
|
|
|
2014-06-30 17:01:35 +00:00
|
|
|
guintptr
|
|
|
|
gst_vaapi_surface_proxy_get_view_id(GstVaapiSurfaceProxy *proxy);
|
|
|
|
|
2013-04-16 16:35:48 +00:00
|
|
|
GstClockTime
|
|
|
|
gst_vaapi_surface_proxy_get_timestamp(GstVaapiSurfaceProxy *proxy);
|
|
|
|
|
|
|
|
GstClockTime
|
|
|
|
gst_vaapi_surface_proxy_get_duration(GstVaapiSurfaceProxy *proxy);
|
|
|
|
|
2013-04-16 11:48:00 +00:00
|
|
|
void
|
|
|
|
gst_vaapi_surface_proxy_set_destroy_notify(GstVaapiSurfaceProxy *proxy,
|
|
|
|
GDestroyNotify destroy_func, gpointer user_data);
|
|
|
|
|
2013-02-15 16:42:12 +00:00
|
|
|
const GstVaapiRectangle *
|
|
|
|
gst_vaapi_surface_proxy_get_crop_rect(GstVaapiSurfaceProxy *proxy);
|
|
|
|
|
|
|
|
void
|
|
|
|
gst_vaapi_surface_proxy_set_crop_rect(GstVaapiSurfaceProxy *proxy,
|
|
|
|
const GstVaapiRectangle *crop_rect);
|
|
|
|
|
2010-04-23 16:00:50 +00:00
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* GST_VAAPI_SURFACE_PROXY_H */
|