|
1 /* GStreamer |
|
2 * Copyright (C) 2005 Wim Taymans <wim@fluendo.com> |
|
3 * |
|
4 * gstsegment.h: Header for GstSegment subsystem |
|
5 * |
|
6 * This library is free software; you can redistribute it and/or |
|
7 * modify it under the terms of the GNU Library General Public |
|
8 * License as published by the Free Software Foundation; either |
|
9 * version 2 of the License, or (at your option) any later version. |
|
10 * |
|
11 * This library is distributed in the hope that it will be useful, |
|
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
14 * Library General Public License for more details. |
|
15 * |
|
16 * You should have received a copy of the GNU Library General Public |
|
17 * License along with this library; if not, write to the |
|
18 * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
|
19 * Boston, MA 02111-1307, USA. |
|
20 */ |
|
21 |
|
22 |
|
23 #ifndef __GST_SEGMENT_H__ |
|
24 #define __GST_SEGMENT_H__ |
|
25 |
|
26 #include <gst/gstevent.h> |
|
27 #include <gst/gstformat.h> |
|
28 |
|
29 G_BEGIN_DECLS |
|
30 |
|
31 #define GST_TYPE_SEGMENT (gst_segment_get_type()) |
|
32 |
|
33 typedef struct _GstSegment GstSegment; |
|
34 |
|
35 /** |
|
36 * GstSegment: |
|
37 * @rate: the rate of the segment |
|
38 * @abs_rate: absolute value of @rate |
|
39 * @format: the format of the segment values |
|
40 * @flags: flags for this segment |
|
41 * @start: the start of the segment |
|
42 * @stop: the stop of the segment |
|
43 * @time: the stream time of the segment |
|
44 * @accum: accumulated segment |
|
45 * @last_stop: last known stop time |
|
46 * @duration: total duration of segment |
|
47 * @applied_rate: the already applied rate to the segment |
|
48 * |
|
49 * A helper structure that holds the configured region of |
|
50 * interest in a media file. |
|
51 */ |
|
52 struct _GstSegment { |
|
53 /*< public >*/ |
|
54 gdouble rate; |
|
55 gdouble abs_rate; |
|
56 GstFormat format; |
|
57 GstSeekFlags flags; |
|
58 gint64 start; |
|
59 gint64 stop; |
|
60 gint64 time; |
|
61 gint64 accum; |
|
62 |
|
63 gint64 last_stop; |
|
64 gint64 duration; |
|
65 |
|
66 /* API added 0.10.6 */ |
|
67 gdouble applied_rate; |
|
68 |
|
69 /*< private >*/ |
|
70 /*gpointer _gst_reserved[GST_PADDING-2];*/ |
|
71 guint8 _gst_reserved[(sizeof (gpointer) * GST_PADDING) - sizeof (gdouble)]; |
|
72 }; |
|
73 #ifdef __SYMBIAN32__ |
|
74 IMPORT_C |
|
75 #endif |
|
76 |
|
77 |
|
78 GType gst_segment_get_type (void); |
|
79 #ifdef __SYMBIAN32__ |
|
80 IMPORT_C |
|
81 #endif |
|
82 |
|
83 |
|
84 GstSegment * gst_segment_new (void); |
|
85 #ifdef __SYMBIAN32__ |
|
86 IMPORT_C |
|
87 #endif |
|
88 |
|
89 void gst_segment_free (GstSegment *segment); |
|
90 #ifdef __SYMBIAN32__ |
|
91 IMPORT_C |
|
92 #endif |
|
93 |
|
94 |
|
95 void gst_segment_init (GstSegment *segment, GstFormat format); |
|
96 #ifdef __SYMBIAN32__ |
|
97 IMPORT_C |
|
98 #endif |
|
99 |
|
100 |
|
101 void gst_segment_set_duration (GstSegment *segment, GstFormat format, gint64 duration); |
|
102 #ifdef __SYMBIAN32__ |
|
103 IMPORT_C |
|
104 #endif |
|
105 |
|
106 void gst_segment_set_last_stop (GstSegment *segment, GstFormat format, gint64 position); |
|
107 #ifdef __SYMBIAN32__ |
|
108 IMPORT_C |
|
109 #endif |
|
110 |
|
111 |
|
112 void gst_segment_set_seek (GstSegment *segment, gdouble rate, |
|
113 GstFormat format, GstSeekFlags flags, |
|
114 GstSeekType start_type, gint64 start, |
|
115 GstSeekType stop_type, gint64 stop, |
|
116 gboolean *update); |
|
117 #ifdef __SYMBIAN32__ |
|
118 IMPORT_C |
|
119 #endif |
|
120 |
|
121 |
|
122 void gst_segment_set_newsegment (GstSegment *segment, gboolean update, gdouble rate, |
|
123 GstFormat format, gint64 start, gint64 stop, gint64 time); |
|
124 #ifdef __SYMBIAN32__ |
|
125 IMPORT_C |
|
126 #endif |
|
127 |
|
128 void gst_segment_set_newsegment_full (GstSegment *segment, gboolean update, gdouble rate, |
|
129 gdouble applied_rate, GstFormat format, gint64 start, |
|
130 gint64 stop, gint64 time); |
|
131 #ifdef __SYMBIAN32__ |
|
132 IMPORT_C |
|
133 #endif |
|
134 |
|
135 |
|
136 gint64 gst_segment_to_stream_time (GstSegment *segment, GstFormat format, gint64 position); |
|
137 #ifdef __SYMBIAN32__ |
|
138 IMPORT_C |
|
139 #endif |
|
140 |
|
141 gint64 gst_segment_to_running_time (GstSegment *segment, GstFormat format, gint64 position); |
|
142 #ifdef __SYMBIAN32__ |
|
143 IMPORT_C |
|
144 #endif |
|
145 |
|
146 |
|
147 gboolean gst_segment_clip (GstSegment *segment, GstFormat format, gint64 start, |
|
148 gint64 stop, gint64 *clip_start, gint64 *clip_stop); |
|
149 |
|
150 G_END_DECLS |
|
151 |
|
152 #endif /* __GST_SEGMENT_H__ */ |