systemclock: Restore default clock mode to monotonic for non-linux system
authorSeungha Yang <seungha@centricular.com>
Tue, 20 Jul 2021 07:52:12 +0000 (16:52 +0900)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Mon, 26 Jul 2021 09:20:42 +0000 (09:20 +0000)
Before the MR https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/829
Windows and macOS system clock used monotonic clock regardless of
selected clock mode. And because of clock resolution, we should prefer
monotonic over realtime unless realtime clock is selected explicitly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/855>

gst/gstsystemclock.c

index fb96965..6d0b6ec 100644 (file)
@@ -365,7 +365,7 @@ struct _GstSystemClockPrivate
 #  define DEFAULT_CLOCK_TYPE GST_CLOCK_TYPE_REALTIME
 # endif
 #else
-#define DEFAULT_CLOCK_TYPE GST_CLOCK_TYPE_REALTIME
+#define DEFAULT_CLOCK_TYPE GST_CLOCK_TYPE_MONOTONIC
 #endif
 
 enum