mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-30 05:31:15 +00:00
8d77759834
GstPtpClock implements a PTP (IEEE1588:2008) ordinary clock in slave-only mode, that allows a GStreamer pipeline to synchronize to a PTP network clock in some specific domain. The PTP subsystem can be initialized with gst_ptp_init(), which then starts a helper process to do the actual communication via the PTP ports. This is required as PTP listens on ports < 1024 and thus requires special privileges. Once this helper process is started, the main process will synchronize to all PTP domains that are detected on the selected interfaces. gst_ptp_clock_new() then allows to create a GstClock that provides the PTP time from a master clock inside a specific PTP domain. This clock will only return valid timestamps once the timestamps in the PTP domain are known. To check this, the GstPtpClock::internal-clock property and the related notify::clock signal can be used. Once the internal clock is not NULL, the PTP domain's time is known. Alternatively you can wait for this with gst_ptp_clock_wait_ready(). 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 synchronization. https://bugzilla.gnome.org/show_bug.cgi?id=749391
32 lines
1.1 KiB
C
32 lines
1.1 KiB
C
/* GStreamer
|
|
* Copyright (C) 2012 GStreamer developers
|
|
*
|
|
* net.h: single include header for gst-net library
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Library General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 2 of the License, or (at your option) any later version.
|
|
*
|
|
* This library is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Library General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Library General Public
|
|
* License along with this library; if not, write to the
|
|
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
* Boston, MA 02110-1301, USA.
|
|
*/
|
|
|
|
#ifndef __GST_NET__H__
|
|
#define __GST_NET__H__
|
|
|
|
#include <gst/net/gstnet.h>
|
|
#include <gst/net/gstnetaddressmeta.h>
|
|
#include <gst/net/gstnetclientclock.h>
|
|
#include <gst/net/gstnettimepacket.h>
|
|
#include <gst/net/gstnettimeprovider.h>
|
|
#include <gst/net/gstptpclock.h>
|
|
|
|
#endif /* __GST_NET__H__ */
|