1 /* GStreamer DVD Sub-Picture Unit
2  * Copyright (C) 2007 Fluendo S.A. <info@fluendo.com>
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Library General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17  * Boston, MA 02110-1301, USA.
18  */
19 #ifndef __GSTSPU_COMMON_H__
20 #define __GSTSPU_COMMON_H__
21 
22 #include <glib.h>
23 #include <gst/video/video.h>
24 
25 G_BEGIN_DECLS
26 
27 /* FIXME: Move this back to gstdvdspu.h when the renderers no longer use it: */
28 typedef struct _GstDVDSpu      GstDVDSpu;
29 
30 typedef struct SpuState SpuState;
31 typedef struct SpuColour SpuColour;
32 typedef struct SpuRect SpuRect;
33 
34 /* Describe the limits of a rectangle */
35 struct SpuRect {
36   gint16 left;
37   gint16 top;
38   gint16 right;
39   gint16 bottom;
40 };
41 
42 /* Store a pre-multiplied colour value. The YUV fields hold the YUV values
43  * multiplied by the 8-bit alpha, to save computing it while rendering */
44 struct SpuColour {
45   guint16 Y;
46   guint16 U;
47   guint16 V;
48   guint8 A;
49 };
50 
51 void gstspu_clear_comp_buffers (SpuState * state);
52 void gstspu_blend_comp_buffers (SpuState * state, guint8 * planes[3]);
53 
54 
55 G_END_DECLS
56 
57 #endif /* __GSTSPU_COMMON_H__ */
58