OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright 2017 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2017 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
80 if (ret != static_cast<int>(packet->size())) { | 80 if (ret != static_cast<int>(packet->size())) { |
81 if (transport->GetError() == ENOTCONN) { | 81 if (transport->GetError() == ENOTCONN) { |
82 LOG(LS_WARNING) << "Got ENOTCONN from transport."; | 82 LOG(LS_WARNING) << "Got ENOTCONN from transport."; |
83 SetReadyToSend(rtcp, false); | 83 SetReadyToSend(rtcp, false); |
84 } | 84 } |
85 return false; | 85 return false; |
86 } | 86 } |
87 return true; | 87 return true; |
88 } | 88 } |
89 | 89 |
90 bool RtpTransport::HandlesPacket(const uint8_t* data, size_t len) { | |
91 return bundle_filter_.DemuxPacket(data, len); | |
92 } | |
93 | |
94 bool RtpTransport::HandlesPayloadType(int payload_type) { | |
95 return bundle_filter_.FindPayloadType(payload_type); | |
96 } | |
97 | |
98 void RtpTransport::AddHandledPayloadType(int payload_type) { | |
99 bundle_filter_.AddPayloadType(payload_type); | |
100 } | |
Taylor Brandstetter
2017/05/17 02:12:42
nit: newline
Zach Stein
2017/05/30 19:08:38
Done.
| |
90 PacketTransportInterface* RtpTransport::GetRtpPacketTransport() const { | 101 PacketTransportInterface* RtpTransport::GetRtpPacketTransport() const { |
91 return rtp_packet_transport_; | 102 return rtp_packet_transport_; |
92 } | 103 } |
93 | 104 |
94 PacketTransportInterface* RtpTransport::GetRtcpPacketTransport() const { | 105 PacketTransportInterface* RtpTransport::GetRtcpPacketTransport() const { |
95 return rtcp_packet_transport_; | 106 return rtcp_packet_transport_; |
96 } | 107 } |
97 | 108 |
98 RTCError RtpTransport::SetRtcpParameters(const RtcpParameters& parameters) { | 109 RTCError RtpTransport::SetRtcpParameters(const RtcpParameters& parameters) { |
99 if (rtcp_parameters_.mux && !parameters.mux) { | 110 if (rtcp_parameters_.mux && !parameters.mux) { |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
136 void RtpTransport::MaybeSignalReadyToSend() { | 147 void RtpTransport::MaybeSignalReadyToSend() { |
137 bool ready_to_send = | 148 bool ready_to_send = |
138 rtp_ready_to_send_ && (rtcp_ready_to_send_ || rtcp_mux_enabled_); | 149 rtp_ready_to_send_ && (rtcp_ready_to_send_ || rtcp_mux_enabled_); |
139 if (ready_to_send != ready_to_send_) { | 150 if (ready_to_send != ready_to_send_) { |
140 ready_to_send_ = ready_to_send; | 151 ready_to_send_ = ready_to_send; |
141 SignalReadyToSend(ready_to_send); | 152 SignalReadyToSend(ready_to_send); |
142 } | 153 } |
143 } | 154 } |
144 | 155 |
145 } // namespace webrtc | 156 } // namespace webrtc |
OLD | NEW |