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., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, 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
71 gboolean downstream_chain_error;
73 GstPad *video_sinkpad;
74 GstPad *video_block_pad;
75 gulong video_block_id;
76 gboolean video_sink_blocked;
77 GstSegment video_segment;
80 GstPad *subtitle_sinkpad;
81 GstPad *subtitle_block_pad;
82 gulong subtitle_block_id;
83 gboolean subtitle_sink_blocked;
84 GstSegment subtitle_segment;
85 gboolean subtitle_flush;
86 gboolean subtitle_error;
88 GMutex *factories_lock;
90 guint32 factories_cookie;
91 GstCaps *factory_caps;
96 GstElement *passthrough_identity;
98 GstElement *pre_colorspace;
99 GstElement *post_colorspace;
104 GstElement *renderer;
106 const gchar *silent_property;
107 gboolean silent_property_invert;
110 struct _GstSubtitleOverlayClass
115 GType gst_subtitle_overlay_get_type (void);
116 gboolean gst_subtitle_overlay_plugin_init (GstPlugin * plugin);
118 GstCaps *gst_subtitle_overlay_create_factory_caps (void);
121 #endif /* __GST_SUBTITLE_OVERLAY_H__ */