mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-08 23:42:28 +00:00
parent
d4012be469
commit
4ad052fed7
1 changed files with 7 additions and 3 deletions
|
@ -43,6 +43,7 @@
|
||||||
#include "gstsystemclock.h"
|
#include "gstsystemclock.h"
|
||||||
#include "gstenumtypes.h"
|
#include "gstenumtypes.h"
|
||||||
#include "gstpoll.h"
|
#include "gstpoll.h"
|
||||||
|
#include "gstutils.h"
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
|
@ -479,8 +480,9 @@ static GstClockTime
|
||||||
gst_system_clock_get_internal_time (GstClock * clock)
|
gst_system_clock_get_internal_time (GstClock * clock)
|
||||||
{
|
{
|
||||||
#ifdef G_OS_WIN32
|
#ifdef G_OS_WIN32
|
||||||
if (clock->priv->frequency.QuadPart != 0) {
|
GstSystemClock *sysclock = GST_SYSTEM_CLOCK_CAST (clock);
|
||||||
GstSystemClock *sysclock = GST_SYSTEM_CLOCK_CAST (clock);
|
|
||||||
|
if (sysclock->priv->frequency.QuadPart != 0) {
|
||||||
LARGE_INTEGER now;
|
LARGE_INTEGER now;
|
||||||
|
|
||||||
/* we prefer the highly accurate performance counters on windows */
|
/* we prefer the highly accurate performance counters on windows */
|
||||||
|
@ -518,7 +520,9 @@ static guint64
|
||||||
gst_system_clock_get_resolution (GstClock * clock)
|
gst_system_clock_get_resolution (GstClock * clock)
|
||||||
{
|
{
|
||||||
#ifdef G_OS_WIN32
|
#ifdef G_OS_WIN32
|
||||||
if (clock->priv->frequency.QuadPart != 0) {
|
GstSystemClock *sysclock = GST_SYSTEM_CLOCK_CAST (clock);
|
||||||
|
|
||||||
|
if (sysclock->priv->frequency.QuadPart != 0) {
|
||||||
return GST_SECOND / sysclock->priv->frequency.QuadPart;
|
return GST_SECOND / sysclock->priv->frequency.QuadPart;
|
||||||
} else
|
} else
|
||||||
#endif /* G_OS_WIN32 */
|
#endif /* G_OS_WIN32 */
|
||||||
|
|
Loading…
Reference in a new issue