After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 659814 - basesink: take segment start into account in position reporting
basesink: take segment start into account in position reporting
Status: RESOLVED INVALID
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
unspecified
Other All
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-09-22 12:05 UTC by Vincent Penquerc'h
Modified: 2011-09-22 12:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
basesink: take segment start into account in position reporting (1.11 KB, patch)
2011-09-22 12:06 UTC, Vincent Penquerc'h
none Details | Review

Description Vincent Penquerc'h 2011-09-22 12:05:58 UTC
I'm not so confident this breaks nothing else though, it seems like
a dangerous change...
Comment 1 Vincent Penquerc'h 2011-09-22 12:06:00 UTC
Created attachment 197234 [details] [review]
basesink: take segment start into account in position reporting

This fixes position reporting on files starting at a non 0 offset.
Comment 2 Mark Nauwelaerts 2011-09-22 12:10:16 UTC
(In reply to comment #1)
> Created an attachment (id=197234) [details] [review]
> basesink: take segment start into account in position reporting
> 
> This fixes position reporting on files starting at a non 0 offset.

This should not be the way to go.  The segment 'time' field is (conceptually) in a different timeline than start/stop (buffer) timeline, and so there should not be arithmetic (in this way).

It is probably up to upstream to send the proper stuff in 'time' field, which actually determines the stream_time/position timeline.
Comment 3 Vincent Penquerc'h 2011-09-22 12:30:33 UTC
Ah, I thought time was the "where are we" position between start and stop.
Thanks for the clarification, I'll hunt the cause of bad time then.
Comment 4 Mark Nauwelaerts 2011-09-22 12:37:04 UTC
Btw/fwiw, a good bet for the cause is a demuxer that sends (S, E, S) in the segment event where 0 != S := first buffer ts (or so).  That will already lead to a position (stream_time) starting at S (but running_time at 0).  For 'nice human reading', it should probably send (start, stop, 0).

It could also not mind and send (0, duration, 0) and position will start at 0, though there would not be much playback happening for some time as the running_time will not start at 0 then.

Some demuxers are (already) aware of this and do 'initial offset corrections', asfdemux iirc, others may not (and others need not care anyway, e.g. avidemux).