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 680862 - "identity" with single-segment=true gives buffer.pts of CLOCK_TIME_NONE
"identity" with single-segment=true gives buffer.pts of CLOCK_TIME_NONE
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: 1.0.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-07-30 18:35 UTC by Jason Gerard DeRose
Modified: 2012-09-25 13:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fixes identity element when single-segment=true, at least for GST_FORMAT_TIME (1.48 KB, patch)
2012-08-02 09:56 UTC, Jason Gerard DeRose
none Details | Review

Description Jason Gerard DeRose 2012-07-30 18:35:30 UTC
Found this testing the 1.0 gnonlin plugins from git.

I have 2 video slices of 10 frames each, and am then sending this through the "identity" element with single-segment=true. The timestamps for the first slice are correct, but when it gets to the 2nd segment (2nd slice), the buffer.pts is CLOCK_TIME_NONE for every frame, like this:

0
33366667
66733334
100100000
133466667
166833334
200200000
233566667
266933334
300300000
333666667
18446744073709551615
18446744073709551615
18446744073709551615
18446744073709551615
18446744073709551615
18446744073709551615
18446744073709551615
18446744073709551615
18446744073709551615

Here's my test script:

http://bazaar.launchpad.net/~jderose/+junk/gst-examples/view/head:/gnonlin-1.0

This doesn't appear to be a gnonlin issue because if I use single-segment=false, the buffers all have the expected pts passed through from the underlying video:

333666666
367033333
400400000
433766666
467133333
500500000
533866666
567233333
600600000
633966666
667333333
700700000
734066666
767433333
800800000
834166666
867533333
900900000
934266666
967633333
Comment 1 Jason Gerard DeRose 2012-08-02 09:56:11 UTC
Created attachment 220133 [details] [review]
Fixes identity element when single-segment=true, at least for GST_FORMAT_TIME

With this patch, my test script now has the correct timestamps. This is dealing with GStreamer internals that I don't know very well, so there might be cases that I'm not dealing with correctly.

And I know I'm not accumulating segment->base correctly if you had a series of segment seeks in different formats. I'm not sure how you'd meaningfully do the accumulation in that case.

Note that gst_segment_to_running_time() only gets called for GST_FORMAT_TIME. So this at least fixes things for typical use with gnonlin.
Comment 2 Mark Nauwelaerts 2012-09-25 13:30:24 UTC
Had not noticed this before, but should now be fixed with:

commit 8e98ce54e1e42fee6a64398fb972592a4d00cba4
Author: Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Date:   Tue Sep 25 15:06:43 2012 +0200

    identity: also track and store segment info in single segment mode


This basically comes down to the supplied patch, except for manipulating the segment.base, which should not be needed since the upstream segment sender is supposed to manage base so as to have proper (global) running time (as used to sync to the clock etc downstream).