6 #define GST_TYPE_PLAY (gst_play_get_type ())
7 #define GST_PLAY(obj) (GTK_CHECK_CAST ((obj), GST_TYPE_PLAY, GstPlay))
8 #define GST_PLAY_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GST_TYPE_PLAY, GstPlayClass))
9 #define GST_IS_PLAY(obj) (GTK_CHECK_TYPE ((obj), GST_TYPE_PLAY))
10 #define GST_IS_PLAY_CLASS(obj) (GTK_CHECK_CLASS_TYPE ((klass), GST_TYPE_PLAY))
12 typedef struct _GstPlay GstPlay;
13 typedef struct _GstPlayClass GstPlayClass;
23 GST_PLAY_UNKNOWN_MEDIA,
29 GST_PLAY_TYPE_AUDIO = (1 << 0),
30 GST_PLAY_TYPE_VIDEO = (1 << 1),
31 } GstPlayMediaTypeFlags;
37 GstPlayMediaTypeFlags flags;
42 #define GST_PLAY_STATE(play) ((play)->state)
43 #define GST_PLAY_MEDIA_TYPE(play) ((play)->flags)
44 #define GST_PLAY_IS_AUDIO_TYPE(play) ((play)->flags & GST_PLAY_TYPE_AUDIO)
45 #define GST_PLAY_IS_VIDEO_TYPE(play) ((play)->flags & GST_PLAY_TYPE_VIDEO)
47 struct _GstPlayClass {
48 GtkHBoxClass parent_class;
50 void (*state_changed) (GstPlay *play, GstPlayState state);
51 void (*frame_displayed) (GstPlay *play);
52 void (*audio_played) (GstPlay *play);
56 GtkType gst_play_get_type (void);
58 /* setup the player */
59 GstPlay* gst_play_new (void);
60 GstPlayReturn gst_play_set_uri (GstPlay *play, const guchar *uri);
62 /* control the player */
63 void gst_play_play (GstPlay *play);
64 void gst_play_pause (GstPlay *play);
65 void gst_play_stop (GstPlay *play);
67 void gst_play_mute (GstPlay *play, gboolean mute);
69 /* information about the media stream */
70 gulong gst_play_get_media_size (GstPlay *play);
71 gulong gst_play_get_media_offset (GstPlay *play);
72 gboolean gst_play_media_can_seek (GstPlay *play);
73 void gst_play_media_seek (GstPlay *play, gulong offset);
75 gulong gst_play_get_media_total_time (GstPlay *play);
76 gulong gst_play_get_media_current_time (GstPlay *play);
78 /* set display stuff */
79 void gst_play_set_display_size ();
81 /* the autoplugged pipeline */
82 GstElement* gst_play_get_pipeline (GstPlay *play);
84 #endif /* __GSTPLAY_H__ */