adder: rework timestamping
authorStefan Kost <ensonic@users.sf.net>
Wed, 14 Apr 2010 20:31:20 +0000 (23:31 +0300)
committerStefan Kost <ensonic@users.sf.net>
Fri, 30 Apr 2010 06:24:13 +0000 (09:24 +0300)
commitab223520ed2300f70a9c967dd1ea7fbc23d23607
tree2dde883fa2a5654fd368c454a400dba5892c950d
parenteec0f7c8766e55b3d9993b38df4ce2d45612938d
adder: rework timestamping

Adder was using always incrementing timestamps. Seeking was done by setting the
position in the newsegment event. This was failing when doing segmented seeks
with rate<0.0, as offset (and thus timestamp) would go below 0.

Now we take both cur and end from the seek event. We construct newsegment events
depending including cur and end from the seek event. We set position to the
start of the segment. Timestamp is set to start or end of segment depending on
rate. Offset is recalculated.
gst/adder/gstadder.c
gst/adder/gstadder.h