legal: fix year for some copyright notices (2012).
[platform/upstream/gstreamer-vaapi.git] / gst / vaapi / gstvaapisink.h
1 /*
2  *  gstvaapisink.h - VA-API video sink
3  *
4  *  Copyright (C) 2010-2011 Splitted-Desktop Systems
5  *  Copyright (C) 2011-2012 Intel Corporation
6  *
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.
11  *
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.
16  *
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
21 */
22
23 #ifndef GST_VAAPISINK_H
24 #define GST_VAAPISINK_H
25
26 #include <gst/video/gstvideosink.h>
27 #include <gst/vaapi/gstvaapidisplay.h>
28 #include <gst/vaapi/gstvaapiwindow.h>
29 #if USE_GLX
30 #include <gst/vaapi/gstvaapitexture.h>
31 #endif
32 #include "gstvaapipluginutil.h"
33 #include "gstvaapiuploader.h"
34
35 G_BEGIN_DECLS
36
37 #define GST_TYPE_VAAPISINK \
38     (gst_vaapisink_get_type())
39
40 #define GST_VAAPISINK(obj)                              \
41     (G_TYPE_CHECK_INSTANCE_CAST((obj),                  \
42                                 GST_TYPE_VAAPISINK,     \
43                                 GstVaapiSink))
44
45 #define GST_VAAPISINK_CLASS(klass)                      \
46     (G_TYPE_CHECK_CLASS_CAST((klass),                   \
47                              GST_TYPE_VAAPISINK,        \
48                              GstVaapiSinkClass))
49
50 #define GST_IS_VAAPISINK(obj) \
51     (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_VAAPISINK))
52
53 #define GST_IS_VAAPISINK_CLASS(klass) \
54     (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_VAAPISINK))
55
56 #define GST_VAAPISINK_GET_CLASS(obj)                    \
57     (G_TYPE_INSTANCE_GET_CLASS((obj),                   \
58                                GST_TYPE_VAAPISINK,      \
59                                GstVaapiSinkClass))
60
61 typedef struct _GstVaapiSink                    GstVaapiSink;
62 typedef struct _GstVaapiSinkClass               GstVaapiSinkClass;
63 #if !USE_GLX
64 typedef struct _GstVaapiTexture                 GstVaapiTexture;
65 #endif
66
67 struct _GstVaapiSink {
68     /*< private >*/
69     GstVideoSink parent_instance;
70
71     GstVaapiUploader   *uploader;
72     GstCaps            *caps;
73     GstVaapiDisplay    *display;
74     GstVaapiDisplayType display_type;
75     GstVaapiWindow     *window;
76     guint               window_width;
77     guint               window_height;
78     GstVaapiTexture    *texture;
79     GstBuffer          *video_buffer;
80     guint               video_width;
81     guint               video_height;
82     gint                video_par_n;
83     gint                video_par_d;
84     GstVaapiRectangle   display_rect;
85     GstVaapiRotation    rotation;
86     GstVaapiRotation    rotation_req;
87     guint               foreign_window  : 1;
88     guint               fullscreen      : 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;
94 };
95
96 struct _GstVaapiSinkClass {
97     /*< private >*/
98     GstVideoSinkClass parent_class;
99 };
100
101 GType
102 gst_vaapisink_get_type(void) G_GNUC_CONST;
103
104 G_END_DECLS
105
106 #endif /* GST_VAAPISINK_H */