-
Notifications
You must be signed in to change notification settings - Fork 118
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
Add: Latency measurements such as sender to receiver latency measurements using RTP header extensions abs-capture-time and video-timing #425
Merged
Merged
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
b9e12d2
Add sending abs-capture-time in JS streamer and a test
lukehb fc83cee
Add some comments
lukehb b950af3
Added extra commenting
lukehb 47398a8
Added SDPUtils to /Common
lukehb 4a3d131
Working state
lukehb cfcbdf9
Added test to check if abs-capture-time is in offer/answer when flag …
lukehb cf1cf95
Update JSStreamer dockerfile to build using local files. Speed up bui…
lukehb 911ead6
Added SDP offer/remote description set event to PixelStreaming API
lukehb 1f5b9f8
Connect new latency calculation API to stats panel
lukehb e15961a
Added latency info to tests, fixed linting
lukehb 56ae963
Fix failing unit test
lukehb 8ef4748
Fix linting
lukehb 6e85d66
Attempt to fix test race condition through explicitly adding listener…
lukehb 47f041c
Attempt to update playwright version used in minimal stream tester
lukehb 514089c
Remove problematic test teardown when test was skipped
lukehb 2c47b94
Add extra info step to streaming CI job to help diagnose CI failures
lukehb ee4edc2
Iterating on what to log
lukehb 4f1ea36
Attempt to revert some load bearing changes and add logging to stream…
lukehb df82e74
Move to using latest minimal streamer release
lukehb c5c46e0
Disable header extension for Firefox as it causes it to not connect
lukehb 4b4db38
Made code more exclusive of Firefox weirdness
lukehb 1833e62
Linting fix
lukehb 1e707f5
Merge branch 'master' into capture-time
lukehb 989a62a
Fixing linting error
lukehb 701c265
Tided up how latency stats are displayed in stats panel
lukehb e00a2e5
Apply suggestions from code review
lukehb 0b48276
Merge branch 'master' into capture-time
lukehb 3314c9c
Merge branch 'master' into capture-time
lukehb 070bbf8
Fix failing CI for build:esm job
lukehb ee5d7bd
Made it clearer whether video timing or abs-capture-time is used
lukehb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,11 +60,11 @@ jobs: | |
uses: robinraju/release-downloader@v1 | ||
with: | ||
repository: 'EpicGamesExt/PixelStreamingInfrastructure' | ||
tag: 'minimal-streamer' | ||
fileName: 'Minimal-PixelStreamer-5.5.7z' | ||
tag: 'minimal-streamer-5.5' | ||
fileName: 'Minimal-PixelStreamer-5.5-Win64-Development.7z' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Upgraded to using our latest minimal streamer release, as the other one was a bit out of date now. |
||
|
||
- name: Extract streamer | ||
run: 7z x -oStreamer Minimal-PixelStreamer-5.5.7z | ||
run: 7z x -oStreamer Minimal-PixelStreamer-5.5-Win64-Development.7z | ||
|
||
- name: Build Common | ||
working-directory: Common | ||
|
@@ -109,7 +109,7 @@ jobs: | |
|
||
- name: Run Streamer | ||
working-directory: Streamer | ||
run: Start-Process ".\Minimal\Binaries\Win64\Minimal-Win64-Shipping-Cmd.exe" -ArgumentList "-warp","-dx12","-windowed","-res=1920","-resy=720","-PixelStreamingURL=ws://localhost:8888","-RenderOffScreen","-AllowSoftwaRerendering","-PixelStreamingEncoderCodec=vp8" | ||
run: Start-Process ".\Minimal\Binaries\Win64\Minimal-Cmd.exe" -ArgumentList "-warp","-dx12","-windowed","-resx=1920","-resy=720","-PixelStreamingURL=ws://localhost:8888","-RenderOffScreen","-AllowSoftwareRendering","-PixelStreamingEncoderCodec=vp8", "-Log=Minimal.log" | ||
|
||
- name: Prepare test | ||
working-directory: Extras\MinimalStreamTester | ||
|
@@ -121,9 +121,14 @@ jobs: | |
- name: Wait for signalling to come up | ||
run: curl --retry 10 --retry-delay 20 --retry-connrefused http://localhost:999/api/status | ||
|
||
|
||
lukehb marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- name: Wait for streamer to come up | ||
run: curl --retry 10 --retry-delay 20 --retry-connrefused http://localhost:999/api/streamers/DefaultStreamer | ||
|
||
- name: Output streamer logs | ||
working-directory: Streamer | ||
run: ls ".\Minimal\" && Test-Path ".\Minimal\Saved\Logs\Minimal.log" && cat ".\Minimal\Saved\Logs\Minimal.log" | ||
|
||
mcottontensor marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- name: Test if we can stream | ||
working-directory: Extras\MinimalStreamTester | ||
run: | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// Copyright Epic Games, Inc. All Rights Reserved. | ||
|
||
export class SDPUtils { | ||
static addVideoHeaderExtensionToSdp(sdp: string, uri: string): string { | ||
// Find the highest used header extension id by sorting the extension ids used, | ||
// eliminating duplicates and adding one. | ||
// Todo: Update this when WebRTC in Chrome supports the header extension API. | ||
const usedIds = sdp | ||
.split('\n') | ||
.filter((line) => line.startsWith('a=extmap:')) | ||
.map((line) => parseInt(line.split(' ')[0].substring(9), 10)) | ||
.sort((a, b) => a - b) | ||
.filter((item, index, array) => array.indexOf(item) === index); | ||
const nextId = usedIds[usedIds.length - 1] + 1; | ||
const extmapLine = 'a=extmap:' + nextId + ' ' + uri + '\r\n'; | ||
|
||
const sections = sdp.split('\nm=').map((part, index) => { | ||
return (index > 0 ? 'm=' + part : part).trim() + '\r\n'; | ||
}); | ||
const sessionPart = sections.shift(); | ||
// Only add extension to m=video media section | ||
return ( | ||
sessionPart + | ||
sections | ||
.map((mediaSection) => | ||
mediaSection.startsWith('m=video') ? mediaSection + extmapLine : mediaSection | ||
) | ||
.join('') | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added this step to the CI, as this was actually broken and not being caught.