2 * gstvaapiimage.h - VA image abstraction
4 * gstreamer-vaapi (C) 2010 Splitted-Desktop Systems
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program 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
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
21 #ifndef GST_VAAPI_IMAGE_H
22 #define GST_VAAPI_IMAGE_H
24 #include <gst/gstbuffer.h>
25 #include <gst/vaapi/gstvaapidisplay.h>
26 #include <gst/vaapi/gstvaapiimageformat.h>
30 #define GST_VAAPI_TYPE_IMAGE \
31 (gst_vaapi_image_get_type())
33 #define GST_VAAPI_IMAGE(obj) \
34 (G_TYPE_CHECK_INSTANCE_CAST((obj), \
35 GST_VAAPI_TYPE_IMAGE, \
38 #define GST_VAAPI_IMAGE_CLASS(klass) \
39 (G_TYPE_CHECK_CLASS_CAST((klass), \
40 GST_VAAPI_TYPE_IMAGE, \
43 #define GST_VAAPI_IS_IMAGE(obj) \
44 (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_VAAPI_TYPE_IMAGE))
46 #define GST_VAAPI_IS_IMAGE_CLASS(klass) \
47 (G_TYPE_CHECK_CLASS_TYPE((klass), GST_VAAPI_TYPE_IMAGE))
49 #define GST_VAAPI_IMAGE_GET_CLASS(obj) \
50 (G_TYPE_INSTANCE_GET_CLASS((obj), \
51 GST_VAAPI_TYPE_IMAGE, \
54 #define GST_VAAPI_IMAGE_FORMAT(img) gst_vaapi_image_get_format(img)
55 #define GST_VAAPI_IMAGE_WIDTH(img) gst_vaapi_image_get_width(img)
56 #define GST_VAAPI_IMAGE_HEIGHT(img) gst_vaapi_image_get_height(img)
58 typedef struct _GstVaapiImage GstVaapiImage;
59 typedef struct _GstVaapiImagePrivate GstVaapiImagePrivate;
60 typedef struct _GstVaapiImageClass GstVaapiImageClass;
62 struct _GstVaapiImage {
64 GObject parent_instance;
66 GstVaapiImagePrivate *priv;
69 struct _GstVaapiImageClass {
71 GObjectClass parent_class;
75 gst_vaapi_image_get_type(void);
79 GstVaapiDisplay *display,
80 GstVaapiImageFormat format,
86 gst_vaapi_image_get_id(GstVaapiImage *image);
89 gst_vaapi_image_get_image(GstVaapiImage *image, VAImage *va_image);
92 gst_vaapi_image_get_display(GstVaapiImage *image);
95 gst_vaapi_image_get_format(GstVaapiImage *image);
98 gst_vaapi_image_get_width(GstVaapiImage *image);
101 gst_vaapi_image_get_height(GstVaapiImage *image);
104 gst_vaapi_image_get_size(GstVaapiImage *image, guint *pwidth, guint *pheight);
107 gst_vaapi_image_is_linear(GstVaapiImage *image);
110 gst_vaapi_image_is_mapped(GstVaapiImage *image);
113 gst_vaapi_image_map(GstVaapiImage *image);
116 gst_vaapi_image_unmap(GstVaapiImage *image);
119 gst_vaapi_image_get_plane_count(GstVaapiImage *image);
122 gst_vaapi_image_get_plane(GstVaapiImage *image, guint plane);
125 gst_vaapi_image_get_pitch(GstVaapiImage *image, guint plane);
128 gst_vaapi_image_get_data_size(GstVaapiImage *image);
131 gst_vaapi_image_update_from_buffer(GstVaapiImage *image, GstBuffer *buffer);
135 #endif /* GST_VAAPI_IMAGE_H */