2 * gstvaapivideobuffer.h - Gstreamer/VA video buffer
4 * Copyright (C) 2010-2011 Splitted-Desktop Systems
5 * Copyright (C) 2011 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_VIDEO_BUFFER_H
24 #define GST_VAAPI_VIDEO_BUFFER_H
26 #include <gst/video/gstsurfacebuffer.h>
27 #include <gst/vaapi/gstvaapidisplay.h>
28 #include <gst/vaapi/gstvaapiimage.h>
29 #include <gst/vaapi/gstvaapisurface.h>
30 #include <gst/vaapi/gstvaapisurfaceproxy.h>
31 #include <gst/vaapi/gstvaapivideopool.h>
35 #define GST_VAAPI_TYPE_VIDEO_BUFFER \
36 (gst_vaapi_video_buffer_get_type())
38 #define GST_VAAPI_VIDEO_BUFFER(obj) \
39 (G_TYPE_CHECK_INSTANCE_CAST((obj), \
40 GST_VAAPI_TYPE_VIDEO_BUFFER, \
43 #define GST_VAAPI_VIDEO_BUFFER_CLASS(klass) \
44 (G_TYPE_CHECK_CLASS_CAST((klass), \
45 GST_VAAPI_TYPE_VIDEO_BUFFER, \
46 GstVaapiVideoBufferClass))
48 #define GST_VAAPI_IS_VIDEO_BUFFER(obj) \
49 (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_VAAPI_TYPE_VIDEO_BUFFER))
51 #define GST_VAAPI_IS_VIDEO_BUFFER_CLASS(klass) \
52 (G_TYPE_CHECK_CLASS_TYPE((klass), GST_VAAPI_TYPE_VIDEO_BUFFER))
54 #define GST_VAAPI_VIDEO_BUFFER_GET_CLASS(obj) \
55 (G_TYPE_INSTANCE_GET_CLASS((obj), \
56 GST_VAAPI_TYPE_VIDEO_BUFFER, \
57 GstVaapiVideoBufferClass))
59 typedef struct _GstVaapiVideoBuffer GstVaapiVideoBuffer;
60 typedef struct _GstVaapiVideoBufferPrivate GstVaapiVideoBufferPrivate;
61 typedef struct _GstVaapiVideoBufferClass GstVaapiVideoBufferClass;
64 * GstVaapiVideoBuffer:
66 * A #GstBuffer holding video objects (#GstVaapiSurface and #GstVaapiImage).
68 struct _GstVaapiVideoBuffer {
70 GstSurfaceBuffer parent_instance;
72 GstVaapiVideoBufferPrivate *priv;
76 * GstVaapiVideoBufferClass:
78 * A #GstBuffer holding video objects
80 struct _GstVaapiVideoBufferClass {
82 GstSurfaceBufferClass parent_class;
86 gst_vaapi_video_buffer_get_type(void) G_GNUC_CONST;
89 gst_vaapi_video_buffer_get_display(GstVaapiVideoBuffer *buffer);
92 gst_vaapi_video_buffer_get_image(GstVaapiVideoBuffer *buffer);
95 gst_vaapi_video_buffer_set_image(
96 GstVaapiVideoBuffer *buffer,
101 gst_vaapi_video_buffer_set_image_from_pool(
102 GstVaapiVideoBuffer *buffer,
103 GstVaapiVideoPool *pool
107 gst_vaapi_video_buffer_get_surface(GstVaapiVideoBuffer *buffer);
110 gst_vaapi_video_buffer_set_surface(
111 GstVaapiVideoBuffer *buffer,
112 GstVaapiSurface *surface
116 gst_vaapi_video_buffer_set_surface_from_pool(
117 GstVaapiVideoBuffer *buffer,
118 GstVaapiVideoPool *pool
121 GstVaapiSurfaceProxy *
122 gst_vaapi_video_buffer_get_surface_proxy(GstVaapiVideoBuffer *buffer);
125 gst_vaapi_video_buffer_set_surface_proxy(
126 GstVaapiVideoBuffer *buffer,
127 GstVaapiSurfaceProxy *proxy
131 gst_vaapi_video_buffer_get_render_flags(GstVaapiVideoBuffer *buffer);
134 gst_vaapi_video_buffer_set_render_flags(GstVaapiVideoBuffer *buffer, guint flags);
137 gst_vaapi_video_buffer_ensure_pointer(GstVaapiVideoBuffer *buffer);
141 #endif /* GST_VAAPI_VIDEO_BUFFER_H */