2 * gstvaapisink.h - VA-API video sink
4 * Copyright (C) 2010-2011 Splitted-Desktop Systems
5 * Author: Gwenole Beauchesne <gwenole.beauchesne@splitted-desktop.com>
6 * Copyright (C) 2011-2014 Intel Corporation
7 * Author: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public License
11 * as published by the Free Software Foundation; either version 2.1
12 * of the License, or (at your option) any later version.
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free
21 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22 * Boston, MA 02110-1301 USA
25 #ifndef GST_VAAPISINK_H
26 #define GST_VAAPISINK_H
28 #include "gstvaapipluginbase.h"
29 #include <gst/vaapi/gstvaapiwindow.h>
31 #include <gst/vaapi/gstvaapitexture.h>
33 #include "gstvaapipluginutil.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 GstVaapiPluginBase parent_instance;
72 GstVaapiWindow *window;
75 GstVaapiTexture *texture;
76 #if GST_CHECK_VERSION(1,0,0)
77 GstBufferPool *video_buffer_pool;
79 guint video_buffer_size;
80 GstBuffer *video_buffer;
85 GstVideoInfo video_info;
86 GstVaapiRectangle display_rect;
87 GstVaapiRotation rotation;
88 GstVaapiRotation rotation_req;
90 guint foreign_window : 1;
92 guint synchronous : 1;
94 guint use_reflection : 1;
95 guint use_overlay : 1;
96 guint use_rotation : 1;
97 guint keep_aspect : 1;
100 struct _GstVaapiSinkClass {
102 GstVaapiPluginBaseClass parent_class;
106 gst_vaapisink_get_type(void) G_GNUC_CONST;
110 #endif /* GST_VAAPISINK_H */