OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 voe::ChannelOwner ch = _shared->channel_manager().GetChannel(channel); | 77 voe::ChannelOwner ch = _shared->channel_manager().GetChannel(channel); |
78 voe::Channel* channelPtr = ch.channel(); | 78 voe::Channel* channelPtr = ch.channel(); |
79 if (!channelPtr) { | 79 if (!channelPtr) { |
80 LOG_F(LS_ERROR) << "Failed to locate channel: " << channel; | 80 LOG_F(LS_ERROR) << "Failed to locate channel: " << channel; |
81 return -1; | 81 return -1; |
82 } | 82 } |
83 if (!channelPtr->ExternalTransport()) { | 83 if (!channelPtr->ExternalTransport()) { |
84 LOG_F(LS_ERROR) << "No external transport for channel: " << channel; | 84 LOG_F(LS_ERROR) << "No external transport for channel: " << channel; |
85 return -1; | 85 return -1; |
86 } | 86 } |
| 87 // TODO(nisse): Is this code going to be deleted? If not, it needs |
| 88 // to parse the packet here since ReceivedRTPPacket is replaced by |
| 89 // OnRtpPacket. |
| 90 return false; |
| 91 #if 0 |
87 return channelPtr->ReceivedRTPPacket(static_cast<const uint8_t*>(data), | 92 return channelPtr->ReceivedRTPPacket(static_cast<const uint8_t*>(data), |
88 length, packet_time); | 93 length, packet_time); |
| 94 #endif |
89 } | 95 } |
90 | 96 |
91 int VoENetworkImpl::ReceivedRTCPPacket(int channel, | 97 int VoENetworkImpl::ReceivedRTCPPacket(int channel, |
92 const void* data, | 98 const void* data, |
93 size_t length) { | 99 size_t length) { |
94 RTC_CHECK(_shared->statistics().Initialized()); | 100 RTC_CHECK(_shared->statistics().Initialized()); |
95 RTC_CHECK(data); | 101 RTC_CHECK(data); |
96 if (length < 4) { | 102 if (length < 4) { |
97 LOG_F(LS_ERROR) << "Invalid packet length: " << length; | 103 LOG_F(LS_ERROR) << "Invalid packet length: " << length; |
98 return -1; | 104 return -1; |
99 } | 105 } |
100 voe::ChannelOwner ch = _shared->channel_manager().GetChannel(channel); | 106 voe::ChannelOwner ch = _shared->channel_manager().GetChannel(channel); |
101 voe::Channel* channelPtr = ch.channel(); | 107 voe::Channel* channelPtr = ch.channel(); |
102 if (!channelPtr) { | 108 if (!channelPtr) { |
103 LOG_F(LS_ERROR) << "Failed to locate channel: " << channel; | 109 LOG_F(LS_ERROR) << "Failed to locate channel: " << channel; |
104 return -1; | 110 return -1; |
105 } | 111 } |
106 if (!channelPtr->ExternalTransport()) { | 112 if (!channelPtr->ExternalTransport()) { |
107 LOG_F(LS_ERROR) << "No external transport for channel: " << channel; | 113 LOG_F(LS_ERROR) << "No external transport for channel: " << channel; |
108 return -1; | 114 return -1; |
109 } | 115 } |
110 return channelPtr->ReceivedRTCPPacket(static_cast<const uint8_t*>(data), | 116 return channelPtr->ReceivedRTCPPacket(static_cast<const uint8_t*>(data), |
111 length); | 117 length); |
112 } | 118 } |
113 | 119 |
114 } // namespace webrtc | 120 } // namespace webrtc |
OLD | NEW |