uridecodebin: remove commented code
[platform/upstream/gstreamer.git] / gst / playback / gstsubtitleoverlay.h
1 /* GStreamer
2  * Copyright (C) 2009 Sebastian Dröge <sebastian.droege@collabora.co.uk>
3  *
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.
8  *
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.
13  *
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.
18  */
19
20 #ifndef __GST_SUBTITLE_OVERLAY_H__
21 #define __GST_SUBTITLE_OVERLAY_H__
22
23 #include <gst/gst.h>
24
25 G_BEGIN_DECLS
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))
38
39 #define GST_SUBTITLE_OVERLAY_LOCK(obj) G_STMT_START {                   \
40     GST_LOG_OBJECT (obj,                                                \
41                     "locking from thread %p",                           \
42                     g_thread_self ());                                  \
43     g_mutex_lock (&GST_SUBTITLE_OVERLAY_CAST(obj)->lock);               \
44     GST_LOG_OBJECT (obj,                                                \
45                     "locked from thread %p",                            \
46                     g_thread_self ());                                  \
47 } G_STMT_END
48
49 #define GST_SUBTITLE_OVERLAY_UNLOCK(obj) G_STMT_START {                 \
50     GST_LOG_OBJECT (obj,                                                \
51                     "unlocking from thread %p",                         \
52                     g_thread_self ());                                  \
53     g_mutex_unlock (&GST_SUBTITLE_OVERLAY_CAST(obj)->lock);             \
54 } G_STMT_END
55
56 typedef struct _GstSubtitleOverlay GstSubtitleOverlay;
57 typedef struct _GstSubtitleOverlayClass GstSubtitleOverlayClass;
58
59 struct _GstSubtitleOverlay
60 {
61   GstBin parent;
62
63   gboolean silent;
64   gchar *font_desc;
65   gchar *encoding;
66
67   /* < private > */
68   gboolean do_async;
69
70   GstPad *srcpad;
71   gboolean downstream_chain_error;
72
73   GstPad *video_sinkpad;
74   GstPad *video_block_pad;
75   gulong video_block_id;
76   gboolean video_sink_blocked;
77   GstSegment video_segment;
78   gint fps_n, fps_d;
79
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;
87
88   GMutex factories_lock;
89   GList *factories;
90   guint32 factories_cookie;
91   GstCaps *factory_caps;
92
93   GMutex lock;
94   GstCaps *subcaps;
95
96   GstElement *passthrough_identity;
97
98   GstElement *pre_colorspace;
99   GstElement *post_colorspace;
100
101   GstElement *parser;
102   GstElement *overlay;
103
104   GstElement *renderer;
105
106   const gchar *silent_property;
107   gboolean silent_property_invert;
108 };
109
110 struct _GstSubtitleOverlayClass
111 {
112   GstBinClass parent;
113 };
114
115 GType gst_subtitle_overlay_get_type (void);
116 gboolean gst_subtitle_overlay_plugin_init (GstPlugin * plugin);
117
118 GstCaps *gst_subtitle_overlay_create_factory_caps (void);
119
120 G_END_DECLS
121 #endif /* __GST_SUBTITLE_OVERLAY_H__ */