2 * gstvaapisink.h - VA-API video sink
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_VAAPISINK_H
24 #define GST_VAAPISINK_H
26 #include <gst/video/gstvideosink.h>
27 #include <gst/vaapi/gstvaapidisplay.h>
28 #include <gst/vaapi/gstvaapiwindow.h>
30 #include <gst/vaapi/gstvaapitexture.h>
32 #include "gstvaapipluginutil.h"
33 #include "gstvaapiuploader.h"
37 #define GST_TYPE_VAAPISINK \
38 (gst_vaapisink_get_type())
40 #define GST_VAAPISINK(obj) \
41 (G_TYPE_CHECK_INSTANCE_CAST((obj), \
45 #define GST_VAAPISINK_CLASS(klass) \
46 (G_TYPE_CHECK_CLASS_CAST((klass), \
50 #define GST_IS_VAAPISINK(obj) \
51 (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_VAAPISINK))
53 #define GST_IS_VAAPISINK_CLASS(klass) \
54 (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_VAAPISINK))
56 #define GST_VAAPISINK_GET_CLASS(obj) \
57 (G_TYPE_INSTANCE_GET_CLASS((obj), \
61 typedef struct _GstVaapiSink GstVaapiSink;
62 typedef struct _GstVaapiSinkClass GstVaapiSinkClass;
64 typedef struct _GstVaapiTexture GstVaapiTexture;
67 struct _GstVaapiSink {
69 GstVideoSink parent_instance;
71 GstVaapiUploader *uploader;
73 GstVaapiDisplay *display;
74 GstVaapiDisplayType display_type;
75 GstVaapiWindow *window;
78 GstVaapiTexture *texture;
79 GstBuffer *video_buffer;
84 GstVaapiRectangle display_rect;
85 GstVaapiRotation rotation;
86 GstVaapiRotation rotation_req;
87 guint foreign_window : 1;
89 guint synchronous : 1;
90 guint use_reflection : 1;
91 guint use_overlay : 1;
92 guint use_rotation : 1;
93 guint use_video_raw : 1;
96 struct _GstVaapiSinkClass {
98 GstVideoSinkClass parent_class;
102 gst_vaapisink_get_type(void) G_GNUC_CONST;
106 #endif /* GST_VAAPISINK_H */