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

[core] Added SRT time API #1367

Merged
merged 3 commits into from
Jun 25, 2020

Conversation

maxsharabayko
Copy link
Collaborator

@maxsharabayko maxsharabayko commented Jun 23, 2020

This PR adds SRT API functions to get SRT internal clock timestamp for the current time and SRT connection start time.
Both these functions can be used for SRT Source Time functionality.

List of changes:

  • SRT API function to get SRT clock time in microseconds since epoch. srt_timenow().
  • SRT API function to get SRT socket start time in microseconds since epoch. srt_connection_time(SRTSOCKET).
  • SRT API: change SRT_MSGCTRL::srctime from uint64_t to int64_t (?)
  • Update API.md and API-functions.md docs.

Fixes #930
Closes #937

@maxsharabayko maxsharabayko added Type: Enhancement Indicates new feature requests [core] Area: Changes in SRT library core labels Jun 23, 2020
@maxsharabayko maxsharabayko added this to the v1.5.0 - Sprint 17 milestone Jun 23, 2020
@maxsharabayko maxsharabayko self-assigned this Jun 23, 2020
@maxsharabayko maxsharabayko force-pushed the develop/srctime-api branch 2 times, most recently from 06d8ecb to 9effe0f Compare June 23, 2020 10:45
docs/API-functions.md Outdated Show resolved Hide resolved
srtcore/buffer.h Outdated Show resolved Hide resolved
Copy link
Collaborator

@ethouris ethouris left a comment

Choose a reason for hiding this comment

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

Consider ^^

@maxsharabayko maxsharabayko force-pushed the develop/srctime-api branch 5 times, most recently from 3529935 to 47400a2 Compare June 23, 2020 14:47
docs/API-functions.md Outdated Show resolved Hide resolved
@maxsharabayko maxsharabayko force-pushed the develop/srctime-api branch 4 times, most recently from 1355122 to 554c429 Compare June 24, 2020 13:01
Copy link
Collaborator

@stevomatthews stevomatthews left a comment

Choose a reason for hiding this comment

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

Minor edits.

@maxsharabayko
Copy link
Collaborator Author

@stevomatthews Applied suggested changes.

@maxsharabayko maxsharabayko marked this pull request as ready for review June 24, 2020 17:25
@maxsharabayko maxsharabayko force-pushed the develop/srctime-api branch 5 times, most recently from 1e9151f to 8d00130 Compare June 25, 2020 07:50
Co-authored-by: Sektor van Skijlen <ethouris@gmail.com>
Co-authored-by: Steve Matthews <smatthews@haivision.com>
Copy link
Collaborator

@stevomatthews stevomatthews left a comment

Choose a reason for hiding this comment

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

Edits reviewed. All good.

@maxsharabayko maxsharabayko merged commit 2b3934d into Haivision:master Jun 25, 2020
@maxsharabayko maxsharabayko deleted the develop/srctime-api branch June 25, 2020 14:36
@mbakholdina mbakholdina modified the milestones: v1.5.0 - Sprint 17, v1.4.2 Oct 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[core] Area: Changes in SRT library core Type: Enhancement Indicates new feature requests
Projects
None yet
4 participants