1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
2 /*
3  * Libbrasero-media
4  * Copyright (C) Philippe Rouquier 2005-2009 <bonfire-app@wanadoo.fr>
5  *
6  * Libbrasero-media is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * The Libbrasero-media authors hereby grant permission for non-GPL compatible
12  * GStreamer plugins to be used and distributed together with GStreamer
13  * and Libbrasero-media. This permission is above and beyond the permissions granted
14  * by the GPL license by which Libbrasero-media is covered. If you modify this code
15  * you may extend this exception to your version of the code, but you are not
16  * obligated to do so. If you do not wish to do so, delete this exception
17  * statement from your version.
18  *
19  * Libbrasero-media is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22  * GNU Library General Public License for more details.
23  *
24  * You should have received a copy of the GNU General Public License
25  * along with this program; if not, write to:
26  * 	The Free Software Foundation, Inc.,
27  * 	51 Franklin Street, Fifth Floor
28  * 	Boston, MA  02110-1301, USA.
29  */
30 
31 #ifndef _BRASERO_TRACK_STREAM_H_
32 #define _BRASERO_TRACK_STREAM_H_
33 
34 #include <glib-object.h>
35 
36 #include <brasero-enums.h>
37 #include <brasero-track.h>
38 
39 G_BEGIN_DECLS
40 
41 #define BRASERO_TYPE_TRACK_STREAM             (brasero_track_stream_get_type ())
42 #define BRASERO_TRACK_STREAM(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), BRASERO_TYPE_TRACK_STREAM, BraseroTrackStream))
43 #define BRASERO_TRACK_STREAM_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), BRASERO_TYPE_TRACK_STREAM, BraseroTrackStreamClass))
44 #define BRASERO_IS_TRACK_STREAM(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BRASERO_TYPE_TRACK_STREAM))
45 #define BRASERO_IS_TRACK_STREAM_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), BRASERO_TYPE_TRACK_STREAM))
46 #define BRASERO_TRACK_STREAM_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), BRASERO_TYPE_TRACK_STREAM, BraseroTrackStreamClass))
47 
48 typedef struct _BraseroTrackStreamClass BraseroTrackStreamClass;
49 typedef struct _BraseroTrackStream BraseroTrackStream;
50 
51 struct _BraseroTrackStreamClass
52 {
53 	BraseroTrackClass parent_class;
54 
55 	/* Virtual functions */
56 	BraseroBurnResult       (*set_source)		(BraseroTrackStream *track,
57 							 const gchar *uri);
58 
59 	BraseroBurnResult       (*set_format)		(BraseroTrackStream *track,
60 							 BraseroStreamFormat format);
61 
62 	BraseroBurnResult       (*set_boundaries)       (BraseroTrackStream *track,
63 							 gint64 start,
64 							 gint64 end,
65 							 gint64 gap);
66 };
67 
68 struct _BraseroTrackStream
69 {
70 	BraseroTrack parent_instance;
71 };
72 
73 GType brasero_track_stream_get_type (void) G_GNUC_CONST;
74 
75 BraseroTrackStream *
76 brasero_track_stream_new (void);
77 
78 BraseroBurnResult
79 brasero_track_stream_set_source (BraseroTrackStream *track,
80 				 const gchar *uri);
81 
82 BraseroBurnResult
83 brasero_track_stream_set_format (BraseroTrackStream *track,
84 				 BraseroStreamFormat format);
85 
86 BraseroBurnResult
87 brasero_track_stream_set_boundaries (BraseroTrackStream *track,
88 				     gint64 start,
89 				     gint64 end,
90 				     gint64 gap);
91 
92 gchar *
93 brasero_track_stream_get_source (BraseroTrackStream *track,
94 				 gboolean uri);
95 
96 BraseroBurnResult
97 brasero_track_stream_get_length (BraseroTrackStream *track,
98 				 guint64 *length);
99 
100 guint64
101 brasero_track_stream_get_start (BraseroTrackStream *track);
102 
103 guint64
104 brasero_track_stream_get_end (BraseroTrackStream *track);
105 
106 guint64
107 brasero_track_stream_get_gap (BraseroTrackStream *track);
108 
109 BraseroStreamFormat
110 brasero_track_stream_get_format (BraseroTrackStream *track);
111 
112 G_END_DECLS
113 
114 #endif /* _BRASERO_TRACK_STREAM_H_ */
115