Imported Upstream version 0.10.23
[profile/ivi/gst-plugins-bad.git] / gst / dvbsuboverlay / gstdvbsuboverlay.h
1 /* GStreamer DVB subtitles overlay
2  * Copyright (c) 2010 Mart Raudsepp <mart.raudsepp@collabora.co.uk>
3  * Copyright (c) 2010 ONELAN Ltd.
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Library General Public License
7  * as published by the Free Software Foundation; either version 2
8  * of the License, or (at your option) any later version.
9  *
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
13  * GNU Library General Public License for more details.
14  *
15  * You should have received a copy of the GNU Library General Public License
16  * along with this library; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
18  */
19
20 #ifndef __GST_DVBSUB_OVERLAY_H__
21 #define __GST_DVBSUB_OVERLAY_H__
22
23 #include <gst/gst.h>
24 #include <gst/video/video.h>
25
26 #include "dvb-sub.h"
27
28 G_BEGIN_DECLS
29
30 #define GST_TYPE_DVBSUB_OVERLAY (gst_dvbsub_overlay_get_type())
31 #define GST_DVBSUB_OVERLAY(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_DVBSUB_OVERLAY,GstDVBSubOverlay))
32 #define GST_DVBSUB_OVERLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_DVBSUB_OVERLAY,GstDVBSubOverlayClass))
33 #define GST_IS_DVBSUB_OVERLAY(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DVBSUB_OVERLAY))
34 #define GST_IS_DVBSUB_OVERLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_DVBSUB_OVERLAY))
35
36 typedef struct _GstDVBSubOverlay GstDVBSubOverlay;
37 typedef struct _GstDVBSubOverlayClass GstDVBSubOverlayClass;
38
39 struct _GstDVBSubOverlay
40 {
41   GstElement element;
42
43   GstPad *video_sinkpad, *text_sinkpad, *srcpad;
44
45   /* properties */
46   gboolean enable;
47   gint max_page_timeout;
48
49   /* <private> */
50   GstSegment video_segment;
51   GstSegment subtitle_segment;
52
53   GstVideoFormat format;
54   gint width, height;
55   gint fps_n, fps_d;
56   gint par_n, par_d;
57
58   DVBSubtitles *current_subtitle; /* The currently active set of subtitle regions, if any */
59   GQueue *pending_subtitles; /* A queue of raw subtitle region sets with
60                               * metadata that are waiting their running time */
61
62   GMutex *dvbsub_mutex; /* protects the queue and the DvbSub instance */
63   DvbSub *dvb_sub;
64 };
65
66 struct _GstDVBSubOverlayClass
67 {
68   GstElementClass parent_class;
69 };
70
71 GType gst_dvbsub_overlay_get_type (void);
72
73 G_END_DECLS
74
75 #endif