Skip to content
This repository was archived by the owner on Oct 25, 2024. It is now read-only.

Commit ccba81e

Browse files
authored
Enable stereo Opus for cloud gaming. (#181)
1 parent bd94d8f commit ccba81e

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

BUILD.gn

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,10 @@ config("common_config") {
478478
"/U_UNICODE",
479479
]
480480
}
481+
482+
if (owt_cloud_gaming) {
483+
defines += [ "OWT_CLOUD_GAMING" ]
484+
}
481485
}
482486

483487
config("common_objc") {

api/audio_codecs/opus/audio_decoder_opus.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ absl::optional<AudioDecoderOpus::Config> AudioDecoderOpus::SdpToConfig(
4444
return absl::nullopt; // Bad stereo parameter.
4545
}
4646
}
47+
#ifdef OWT_CLOUD_GAMING
48+
return 2;
49+
#endif
4750
return 1; // Default to mono.
4851
}();
4952
if (absl::EqualsIgnoreCase(format.name, "opus") &&

api/transport/bitrate_settings.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,11 @@ struct BitrateConstraints {
4242
int max_bitrate_bps = -1;
4343

4444
private:
45+
#ifdef OWT_CLOUD_GAMING
46+
static constexpr int kDefaultStartBitrateBps = 5000000;
47+
#else
4548
static constexpr int kDefaultStartBitrateBps = 300000;
49+
#endif
4650
};
4751

4852
} // namespace webrtc

0 commit comments

Comments
 (0)