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

Commit f15ce96

Browse files
committed
Add port range setting to pcd factory
1 parent f1d2436 commit f15ce96

File tree

4 files changed

+20
-4
lines changed

4 files changed

+20
-4
lines changed

DEPS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ vars = {
5050
# chromium waterfalls. More info at: crbug.com/570091.
5151
'checkout_configuration': 'default',
5252
'checkout_instrumented_libraries': 'checkout_linux and checkout_configuration == "default"',
53-
'deps_webrtc_git': 'https://github.com/taste1981',
53+
'deps_webrtc_git': 'https://github.com/open-webrtc-toolkit',
5454
'chromium_revision': '56e883537df53a3b3cbc39c264799bedb695b5f9',
5555
'boringssl_git': 'https://boringssl.googlesource.com',
5656
# Three lines of non-changing comments so that

scripts/prepare_dev.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
('0013-Remove-unused-gni-for-av1-build.patch', THIRD_PARTY_PATH),
4545
('0014-Fix-missing-ffmpeg-configure-item-for-msvc-build.patch', FFMPEG_PATH),
4646
('0015-Remove-custom-d8-dependency.patch', BUILD_PATH),
47-
('0016-Remove-deprecated-create_srcjar-property.patch', THIRD_PARTY_PATH)
47+
('0016-Remove-deprecated-create_srcjar-property.patch', THIRD_PARTY_PATH),
4848
('0017-Build-libvpx-with-RTC-rate-control-impl-included.patch', THIRD_PARTY_PATH)
4949
]
5050

talk/owt/BUILD.gn

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,6 @@ static_library("owt_sdk_base") {
239239
"sdk/base/win/videorendererd3d11.h",
240240
"sdk/base/win/vp9ratecontrol.cc",
241241
"sdk/base/win/vp9ratecontrol.h",
242-
#"sdk/base/win/vp9temporallayers.cc",
243-
#"sdk/base/win/vp9temporallayers.h",
244242
"sdk/base/windowcapturer.cc",
245243
]
246244
public_deps += [ "//third_party/webrtc/modules/audio_device:audio_device_module_from_input_and_output" ]

talk/owt/sdk/base/peerconnectiondependencyfactory.cc

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,24 @@ PeerConnectionDependencyFactory::CreatePeerConnectionOnCurrentThread(
225225
std::unique_ptr<cricket::PortAllocator> port_allocator;
226226
port_allocator.reset(new cricket::BasicPortAllocator(
227227
network_manager_.get(), packet_socket_factory_.get()));
228+
// Handle port ranges.
229+
int audio_min, audio_max, video_min, video_max, screen_min, screen_max,
230+
data_min, data_max;
231+
GlobalConfiguration::GetPortRanges(audio_min, audio_max, video_min, video_max,
232+
screen_min, screen_max, data_min,
233+
data_max);
234+
if (audio_min > 0 && audio_max > audio_min) {
235+
port_allocator->SetAudioPortRange(audio_min, audio_max);
236+
}
237+
if (video_min > 0 && video_max > video_min) {
238+
port_allocator->SetVideoPortRange(video_min, video_max);
239+
}
240+
if (screen_min > 0 && screen_max > screen_min) {
241+
port_allocator->SetScreenPortRange(screen_min, screen_max);
242+
}
243+
if (data_min > 0 && data_max > data_min) {
244+
port_allocator->SetDataPortRange(data_min, data_max);
245+
}
228246
return (pc_factory_->CreatePeerConnection(config, std::move(port_allocator),
229247
nullptr, observer))
230248
.get();

0 commit comments

Comments
 (0)