2003-12-07 13:29:10 +00:00
|
|
|
/* GStreamer
|
|
|
|
* Copyright (C) 2003 Julien Moutte <julien@moutte.net>
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the
|
|
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
2004-07-08 17:34:08 +00:00
|
|
|
|
2003-12-07 13:29:10 +00:00
|
|
|
#ifndef __GST_PLAY_H__
|
|
|
|
#define __GST_PLAY_H__
|
|
|
|
|
2003-12-14 17:00:18 +00:00
|
|
|
#include <gst/gst.h>
|
2004-01-07 21:49:25 +00:00
|
|
|
#include <gst/xoverlay/xoverlay.h>
|
2004-02-03 16:49:54 +00:00
|
|
|
#include <gst/play/play-enumtypes.h>
|
2003-12-07 13:29:10 +00:00
|
|
|
|
2005-02-09 22:31:05 +00:00
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2004-01-31 15:56:32 +00:00
|
|
|
/* GError stuff */
|
|
|
|
|
|
|
|
#define GST_PLAY_ERROR gst_play_error_quark ()
|
|
|
|
/* GObject stuff */
|
|
|
|
|
2003-12-07 13:29:10 +00:00
|
|
|
#define GST_TYPE_PLAY (gst_play_get_type())
|
|
|
|
#define GST_PLAY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_PLAY, GstPlay))
|
|
|
|
#define GST_PLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_PLAY, GstPlayClass))
|
|
|
|
#define GST_IS_PLAY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_PLAY))
|
|
|
|
#define GST_IS_PLAY_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_PLAY))
|
|
|
|
#define GST_PLAY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_PLAY, GstPlayClass))
|
|
|
|
|
2003-12-07 19:02:31 +00:00
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
GST_PLAY_SINK_TYPE_AUDIO,
|
|
|
|
GST_PLAY_SINK_TYPE_VIDEO,
|
|
|
|
GST_PLAY_SINK_TYPE_ANY,
|
|
|
|
} GstPlaySinkType;
|
|
|
|
|
2003-12-07 13:29:10 +00:00
|
|
|
typedef struct _GstPlay GstPlay;
|
|
|
|
typedef struct _GstPlayClass GstPlayClass;
|
2003-12-11 22:29:14 +00:00
|
|
|
typedef struct _GstPlayPrivate GstPlayPrivate;
|
2004-07-08 17:34:08 +00:00
|
|
|
|
2003-12-07 13:29:10 +00:00
|
|
|
struct _GstPlay
|
|
|
|
{
|
|
|
|
GstPipeline pipeline;
|
2004-07-08 17:34:08 +00:00
|
|
|
|
2003-12-11 22:29:14 +00:00
|
|
|
GstPlayPrivate *priv;
|
2004-07-08 17:34:08 +00:00
|
|
|
|
2003-12-09 10:02:08 +00:00
|
|
|
gpointer _gst_reserved[GST_PADDING];
|
2003-12-07 13:29:10 +00:00
|
|
|
};
|
2004-07-08 17:34:08 +00:00
|
|
|
|
2003-12-07 13:29:10 +00:00
|
|
|
struct _GstPlayClass
|
|
|
|
{
|
|
|
|
GstPipelineClass parent_class;
|
2004-07-08 17:34:08 +00:00
|
|
|
|
2004-03-15 16:32:54 +00:00
|
|
|
void (*time_tick) (GstPlay *play, gint64 time_nanos);
|
|
|
|
void (*stream_length) (GstPlay *play, gint64 length_nanos);
|
|
|
|
void (*have_video_size) (GstPlay *play, gint width, gint height);
|
2004-07-08 17:34:08 +00:00
|
|
|
|
2003-12-09 10:02:08 +00:00
|
|
|
gpointer _gst_reserved[GST_PADDING];
|
2003-12-07 13:29:10 +00:00
|
|
|
};
|
|
|
|
|
2004-03-15 16:32:54 +00:00
|
|
|
GType gst_play_get_type (void);
|
|
|
|
GstPlay * gst_play_new (GError **error);
|
2003-12-08 16:01:49 +00:00
|
|
|
|
2004-03-15 16:32:54 +00:00
|
|
|
gboolean gst_play_set_data_src (GstPlay *play,
|
|
|
|
GstElement *data_src);
|
|
|
|
gboolean gst_play_set_video_sink (GstPlay *play,
|
|
|
|
GstElement *video_sink);
|
|
|
|
gboolean gst_play_set_audio_sink (GstPlay *play,
|
|
|
|
GstElement *audio_sink);
|
2003-12-07 13:29:10 +00:00
|
|
|
|
2004-03-15 16:32:54 +00:00
|
|
|
gboolean gst_play_set_visualization (GstPlay *play,
|
|
|
|
GstElement *element);
|
|
|
|
gboolean gst_play_connect_visualization (GstPlay *play,
|
|
|
|
gboolean connect);
|
2003-12-07 13:29:10 +00:00
|
|
|
|
2004-03-15 16:32:54 +00:00
|
|
|
gboolean gst_play_set_location (GstPlay *play,
|
|
|
|
const char *location);
|
|
|
|
char * gst_play_get_location (GstPlay *play);
|
2003-12-07 13:29:10 +00:00
|
|
|
|
2004-03-15 16:32:54 +00:00
|
|
|
gboolean gst_play_seek_to_time (GstPlay *play,
|
|
|
|
gint64 time_nanos);
|
2004-01-31 15:56:32 +00:00
|
|
|
|
2004-03-15 16:32:54 +00:00
|
|
|
GstElement * gst_play_get_sink_element (GstPlay *play,
|
2004-03-15 21:41:35 +00:00
|
|
|
GstElement *element,
|
|
|
|
GstPlaySinkType sink_type);
|
2004-07-08 17:34:08 +00:00
|
|
|
GList * gst_play_get_all_by_interface (GstPlay *play,
|
|
|
|
GType interface);
|
2004-03-15 21:41:35 +00:00
|
|
|
|
|
|
|
gdouble gst_play_get_framerate (GstPlay *play);
|
2003-12-07 13:29:10 +00:00
|
|
|
|
2005-02-09 22:31:05 +00:00
|
|
|
G_END_DECLS
|
|
|
|
|
2003-12-07 13:29:10 +00:00
|
|
|
#endif /* __GST_PLAY_H__ */
|