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 784803 - alsasrc: Incorrectly timestamps buffers when pipeline is using a network clock
alsasrc: Incorrectly timestamps buffers when pipeline is using a network clock
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-07-11 16:11 UTC by GstBlub
Modified: 2018-11-03 12:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
netclientclock/ptpclock: Set clock-type property to "other" (2.91 KB, patch)
2017-07-11 16:11 UTC, GstBlub
none Details | Review

Description GstBlub 2017-07-11 16:11:33 UTC
Created attachment 355339 [details] [review]
netclientclock/ptpclock: Set clock-type property to "other"

The alsasrc plugin looks at the selected clock and checks if it's a clock based on the monotonic clock.  The problem is, the network clocks derive from the system clock and their clock-type property still defaults to the monotonic clock.  If the pipeline clock is such a network clock, the alsasrc plugin then uses the timestamps provided by alsa (which are based on the monotonic clock) to timestamp the buffers it produces, which won't match what the pipeline expects.

There are multiple ways to fix this issue, but I'm not sure what the right approach is:
1. alsasrc should check if the clock *is* of type GstSystemClock, rather than merely checking whether it is or potentially was derived from that class
2. The network clock implementations should set the clock-type property to "other" by default
3. The GstSystemClock and network clock implementations should be based off another common base class, and only the GstSystemClock class would have the clock-type property

The attached patch fixes it by implementing #2.
Comment 1 GStreamer system administrator 2018-11-03 12:41:56 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/244.