1 /* GStreamer DVB subtitles overlay
2 * Copyright (c) 2010 Mart Raudsepp <mart.raudsepp@collabora.co.uk>
3 * Copyright (c) 2010 ONELAN Ltd.
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.
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.
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.
20 #ifndef __GST_DVBSUB_OVERLAY_H__
21 #define __GST_DVBSUB_OVERLAY_H__
24 #include <gst/video/video.h>
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))
36 typedef struct _GstDVBSubOverlay GstDVBSubOverlay;
37 typedef struct _GstDVBSubOverlayClass GstDVBSubOverlayClass;
39 struct _GstDVBSubOverlay
43 GstPad *video_sinkpad, *text_sinkpad, *srcpad;
47 gint max_page_timeout;
50 GstSegment video_segment;
51 GstSegment subtitle_segment;
53 GstVideoFormat format;
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 */
62 GMutex *dvbsub_mutex; /* protects the queue and the DvbSub instance */
66 struct _GstDVBSubOverlayClass
68 GstElementClass parent_class;
71 GType gst_dvbsub_overlay_get_type (void);