Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Gst/MQTT] Introduce the Unix epoch synchronization using NTP @open sesame 09/29 10:29 #3427

Merged
merged 2 commits into from
Sep 30, 2021

Conversation

wooksong
Copy link
Member

@wooksong wooksong commented Jul 28, 2021

This PR introduces utility functions to get timestamps from the given NTP server and the self-synchronization mechanism of the Unix epoch timestamps using them.

To resolve the following issue, this PR also includes a patch to apply caching mechanism according to the polling interval given from the NTP server.

Note that if the 'ntp-sync' property is set to true (which means that if this feature is enabled), the pipeline would be stuck after a while. This is because most of the public NTP servers restrict clients not to poll too frequently. To fix it, polling intervals and caching mechanisms should be applied to the NPT utility functions.

Signed-off-by: Wook Song wook16.song@samsung.com

Self evaluation:

  1. Build test: [*]Passed [ ]Failed [ ]Skipped
  2. Run test: [*]Passed [ ]Failed [ ]Skipped

@taos-ci
Copy link
Collaborator

taos-ci commented Jul 28, 2021

📝 TAOS-CI Version: 1.5.20200925. Thank you for submitting PR #3427. Please a submit 1commit/1PR (one commit per one PR) policy to get comments quickly from reviewers. Your PR must pass all verificiation processes of cibot before starting a review process from reviewers. If you are new member to join this project, please read manuals in documentation folder and wiki page. In order to monitor a progress status of your PR in more detail, visit http://nnstreamer.mooo.com/.

@taos-ci
Copy link
Collaborator

taos-ci commented Jul 28, 2021

:octocat: cibot: @wooksong, gst/mqtt/mqttcommon.h does not include Doxygen tags such as @file @brief @author @bug. You must include the Doxygen tags in the source code. Please refer to a Doxygen manual at http://github.com/nnstreamer/TAOS-CI/blob/main/ci/doc/doxygen-documentation.md

Copy link
Collaborator

@taos-ci taos-ci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wooksong, 💯 All CI checkers are successfully verified. Thanks.

Copy link
Collaborator

@taos-ci taos-ci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wooksong, 💯 All CI checkers are successfully verified. Thanks.

@myungjoo
Copy link
Member

myungjoo commented Aug 4, 2021

CC: @anyj0527 @gichan-jang @kimjh12 You all need to study and understand this.

@taos-ci
Copy link
Collaborator

taos-ci commented Aug 25, 2021

:octocat: cibot: @wooksong, A builder checker could not be completed because one of the checkers is not completed. In order to find out a reason, please go to http://nnstreamer.mooo.com/nnstreamer/ci/repo-workers/pr-checker/3427-202108251057400.2570219039917-da5c9d5f449abe3ef2224ded793ec6b822d610c2/.

Copy link
Collaborator

@taos-ci taos-ci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wooksong, 💯 All CI checkers are successfully verified. Thanks.

Copy link
Member

@gichan-jang gichan-jang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

gst/mqtt/ntputil.c Show resolved Hide resolved
gst/mqtt/mqttsink.c Show resolved Hide resolved
gst/mqtt/mqttsink.c Outdated Show resolved Hide resolved
@wooksong
Copy link
Member Author

@dongju-chae @myungjoo

  • The missing g_frees are added.
  • scanf is eliminated.

Copy link
Collaborator

@taos-ci taos-ci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wooksong, 💯 All CI checkers are successfully verified. Thanks.

Copy link
Member

@dongju-chae dongju-chae left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

gst/mqtt/mqttsink.c Outdated Show resolved Hide resolved
@wooksong wooksong force-pushed the ntp-sync-support branch 2 times, most recently from 0ef899f to 710dfcc Compare September 28, 2021 14:04
Copy link
Collaborator

@taos-ci taos-ci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wooksong, 💯 All CI checkers are successfully verified. Thanks.

This patch adds the implementation of the basic utility functions to get
timestamps from the given or public NTP servers.

Signed-off-by: Wook Song <wook16.song@samsung.com>
This patch introduces the self-synchronization mechanism of the Unix
epoch timestamps. Note that if the 'ntp-sync' property is set to true
(which means that if this feature is enabled), the pipeline would be
stuck after a while. This is because most of the public NTP servers
restrict clients not to poll too frequently. To fix it, polling
intervals and caching mechanisms should be applied to the NPT utility
functions.

Signed-off-by: Wook Song <wook16.song@samsung.com>
@gichan-jang gichan-jang changed the title [Gst/MQTT] Introduce the Unix epoch synchronization using NTP [Gst/MQTT] Introduce the Unix epoch synchronization using NTP @open sesame 09/29 10:19 Sep 29, 2021
@gichan-jang gichan-jang changed the title [Gst/MQTT] Introduce the Unix epoch synchronization using NTP @open sesame 09/29 10:19 [Gst/MQTT] Introduce the Unix epoch synchronization using NTP @open sesame 09/29 10:29 Sep 29, 2021
Copy link
Collaborator

@taos-ci taos-ci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wooksong, 💯 All CI checkers are successfully verified. Thanks.

@myungjoo
Copy link
Member

Merge after #3509

@myungjoo myungjoo merged commit 1f5525a into nnstreamer:main Sep 30, 2021
@wooksong wooksong deleted the ntp-sync-support branch October 6, 2021 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants