+2007-05-08 Stefan Kost <ensonic@users.sf.net>
+
+ * gst/adder/gstadder.c (gst_adder_src_event, gst_adder_collected,
+ gst_adder_change_state):
+ * gst/adder/gstadder.h (bps, offset, collect_event, segment,
+ segment_pending, segment_position, segment_rate):
+ Handle playback-rate on adder.
+
2007-05-07 Michael Smith <msmith@fluendo.com>
* ext/theora/gsttheoradec.h:
GstSeekType curtype;
gint64 cur;
- /* parse the flushing flag */
- gst_event_parse_seek (event, NULL, NULL, &flags, &curtype, &cur, NULL,
- NULL);
+ /* parse the seek parameters */
+ gst_event_parse_seek (event, &adder->segment_rate, NULL, &flags, &curtype,
+ &cur, NULL, NULL);
/* check if we are flushing */
if (flags & GST_SEEK_FLAG_FLUSH) {
GstEvent *event;
/* FIXME, use rate/applied_rate as set on all sinkpads.
+ * - currently we just set rate as received from last seek-event
* We could potentially figure out the duration as well using
* the current segment positions and the stated stop positions.
* Also we just start from stream time 0 which is rather
* the later streams would be delayed until the stream times
* match.
*/
- event = gst_event_new_new_segment_full (FALSE, 1.0,
+ event = gst_event_new_new_segment_full (FALSE, adder->segment_rate,
1.0, GST_FORMAT_TIME, adder->timestamp, -1, adder->segment_position);
gst_pad_push_event (adder->srcpad, event);
adder->offset = 0;
adder->segment_pending = TRUE;
adder->segment_position = 0;
+ adder->segment_rate = 1.0;
gst_segment_init (&adder->segment, GST_FORMAT_UNDEFINED);
gst_collect_pads_start (adder->collect);
break;
gboolean is_signed;
/* number of bytes per sample, actually width/8 * channels */
- gint bps;
+ gint bps;
/* function to add samples */
GstAdderFunction func;
/* counters to keep track of timestamps */
gint64 timestamp;
gint64 offset;
-
+
/* sink event handling */
GstPadEventFunction collect_event;
GstSegment segment;
gboolean segment_pending;
guint64 segment_position;
+ gdouble segment_rate;
};
struct _GstAdderClass {