2 * Copyright (C) <2005> Jan Schmidt <jan@fluendo.com>
3 * Copyright (C) <2002> Wim Taymans <wim@fluendo.com>
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
15 * You should have received a copy of the GNU Library General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
20 #ifndef __GST_DVDSUBDEC_H__
21 #define __GST_DVDSUBDEC_H__
24 #include <gst/video/video.h>
28 #define GST_TYPE_DVD_SUB_DEC (gst_dvd_sub_dec_get_type())
29 #define GST_DVD_SUB_DEC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_DVD_SUB_DEC,GstDvdSubDec))
30 #define GST_DVD_SUB_DEC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_DVD_SUB_DEC,GstDvdSubDecClass))
31 #define GST_IS_DVD_SUB_DEC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DVD_SUB_DEC))
32 #define GST_IS_DVD_SUB_DEC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_DVD_SUB_DEC))
34 typedef struct _GstDvdSubDec GstDvdSubDec;
35 typedef struct _GstDvdSubDecClass GstDvdSubDecClass;
37 /* Hold premultimplied colour values */
38 typedef struct Color_val
54 gint in_width, in_height;
56 /* Collect together subtitle buffers until we have a full control sequence */
57 GstBuffer *partialbuf;
58 GstMapInfo partialmap;
61 guchar subtitle_index[4];
63 guchar subtitle_alpha[4];
66 guint32 current_clut[16];
67 Color_val palette_cache_yuv[4];
68 Color_val hl_palette_cache_yuv[4];
70 Color_val palette_cache_rgb[4];
71 Color_val hl_palette_cache_rgb[4];
78 * State info for the current subpicture
88 gboolean forced_display;
91 gint left, top, right, bottom;
92 gint hl_left, hl_top, hl_right, hl_bottom;
96 GstClockTime next_event_ts;
101 struct _GstDvdSubDecClass
103 GstElementClass parent_class;
106 GType gst_dvd_sub_dec_get_type (void);
107 GST_ELEMENT_REGISTER_DECLARE (dvdsubdec);
111 #endif /* __GST_DVDSUBDEC_H__ */