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

Merging 5.5 into master #366

Merged
merged 23 commits into from
Dec 17, 2024
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
8808919
Fix unnecessary warnings about unregistered message handlers
Belchy06 Dec 10, 2024
45cd75a
Fixing linting
mcottontensor Dec 11, 2024
c04e565
Merge pull request #360 from EpicGamesExt/backport/UE5.5/pr-358
mcottontensor Dec 11, 2024
047d6d8
Add ability to select preferred streaming quality (low, med, high) wh…
Belchy06 Dec 10, 2024
6c5be33
Update quality option logic to handle VP9 SVC
Belchy06 Dec 10, 2024
30a9a0c
Removing dev changes
Belchy06 Dec 10, 2024
4108cd9
Update 'Settings Panel.md' with the new 'Preferred quality' option
Belchy06 Dec 10, 2024
cacb219
Fix linting and formatting errors
Belchy06 Dec 10, 2024
303f375
Resettiung the target values after testing it wasnt a needed change.
mcottontensor Dec 11, 2024
20ef4c1
Merge pull request #361 from EpicGamesExt/backport/UE5.5/pr-356
mcottontensor Dec 11, 2024
cb11fb2
Merge pull request #355 from mcottontensor/more_ts_options
mcottontensor Dec 11, 2024
e1e5ba1
Merge pull request #362 from mcottontensor/backport/UE5.5/pr-355
mcottontensor Dec 11, 2024
881207a
Fixing erroneous import for Flags
mcottontensor Dec 16, 2024
9ea8340
Merge pull request #365 from mcottontensor/backport/UE5.5/pr-364
mcottontensor Dec 16, 2024
c6e550e
Bumping common lib version
mcottontensor Dec 16, 2024
8a19ebd
Bumping signalling library version
mcottontensor Dec 16, 2024
dce85df
Updating package lock
mcottontensor Dec 16, 2024
0206f4f
Bumping frontend library version
mcottontensor Dec 16, 2024
0bf30f3
Bumping frontend ui-library version
mcottontensor Dec 16, 2024
79122a9
Bumping signalling server deps version
mcottontensor Dec 16, 2024
bfa3084
Bumping release version
mcottontensor Dec 16, 2024
f2f4964
Merge branch 'master' into 5.5-fixup
mcottontensor Dec 17, 2024
c5c6de0
Rebuilt package-lock
mcottontensor Dec 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update quality option logic to handle VP9 SVC
(cherry picked from commit 0c37387)
  • Loading branch information
Belchy06 committed Dec 11, 2024
commit 6c5be330ee94c857c5bda0b24c4ed183d84225cf
55 changes: 46 additions & 9 deletions Frontend/library/src/WebRtcPlayer/WebRtcPlayerController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ export class WebRtcPlayerController {
gamePadController: GamepadController;
coordinateConverter: InputCoordTranslator;
isUsingSFU: boolean;
isUsingSVC: boolean
isQualityController: boolean;
statsTimerHandle: number;
file: FileTemplate;
Expand Down Expand Up @@ -265,6 +266,7 @@ export class WebRtcPlayerController {
);

this.isUsingSFU = false;
this.isUsingSVC = false;
this.isQualityController = false;
this.preferredCodec = '';
this.enableAutoReconnect = true;
Expand All @@ -290,10 +292,19 @@ export class WebRtcPlayerController {
return;
}

// close the current peer connection and create a new one
let allQualities = this.config.getSettingOption(OptionParameters.PreferredQuality).options;
let qualityIndex = allQualities.indexOf(preferredQuality);
const message = MessageHelpers.createMessage(Messages.layerPreference, { spatialLayer: qualityIndex, temporalLayer: 0 });
let message;
if (this.isUsingSVC)
{
// User is using SVC so selected quality will be of the form SxTy(h). Just extract the x and y numbers
message = MessageHelpers.createMessage(Messages.layerPreference, { spatialLayer: +preferredQuality[1] - 1, temporalLayer: +preferredQuality[3] - 1 });
}
else
{
// User is not using SVC so the selected quality will be either Low, Medium or High so we extract the appropriate spatial layer index
let allQualities = this.config.getSettingOption(OptionParameters.PreferredQuality).options;
let qualityIndex = allQualities.indexOf(preferredQuality);
message = MessageHelpers.createMessage(Messages.layerPreference, { spatialLayer: qualityIndex, temporalLayer: 0 });
}
this.protocol.sendMessage(message);
});

Expand Down Expand Up @@ -1263,24 +1274,50 @@ export class WebRtcPlayerController {
Logger.Info(`Got offer sdp ${Offer.sdp}`);

this.isUsingSFU = Offer.sfu ? Offer.sfu : false;
if (this.isUsingSFU) {
this.isUsingSVC = Offer.scalabilityMode ? Offer.scalabilityMode != 'L1T1' : false;
if (this.isUsingSFU || this.isUsingSVC) {
// Disable negotiating with the sfu as the sfu only supports one codec at a time
this.peerConnectionController.preferredCodec = '';
}

// NOTE: These two settings configurations are done outside of an if(this.isUsingSFU) so that users
// can switch between a default and SFU stream and have the settings reconfigure appropriately


const scalabilityMode = Offer.scalabilityMode ? Offer.scalabilityMode : 'L1T1';
let availableQualities = [ "Default" ];
if (this.isUsingSFU)
{
if (!this.isUsingSVC)
{
// User is using an SFU without any temporal scalability. Just offer easily readable names
availableQualities = [ "Low", "Medium", "High" ];
}
else
{
// User is using SVC. Generate all available options.
availableQualities = [];
const maxSpatialLayers = +scalabilityMode[1];
const maxTemporalLayers = +scalabilityMode[3];
for (let s = 1; s <= maxSpatialLayers; s++)
{
for (let t = 1; t <= maxTemporalLayers; t++)
{
availableQualities.push(`S${s}T${t}`);
}
}
}
}

// Update the possible video quality options
this.config.setOptionSettingOptions(
OptionParameters.PreferredQuality,
this.isUsingSFU ? [ "Low", "Medium", "High" ] : [ "Default" ]
availableQualities
);

// Update the selected video quality
// Update the selected video quality with the highest possible resolution
this.config.setOptionSettingValue(
OptionParameters.PreferredQuality,
this.isUsingSFU ? "High" : "Default"
availableQualities.slice(-1)[0]
)

const sdpOffer: RTCSessionDescriptionInit = {
Expand Down