2 * Copyright (C) <2007> Wim Taymans <wim.taymans@gmail.com>
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_PLAY_SINK_H__
21 #define __GST_PLAY_SINK_H__
25 #include "gstplay-enum.h"
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) \
44 * @GST_PLAY_SINK_TYPE_AUDIO: A non-raw audio pad
45 * @GST_PLAY_SINK_TYPE_AUDIO_RAW: a raw audio pad
46 * @GST_PLAY_SINK_TYPE_VIDEO: a non-raw video pad
47 * @GST_PLAY_SINK_TYPE_VIDEO_RAW: a raw video pad
48 * @GST_PLAY_SINK_TYPE_TEXT: a raw text pad
49 * @GST_PLAY_SINK_TYPE_SUBPIC: a subpicture pad
50 * @GST_PLAY_SINK_TYPE_LAST: the last type
51 * @GST_PLAY_SINK_TYPE_FLUSHING: a flushing pad, used when shutting down
53 * Types of pads that can be requested from the sinks.
56 GST_PLAY_SINK_TYPE_AUDIO = 0,
57 GST_PLAY_SINK_TYPE_AUDIO_RAW = 1,
58 GST_PLAY_SINK_TYPE_VIDEO = 2,
59 GST_PLAY_SINK_TYPE_VIDEO_RAW = 3,
60 GST_PLAY_SINK_TYPE_TEXT = 4,
61 GST_PLAY_SINK_TYPE_SUBPIC = 5,
62 GST_PLAY_SINK_TYPE_LAST = 6,
64 /* this is a dummy pad */
65 GST_PLAY_SINK_TYPE_FLUSHING = 7
68 typedef struct _GstPlaySink GstPlaySink;
69 typedef struct _GstPlaySinkClass GstPlaySinkClass;
71 GType gst_play_sink_get_type (void);
73 GstPad * gst_play_sink_request_pad (GstPlaySink *playsink, GstPlaySinkType type);
74 void gst_play_sink_release_pad (GstPlaySink *playsink, GstPad *pad);
76 void gst_play_sink_set_sink (GstPlaySink * playsink, GstPlaySinkType type, GstElement * sink);
77 GstElement * gst_play_sink_get_sink (GstPlaySink * playsink, GstPlaySinkType type);
79 void gst_play_sink_set_vis_plugin (GstPlaySink * playsink, GstElement * vis);
80 GstElement * gst_play_sink_get_vis_plugin (GstPlaySink * playsink);
82 void gst_play_sink_set_volume (GstPlaySink *playsink, gdouble volume);
83 gdouble gst_play_sink_get_volume (GstPlaySink *playsink);
85 void gst_play_sink_set_mute (GstPlaySink *playsink, gboolean mute);
86 gboolean gst_play_sink_get_mute (GstPlaySink *playsink);
88 gboolean gst_play_sink_set_flags (GstPlaySink * playsink, GstPlayFlags flags);
89 GstPlayFlags gst_play_sink_get_flags (GstPlaySink * playsink);
91 void gst_play_sink_set_font_desc (GstPlaySink *playsink, const gchar * desc);
92 gchar * gst_play_sink_get_font_desc (GstPlaySink *playsink);
94 GstBuffer * gst_play_sink_get_last_frame (GstPlaySink * playsink);
96 gboolean gst_play_sink_reconfigure (GstPlaySink * playsink);
100 #endif /* __GST_PLAY_SINK_H__ */