2 * Copyright (C) 2009 Sebastian Dröge <sebastian.droege@collabora.co.uk>
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.
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.
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.
20 #ifndef __GST_SUBTITLE_OVERLAY_H__
21 #define __GST_SUBTITLE_OVERLAY_H__
26 #define GST_TYPE_SUBTITLE_OVERLAY \
27 (gst_subtitle_overlay_get_type())
28 #define GST_SUBTITLE_OVERLAY(obj) \
29 (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_SUBTITLE_OVERLAY, GstSubtitleOverlay))
30 #define GST_SUBTITLE_OVERLAY_CAST(obj) \
31 ((GstSubtitleOverlay *) obj)
32 #define GST_SUBTITLE_OVERLAY_CLASS(klass) \
33 (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_SUBTITLE_OVERLAY, GstSubtitleOverlayClass))
34 #define GST_IS_SUBTITLE_OVERLAY(obj) \
35 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_SUBTITLE_OVERLAY))
36 #define GST_IS_SUBTITLE_OVERLAY_CLASS(klass) \
37 (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_SUBTITLE_OVERLAY))
39 #define GST_SUBTITLE_OVERLAY_LOCK(obj) G_STMT_START { \
40 GST_LOG_OBJECT (obj, \
41 "locking from thread %p", \
43 g_mutex_lock (&GST_SUBTITLE_OVERLAY_CAST(obj)->lock); \
44 GST_LOG_OBJECT (obj, \
45 "locked from thread %p", \
49 #define GST_SUBTITLE_OVERLAY_UNLOCK(obj) G_STMT_START { \
50 GST_LOG_OBJECT (obj, \
51 "unlocking from thread %p", \
53 g_mutex_unlock (&GST_SUBTITLE_OVERLAY_CAST(obj)->lock); \
56 typedef struct _GstSubtitleOverlay GstSubtitleOverlay;
57 typedef struct _GstSubtitleOverlayClass GstSubtitleOverlayClass;
59 struct _GstSubtitleOverlay
66 gint64 subtitle_ts_offset;
72 gboolean downstream_chain_error;
74 GstPad *video_sinkpad;
75 GstPad *video_block_pad;
76 gulong video_block_id;
77 gboolean video_sink_blocked;
80 GstPad *subtitle_sinkpad;
81 GstPad *subtitle_block_pad;
82 gulong subtitle_block_id;
83 gboolean subtitle_sink_blocked;
84 gboolean subtitle_flush;
85 gboolean subtitle_error;
87 GMutex factories_lock;
89 guint32 factories_cookie;
90 GstCaps *factory_caps;
95 GstElement *passthrough_identity;
97 GstElement *pre_colorspace;
98 GstElement *post_colorspace;
103 GstElement *renderer;
105 const gchar *silent_property;
106 gboolean silent_property_invert;
109 struct _GstSubtitleOverlayClass
114 GType gst_subtitle_overlay_get_type (void);
115 gboolean gst_subtitle_overlay_plugin_init (GstPlugin * plugin);
117 GstCaps *gst_subtitle_overlay_create_factory_caps (void);
120 #endif /* __GST_SUBTITLE_OVERLAY_H__ */