Support for GStreamer 1.0
[projects/chimara/chimara.git] / libchimara / schannel.h
1 #ifndef __SCHANNEL_H__
2 #define __SCHANNEL_H__
3
4 #include <config.h>
5 #include <glib.h>
6 #include "glk.h"
7 #include "gi_dispa.h"
8 #include "chimara-glk.h"
9 #if defined(GSTREAMER_0_10_SOUND) || defined(GSTREAMER_1_0_SOUND)
10 #include <gst/gst.h>
11 #endif
12
13 struct glk_schannel_struct
14 {
15         /*< private >*/
16         glui32 magic, rock;
17         gidispatch_rock_t disprock;
18         /* Pointer to the list node in the global sound channel list that contains 
19          this sound channel */
20         GList *schannel_list;
21         /* Pointer to the GTK widget this sound channel belongs to, for convenience */
22         ChimaraGlk *glk;
23
24         /* Resource number and notification ID of last played sound */
25         glui32 resource, notify;
26         /* How many times to repeat the last sound played (-1 = forever) */
27         glui32 repeats;
28         /* Whether channel is paused */
29         gboolean paused;
30         
31         /* Volume change information */
32         double target_volume;
33         long target_time_sec, target_time_usec;
34         guint volume_timer_id;
35         glui32 volume_notify;
36
37 #if defined(GSTREAMER_0_10_SOUND) || defined(GSTREAMER_1_0_SOUND)
38         /* Each sound channel is represented as a GStreamer pipeline.  */
39         GstElement *pipeline, *source, *typefind, *demux, *decode, *convert, *filter, *sink;
40 #endif
41 };
42
43 #endif