2 * gstvaapisurfaceproxy.h - VA surface proxy
4 * Copyright (C) 2010-2011 Splitted-Desktop Systems
5 * Copyright (C) 2011-2012 Intel Corporation
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public License
9 * as published by the Free Software Foundation; either version 2.1
10 * of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free
19 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 * Boston, MA 02110-1301 USA
23 #ifndef GST_VAAPI_SURFACE_PROXY_H
24 #define GST_VAAPI_SURFACE_PROXY_H
26 #include <glib-object.h>
27 #include <gst/vaapi/gstvaapicontext.h>
28 #include <gst/vaapi/gstvaapisurface.h>
32 #define GST_VAAPI_TYPE_SURFACE_PROXY \
33 (gst_vaapi_surface_proxy_get_type())
35 #define GST_VAAPI_SURFACE_PROXY(obj) \
36 (G_TYPE_CHECK_INSTANCE_CAST((obj), \
37 GST_VAAPI_TYPE_SURFACE_PROXY, \
38 GstVaapiSurfaceProxy))
40 #define GST_VAAPI_SURFACE_PROXY_CLASS(klass) \
41 (G_TYPE_CHECK_CLASS_CAST((klass), \
42 GST_VAAPI_TYPE_SURFACE_PROXY, \
43 GstVaapiSurfaceProxyClass))
45 #define GST_VAAPI_IS_SURFACE_PROXY(obj) \
46 (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_VAAPI_TYPE_SURFACE_PROXY))
48 #define GST_VAAPI_IS_SURFACE_PROXY_CLASS(klass) \
49 (G_TYPE_CHECK_CLASS_TYPE((klass), GST_VAAPI_TYPE_SURFACE_PROXY))
51 #define GST_VAAPI_SURFACE_PROXY_GET_CLASS(obj) \
52 (G_TYPE_INSTANCE_GET_CLASS((obj), \
53 GST_VAAPI_TYPE_SURFACE_PROXY, \
54 GstVaapiSurfaceProxyClass))
57 * GST_VAAPI_SURFACE_PROXY_SURFACE:
58 * @surface: a #GstVaapiSurfaceProxy
60 * Macro that evaluates to the #GstVaapiSurface of @surface.
62 #define GST_VAAPI_SURFACE_PROXY_SURFACE(surface) \
63 gst_vaapi_surface_proxy_get_surface(surface)
66 * GST_VAAPI_SURFACE_PROXY_TIMESTAMP:
67 * @surface: a #GstVaapiSurfaceProxy
69 * Macro that evaluates to the @surface timestamp, or
70 * %GST_CLOCK_TIME_NONE if none was set.
72 #define GST_VAAPI_SURFACE_PROXY_TIMESTAMP(surface) \
73 gst_vaapi_surface_proxy_get_timestamp(surface)
76 * GST_VAAPI_SURFACE_PROXY_INTERLACED:
77 * @surface: a #GstVaapiSurfaceProxy
79 * Macro that evaluates to %TRUE if the @surface is interlaced.
81 #define GST_VAAPI_SURFACE_PROXY_INTERLACED(surface) \
82 gst_vaapi_surface_proxy_get_interlaced(surface)
85 * GST_VAAPI_SURFACE_PROXY_TFF:
86 * @surface: a #GstVaapiSurfaceProxy
88 * Macro that evaluates to the tff flag of the @surface
90 #define GST_VAAPI_SURFACE_PROXY_TFF(surface) \
91 gst_vaapi_surface_proxy_get_tff(surface)
93 typedef struct _GstVaapiSurfaceProxy GstVaapiSurfaceProxy;
94 typedef struct _GstVaapiSurfaceProxyPrivate GstVaapiSurfaceProxyPrivate;
95 typedef struct _GstVaapiSurfaceProxyClass GstVaapiSurfaceProxyClass;
98 * GstVaapiSurfaceProxy:
100 * A wrapper around a VA surface and context.
102 struct _GstVaapiSurfaceProxy {
104 GObject parent_instance;
106 GstVaapiSurfaceProxyPrivate *priv;
110 * GstVaapiSurfaceProxyClass:
112 * A wrapper around a VA surface and context.
114 struct _GstVaapiSurfaceProxyClass {
116 GObjectClass parent_class;
120 gst_vaapi_surface_proxy_get_type(void) G_GNUC_CONST;
122 GstVaapiSurfaceProxy *
123 gst_vaapi_surface_proxy_new(GstVaapiContext *context, GstVaapiSurface *surface);
126 gst_vaapi_surface_proxy_get_context(GstVaapiSurfaceProxy *proxy);
129 gst_vaapi_surface_proxy_set_context(
130 GstVaapiSurfaceProxy *proxy,
131 GstVaapiContext *context
135 gst_vaapi_surface_proxy_get_surface(GstVaapiSurfaceProxy *proxy);
138 gst_vaapi_surface_proxy_get_surface_id(GstVaapiSurfaceProxy *proxy);
141 gst_vaapi_surface_proxy_set_surface(
142 GstVaapiSurfaceProxy *proxy,
143 GstVaapiSurface *surface
147 gst_vaapi_surface_proxy_get_timestamp(GstVaapiSurfaceProxy *proxy);
150 gst_vaapi_surface_proxy_set_timestamp(
151 GstVaapiSurfaceProxy *proxy,
152 GstClockTime timestamp
156 gst_vaapi_surface_proxy_get_interlaced(GstVaapiSurfaceProxy *proxy);
159 gst_vaapi_surface_proxy_set_interlaced(GstVaapiSurfaceProxy *proxy, gboolean b);
162 gst_vaapi_surface_proxy_get_tff(GstVaapiSurfaceProxy *proxy);
165 gst_vaapi_surface_proxy_set_tff(GstVaapiSurfaceProxy *proxy, gboolean tff);
169 #endif /* GST_VAAPI_SURFACE_PROXY_H */