mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-22 08:17:01 +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
53 lines
1.8 KiB
Makefile
53 lines
1.8 KiB
Makefile
if ENABLE_BASH_COMPLETION
|
|
bin_PROGRAMS = gst-completion-helper-@GST_API_VERSION@
|
|
|
|
gst_completion_helper_@GST_API_VERSION@_SOURCES = gst-completion-helper.c
|
|
gst_completion_helper_@GST_API_VERSION@_CFLAGS = $(GST_OBJ_CFLAGS)
|
|
gst_completion_helper_@GST_API_VERSION@_LDADD = $(GST_OBJ_LIBS)
|
|
|
|
bashhelpersdir = $(BASH_HELPERS_DIR)
|
|
dist_bashhelpers_DATA = gst
|
|
endif
|
|
|
|
helpers_PROGRAMS = gst-plugin-scanner
|
|
helpersdir=$(libexecdir)/gstreamer-$(GST_API_VERSION)
|
|
|
|
gst_plugin_scanner_SOURCES = gst-plugin-scanner.c
|
|
gst_plugin_scanner_CFLAGS = $(GST_OBJ_CFLAGS)
|
|
gst_plugin_scanner_LDADD = $(GST_OBJ_LIBS)
|
|
|
|
if HAVE_PTP
|
|
helpers_PROGRAMS += gst-ptp-helper
|
|
gst_ptp_helper_SOURCES = gst-ptp-helper.c
|
|
gst_ptp_helper_CFLAGS = $(GST_OBJ_CFLAGS) $(GIO_CFLAGS)
|
|
gst_ptp_helper_LDADD = $(GST_OBJ_LIBS) $(GIO_LIBS) $(CAP_LIBS)
|
|
endif
|
|
|
|
install-exec-hook:
|
|
if HAVE_PTP
|
|
if HAVE_PTP_HELPER_SETUID
|
|
chown root $(DESTDIR)$(helpersdir)/gst-ptp-helper
|
|
chmod u+s $(DESTDIR)$(helpersdir)/gst-ptp-helper
|
|
endif
|
|
if HAVE_PTP_HELPER_CAPABILITIES
|
|
$(SETCAP) cap_net_bind_service,cap_net_admin+ep $(DESTDIR)$(helpersdir)/gst-ptp-helper
|
|
endif
|
|
endif
|
|
if ENABLE_BASH_COMPLETION
|
|
$(MKDIR_P) $(DESTDIR)$(BASH_HELPERS_DIR) && \
|
|
cd $(DESTDIR)$(bindir) && \
|
|
$(INSTALL) `echo "gst-completion-helper-" | sed '$(transform)'`@GST_API_VERSION@$(EXEEXT) \
|
|
$(DESTDIR)$(BASH_HELPERS_DIR)/gst-completion-helper-@GST_API_VERSION@$(EXEEXT) && \
|
|
rm `echo "gst-completion-helper-" | sed '$(transform)'`@GST_API_VERSION@$(EXEEXT)
|
|
|
|
uninstall-hook:
|
|
rm -f $(DESTDIR)$(BASH_HELPERS_DIR)/gst-completion-helper-@GST_API_VERSION@$(EXEEXT)
|
|
endif
|
|
|
|
# clean out the old one to make sure everything is udpated correctly
|
|
# remove again after release
|
|
CLEANFILES = plugin-scanner
|
|
|
|
if ENABLE_BASH_COMPLETION
|
|
CLEANFILES += gst-completion-helper-@GST_API_VERSION@
|
|
endif
|