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

Commit 575157c

Browse files
authored
More android build fixes with DiffServ. (#140)
1 parent 8c0fe16 commit 575157c

File tree

4 files changed

+21
-2
lines changed

4 files changed

+21
-2
lines changed

p2p/base/dtls_transport_internal.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,6 @@ class DtlsTransportInternal : public rtc::PacketTransportInternal {
6666

6767
virtual DtlsTransportState dtls_state() const = 0;
6868

69-
virtual cricket::MediaType media_type() const = 0;
70-
7169
virtual int component() const = 0;
7270

7371
virtual bool IsDtlsActive() const = 0;

p2p/client/basic_port_allocator.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1250,6 +1250,7 @@ void AllocationSequence::Init() {
12501250
case cricket::MediaType::MEDIA_TYPE_DATA:
12511251
min_port = session_->allocator_->min_data_port();
12521252
max_port = session_->allocator_->max_data_port();
1253+
break;
12531254
case cricket::MediaType::MEDIA_TYPE_SCREEN:
12541255
min_port = session_->allocator_->min_screen_port();
12551256
max_port = session_->allocator_->max_screen_port();
@@ -1448,6 +1449,7 @@ void AllocationSequence::CreateUDPPorts() {
14481449
case cricket::MediaType::MEDIA_TYPE_DATA:
14491450
min_port = session_->allocator_->min_data_port();
14501451
max_port = session_->allocator_->max_data_port();
1452+
break;
14511453
case cricket::MediaType::MEDIA_TYPE_SCREEN:
14521454
min_port = session_->allocator_->min_screen_port();
14531455
max_port = session_->allocator_->max_screen_port();
@@ -1504,6 +1506,7 @@ void AllocationSequence::CreateTCPPorts() {
15041506
case cricket::MediaType::MEDIA_TYPE_DATA:
15051507
min_port = session_->allocator_->min_data_port();
15061508
max_port = session_->allocator_->max_data_port();
1509+
break;
15071510
case cricket::MediaType::MEDIA_TYPE_SCREEN:
15081511
min_port = session_->allocator_->min_screen_port();
15091512
max_port = session_->allocator_->max_screen_port();
@@ -1552,6 +1555,7 @@ void AllocationSequence::CreateStunPorts() {
15521555
case cricket::MediaType::MEDIA_TYPE_DATA:
15531556
min_port = session_->allocator_->min_data_port();
15541557
max_port = session_->allocator_->max_data_port();
1558+
break;
15551559
case cricket::MediaType::MEDIA_TYPE_SCREEN:
15561560
min_port = session_->allocator_->min_screen_port();
15571561
max_port = session_->allocator_->max_screen_port();
@@ -1663,6 +1667,7 @@ void AllocationSequence::CreateTurnPort(const RelayServerConfig& config) {
16631667
case cricket::MediaType::MEDIA_TYPE_DATA:
16641668
min_port = session_->allocator_->min_data_port();
16651669
max_port = session_->allocator_->max_data_port();
1670+
break;
16661671
case cricket::MediaType::MEDIA_TYPE_SCREEN:
16671672
min_port = session_->allocator_->min_screen_port();
16681673
max_port = session_->allocator_->max_screen_port();

pc/peer_connection_factory.cc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,13 @@ RtpCapabilities PeerConnectionFactory::GetRtpSenderCapabilities(
136136
cricket_codecs,
137137
channel_manager()->GetDefaultEnabledVideoRtpHeaderExtensions());
138138
}
139+
case cricket::MEDIA_TYPE_SCREEN: {
140+
cricket::VideoCodecs cricket_codecs;
141+
channel_manager()->GetSupportedVideoSendCodecs(&cricket_codecs);
142+
return ToRtpCapabilities(
143+
cricket_codecs,
144+
channel_manager()->GetDefaultEnabledVideoRtpHeaderExtensions());
145+
}
139146
case cricket::MEDIA_TYPE_DATA:
140147
return RtpCapabilities();
141148
case cricket::MEDIA_TYPE_UNSUPPORTED:
@@ -162,6 +169,13 @@ RtpCapabilities PeerConnectionFactory::GetRtpReceiverCapabilities(
162169
cricket_codecs,
163170
channel_manager()->GetDefaultEnabledVideoRtpHeaderExtensions());
164171
}
172+
case cricket::MEDIA_TYPE_SCREEN: {
173+
cricket::VideoCodecs cricket_codecs;
174+
channel_manager()->GetSupportedVideoReceiveCodecs(&cricket_codecs);
175+
return ToRtpCapabilities(
176+
cricket_codecs,
177+
channel_manager()->GetDefaultEnabledVideoRtpHeaderExtensions());
178+
}
165179
case cricket::MEDIA_TYPE_DATA:
166180
return RtpCapabilities();
167181
case cricket::MEDIA_TYPE_UNSUPPORTED:

pc/sdp_offer_answer.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,8 @@ static absl::string_view GetDefaultMidForPlanB(cricket::MediaType media_type) {
568568
return cricket::CN_VIDEO;
569569
case cricket::MEDIA_TYPE_DATA:
570570
return cricket::CN_DATA;
571+
case cricket::MEDIA_TYPE_SCREEN:
572+
return cricket::CN_VIDEO;
571573
case cricket::MEDIA_TYPE_UNSUPPORTED:
572574
return "not supported";
573575
}

0 commit comments

Comments
 (0)