*/
/**
* SECTION:gstptpclock
+ * @title: GstPtpClock
* @short_description: Special clock that synchronizes to a remote time
* provider via PTP (IEEE1588:2008).
* @see_also: #GstClock, #GstNetClientClock, #GstPipeline
* check this, you can use gst_clock_wait_for_sync(), the GstClock::synced
* signal and gst_clock_is_synced().
*
- *
* To gather statistics about the PTP clock synchronization,
* gst_ptp_statistics_callback_add() can be used. This gives the application
* the possibility to collect all kinds of statistics from the clock
#include <sys/wait.h>
#endif
#ifdef G_OS_WIN32
+#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#endif
#include <sys/types.h>
+
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#elif defined(G_OS_WIN32)
+#include <io.h>
+#endif
#include <gst/base/base.h>
static void
ptp_pending_sync_free (PtpPendingSync * sync)
{
- if (sync->timeout_source)
+ if (sync->timeout_source) {
g_source_destroy (sync->timeout_source);
+ g_source_unref(sync->timeout_source);
+ }
g_free (sync);
}
* If @clock_id is %GST_PTP_CLOCK_ID_NONE, a clock id is automatically
* generated from the MAC address of the first network interface.
*
- *
* This function is automatically called by gst_ptp_clock_new() with default
* parameters if it wasn't called before.
*
* If gst_ptp_init() was not called before, this will call gst_ptp_init() with
* default parameters.
*
- *
* This clock only returns valid timestamps after it received the first
* times from the PTP master clock on the network. Once this happens the
* GstPtpClock::internal-clock property will become non-NULL. You can