2 * gstvaapisurface_userptr.h - VA surface abstraction for userptr
4 * Copyright (C) 2011 Intel Corporation
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public License
8 * as published by the Free Software Foundation; either version 2.1
9 * of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free
18 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301 USA
22 #ifndef GST_VAAPI_SURFACE_USERPTR_H
23 #define GST_VAAPI_SURFACE_USERPTR_H
25 #include <gst/vaapi/gstvaapiobject.h>
26 #include <gst/vaapi/gstvaapisurface.h>
27 #include <gst/vaapi/gstvaapiimageformat.h>
31 #define GST_VAAPI_TYPE_SURFACE_USERPTR \
32 (gst_vaapi_surface_userptr_get_type())
34 #define GST_VAAPI_SURFACE_USERPTR(obj) \
35 (G_TYPE_CHECK_INSTANCE_CAST((obj), \
36 GST_VAAPI_TYPE_SURFACE_USERPTR, \
37 GstVaapiSurfaceUserPtr))
39 #define GST_VAAPI_SURFACE_USERPTR_CLASS(klass) \
40 (G_TYPE_CHECK_CLASS_CAST((klass), \
41 GST_VAAPI_TYPE_SURFACE_USERPTR, \
42 GstVaapiSurfaceUserPtrClass))
44 #define GST_VAAPI_IS_SURFACE_USERPTR(obj) \
45 (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_VAAPI_TYPE_SURFACE_USERPTR))
47 #define GST_VAAPI_IS_SURFACE_USERPTR_CLASS(klass) \
48 (G_TYPE_CHECK_CLASS_TYPE((klass), GST_VAAPI_TYPE_SURFACE_USERPTR))
50 #define GST_VAAPI_SURFACE_USERPTR_GET_CLASS(obj) \
51 (G_TYPE_INSTANCE_GET_CLASS((obj), \
52 GST_VAAPI_TYPE_SURFACE_USERPTR, \
53 GstVaapiSurfaceUserPtrClass))
55 typedef struct _GstVaapiSurfaceUserPtr GstVaapiSurfaceUserPtr;
56 typedef struct _GstVaapiSurfaceUserPtrPrivate GstVaapiSurfaceUserPtrPrivate;
57 typedef struct _GstVaapiSurfaceUserPtrClass GstVaapiSurfaceUserPtrClass;
60 * GstVaapiSurfaceUserPtr:
62 * A VA surface userptr wrapper.
64 struct _GstVaapiSurfaceUserPtr {
66 GstVaapiSurface parent_instance;
68 GstVaapiSurfaceUserPtrPrivate *priv;
72 * GstVaapiSurfaceUserPtrClass:
74 * A VA surface userptr wrapper class.
76 struct _GstVaapiSurfaceUserPtrClass {
78 GstVaapiSurfaceClass parent_class;
82 gst_vaapi_surface_userptr_get_type(void) G_GNUC_CONST;
84 GstVaapiSurfaceUserPtr *
85 gst_vaapi_surface_userptr_new(
86 GstVaapiDisplay *display,
87 GstVaapiChromaType chroma_type,
88 GstVaapiImageFormat format,
94 gst_vaapi_surface_userptr_get_format(GstVaapiSurfaceUserPtr *surface);
98 #endif /* GST_VAAPI_SURFACE_USERPTR_H */