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 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 voe::Channel* channel_ptr = ch.channel(); | 352 voe::Channel* channel_ptr = ch.channel(); |
353 if (channel_ptr == NULL) { | 353 if (channel_ptr == NULL) { |
354 _shared->SetLastError( | 354 _shared->SetLastError( |
355 VE_CHANNEL_NOT_VALID, kTraceError, | 355 VE_CHANNEL_NOT_VALID, kTraceError, |
356 "GetRemoteRTCPReportBlocks() failed to locate channel"); | 356 "GetRemoteRTCPReportBlocks() failed to locate channel"); |
357 return -1; | 357 return -1; |
358 } | 358 } |
359 return channel_ptr->GetRemoteRTCPReportBlocks(report_blocks); | 359 return channel_ptr->GetRemoteRTCPReportBlocks(report_blocks); |
360 } | 360 } |
361 | 361 |
362 int VoERTP_RTCPImpl::SetREDStatus(int channel, | |
363 bool enable, | |
364 int redPayloadtype) { | |
365 WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1), | |
366 "SetREDStatus(channel=%d, enable=%d, redPayloadtype=%d)", | |
367 channel, enable, redPayloadtype); | |
368 _shared->SetLastError(VE_FUNC_NOT_SUPPORTED, kTraceError, | |
369 "SetREDStatus() RED is not supported"); | |
370 return -1; | |
371 } | |
372 | |
373 int VoERTP_RTCPImpl::GetREDStatus(int channel, | |
374 bool& enabled, | |
375 int& redPayloadtype) { | |
376 _shared->SetLastError(VE_FUNC_NOT_SUPPORTED, kTraceError, | |
377 "GetREDStatus() RED is not supported"); | |
378 return -1; | |
379 } | |
380 | |
381 int VoERTP_RTCPImpl::SetNACKStatus(int channel, bool enable, int maxNoPackets) { | 362 int VoERTP_RTCPImpl::SetNACKStatus(int channel, bool enable, int maxNoPackets) { |
382 WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1), | 363 WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1), |
383 "SetNACKStatus(channel=%d, enable=%d, maxNoPackets=%d)", channel, | 364 "SetNACKStatus(channel=%d, enable=%d, maxNoPackets=%d)", channel, |
384 enable, maxNoPackets); | 365 enable, maxNoPackets); |
385 | 366 |
386 voe::ChannelOwner ch = _shared->channel_manager().GetChannel(channel); | 367 voe::ChannelOwner ch = _shared->channel_manager().GetChannel(channel); |
387 voe::Channel* channelPtr = ch.channel(); | 368 voe::Channel* channelPtr = ch.channel(); |
388 if (channelPtr == NULL) { | 369 if (channelPtr == NULL) { |
389 _shared->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError, | 370 _shared->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError, |
390 "SetNACKStatus() failed to locate channel"); | 371 "SetNACKStatus() failed to locate channel"); |
391 return -1; | 372 return -1; |
392 } | 373 } |
393 channelPtr->SetNACKStatus(enable, maxNoPackets); | 374 channelPtr->SetNACKStatus(enable, maxNoPackets); |
394 return 0; | 375 return 0; |
395 } | 376 } |
396 | 377 |
397 #endif // #ifdef WEBRTC_VOICE_ENGINE_RTP_RTCP_API | 378 #endif // #ifdef WEBRTC_VOICE_ENGINE_RTP_RTCP_API |
398 | 379 |
399 } // namespace webrtc | 380 } // namespace webrtc |
OLD | NEW |