Revert "playbin3: handle GST_PLAY_FLAG_FORCE_SW_DECODERS"
[platform/upstream/gstreamer.git] / gst / playback / gstplaysink.h
1 /* GStreamer
2  * Copyright (C) <2007> Wim Taymans <wim.taymans@gmail.com>
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_PLAY_SINK_H__
21 #define __GST_PLAY_SINK_H__
22
23 #include <gst/gst.h>
24
25 #include "gstplay-enum.h"
26
27 G_BEGIN_DECLS
28
29 #define GST_TYPE_PLAY_SINK \
30   (gst_play_sink_get_type())
31 #define GST_PLAY_SINK(obj) \
32   (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_PLAY_SINK, GstPlaySink))
33 #define GST_PLAY_SINK_CLASS(klass) \
34   (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_PLAY_SINK, GstPlaySinkClass))
35 #define GST_IS_PLAY_SINK(obj) \
36   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_PLAY_SINK))
37 #define GST_IS_PLAY_SINK_CLASS(klass) \
38   (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_PLAY_SINK))
39 #define GST_PLAY_SINK_CAST(obj) \
40   ((GstPlaySink*)(obj))
41
42 /**
43  * GstPlaySinkType:
44  * @GST_PLAY_SINK_TYPE_AUDIO: an audio pad
45  * @GST_PLAY_SINK_TYPE_VIDEO: a video pad
46  * @GST_PLAY_SINK_TYPE_TEXT: a text pad
47  * @GST_PLAY_SINK_TYPE_FLUSHING: a flushing pad, used when shutting down
48  * @GST_PLAY_SINK_TYPE_LAST: the last type
49  *
50  * Types of pads that can be requested from the sinks.
51  */
52 typedef enum {
53   GST_PLAY_SINK_TYPE_AUDIO     = 0,
54   GST_PLAY_SINK_TYPE_VIDEO     = 1,
55   GST_PLAY_SINK_TYPE_TEXT      = 2,
56   /* this is a dummy pad */
57   GST_PLAY_SINK_TYPE_FLUSHING  = 3,
58   GST_PLAY_SINK_TYPE_LAST      = 4
59 } GstPlaySinkType;
60
61 typedef struct _GstPlaySink GstPlaySink;
62 typedef struct _GstPlaySinkClass GstPlaySinkClass;
63
64 GType gst_play_sink_get_type (void);
65
66 GstPad *         gst_play_sink_request_pad    (GstPlaySink *playsink, GstPlaySinkType type);
67 void             gst_play_sink_release_pad    (GstPlaySink *playsink, GstPad *pad);
68 void             gst_play_sink_refresh_pad    (GstPlaySink *playsink, GstPad *pad, GstPlaySinkType type);
69
70 void             gst_play_sink_set_filter     (GstPlaySink * playsink, GstPlaySinkType type, GstElement * filter);
71 GstElement *     gst_play_sink_get_filter     (GstPlaySink * playsink, GstPlaySinkType type);
72
73 void             gst_play_sink_set_sink       (GstPlaySink * playsink, GstPlaySinkType type, GstElement * sink);
74 GstElement *     gst_play_sink_get_sink       (GstPlaySink * playsink, GstPlaySinkType type);
75
76 void             gst_play_sink_set_vis_plugin (GstPlaySink * playsink, GstElement * vis);
77 GstElement *     gst_play_sink_get_vis_plugin (GstPlaySink * playsink);
78
79 void             gst_play_sink_set_volume     (GstPlaySink *playsink, gdouble volume);
80 gdouble          gst_play_sink_get_volume     (GstPlaySink *playsink);
81
82 void             gst_play_sink_set_mute       (GstPlaySink *playsink, gboolean mute);
83 gboolean         gst_play_sink_get_mute       (GstPlaySink *playsink);
84
85 gboolean         gst_play_sink_set_flags      (GstPlaySink * playsink, GstPlayFlags flags);
86 GstPlayFlags     gst_play_sink_get_flags      (GstPlaySink * playsink);
87
88 void             gst_play_sink_set_font_desc  (GstPlaySink *playsink, const gchar * desc);
89 gchar *          gst_play_sink_get_font_desc  (GstPlaySink *playsink);
90 void             gst_play_sink_set_subtitle_encoding  (GstPlaySink *playsink, const gchar * encoding);
91 gchar *          gst_play_sink_get_subtitle_encoding  (GstPlaySink *playsink);
92
93 void             gst_play_sink_set_av_offset  (GstPlaySink *playsink, gint64 av_offset);
94 gint64           gst_play_sink_get_av_offset  (GstPlaySink *playsink);
95
96 void             gst_play_sink_set_text_offset  (GstPlaySink *playsink, gint64 text_offset);
97 gint64           gst_play_sink_get_text_offset  (GstPlaySink *playsink);
98
99 GstSample *      gst_play_sink_get_last_sample (GstPlaySink * playsink);
100 GstSample *      gst_play_sink_convert_sample  (GstPlaySink * playsink, GstCaps * caps);
101
102 gboolean         gst_play_sink_reconfigure    (GstPlaySink * playsink);
103
104 gboolean         gst_play_sink_plugin_init    (GstPlugin * plugin);
105
106 G_END_DECLS
107
108 #endif /* __GST_PLAY_SINK_H__ */