| 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 1734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1745 } | 1745 } |
| 1746 | 1746 |
| 1747 { | 1747 { |
| 1748 rtc::CritScope cs(&_fileCritSect); | 1748 rtc::CritScope cs(&_fileCritSect); |
| 1749 | 1749 |
| 1750 if (output_file_player_) { | 1750 if (output_file_player_) { |
| 1751 output_file_player_->RegisterModuleFileCallback(NULL); | 1751 output_file_player_->RegisterModuleFileCallback(NULL); |
| 1752 output_file_player_.reset(); | 1752 output_file_player_.reset(); |
| 1753 } | 1753 } |
| 1754 | 1754 |
| 1755 output_file_player_ = FilePlayer::NewFilePlayer( | 1755 output_file_player_ = FilePlayer::CreateFilePlayer( |
| 1756 _outputFilePlayerId, (const FileFormats)format); | 1756 _outputFilePlayerId, (const FileFormats)format); |
| 1757 | 1757 |
| 1758 if (!output_file_player_) { | 1758 if (!output_file_player_) { |
| 1759 _engineStatisticsPtr->SetLastError( | 1759 _engineStatisticsPtr->SetLastError( |
| 1760 VE_INVALID_ARGUMENT, kTraceError, | 1760 VE_INVALID_ARGUMENT, kTraceError, |
| 1761 "StartPlayingFileLocally() filePlayer format is not correct"); | 1761 "StartPlayingFileLocally() filePlayer format is not correct"); |
| 1762 return -1; | 1762 return -1; |
| 1763 } | 1763 } |
| 1764 | 1764 |
| 1765 const uint32_t notificationTime(0); | 1765 const uint32_t notificationTime(0); |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1812 { | 1812 { |
| 1813 rtc::CritScope cs(&_fileCritSect); | 1813 rtc::CritScope cs(&_fileCritSect); |
| 1814 | 1814 |
| 1815 // Destroy the old instance | 1815 // Destroy the old instance |
| 1816 if (output_file_player_) { | 1816 if (output_file_player_) { |
| 1817 output_file_player_->RegisterModuleFileCallback(NULL); | 1817 output_file_player_->RegisterModuleFileCallback(NULL); |
| 1818 output_file_player_.reset(); | 1818 output_file_player_.reset(); |
| 1819 } | 1819 } |
| 1820 | 1820 |
| 1821 // Create the instance | 1821 // Create the instance |
| 1822 output_file_player_ = FilePlayer::NewFilePlayer( | 1822 output_file_player_ = FilePlayer::CreateFilePlayer( |
| 1823 _outputFilePlayerId, (const FileFormats)format); | 1823 _outputFilePlayerId, (const FileFormats)format); |
| 1824 | 1824 |
| 1825 if (!output_file_player_) { | 1825 if (!output_file_player_) { |
| 1826 _engineStatisticsPtr->SetLastError( | 1826 _engineStatisticsPtr->SetLastError( |
| 1827 VE_INVALID_ARGUMENT, kTraceError, | 1827 VE_INVALID_ARGUMENT, kTraceError, |
| 1828 "StartPlayingFileLocally() filePlayer format isnot correct"); | 1828 "StartPlayingFileLocally() filePlayer format isnot correct"); |
| 1829 return -1; | 1829 return -1; |
| 1830 } | 1830 } |
| 1831 | 1831 |
| 1832 const uint32_t notificationTime(0); | 1832 const uint32_t notificationTime(0); |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1940 return 0; | 1940 return 0; |
| 1941 } | 1941 } |
| 1942 | 1942 |
| 1943 // Destroy the old instance | 1943 // Destroy the old instance |
| 1944 if (input_file_player_) { | 1944 if (input_file_player_) { |
| 1945 input_file_player_->RegisterModuleFileCallback(NULL); | 1945 input_file_player_->RegisterModuleFileCallback(NULL); |
| 1946 input_file_player_.reset(); | 1946 input_file_player_.reset(); |
| 1947 } | 1947 } |
| 1948 | 1948 |
| 1949 // Create the instance | 1949 // Create the instance |
| 1950 input_file_player_ = FilePlayer::NewFilePlayer(_inputFilePlayerId, | 1950 input_file_player_ = FilePlayer::CreateFilePlayer(_inputFilePlayerId, |
| 1951 (const FileFormats)format); | 1951 (const FileFormats)format); |
| 1952 | 1952 |
| 1953 if (!input_file_player_) { | 1953 if (!input_file_player_) { |
| 1954 _engineStatisticsPtr->SetLastError( | 1954 _engineStatisticsPtr->SetLastError( |
| 1955 VE_INVALID_ARGUMENT, kTraceError, | 1955 VE_INVALID_ARGUMENT, kTraceError, |
| 1956 "StartPlayingFileAsMicrophone() filePlayer format isnot correct"); | 1956 "StartPlayingFileAsMicrophone() filePlayer format isnot correct"); |
| 1957 return -1; | 1957 return -1; |
| 1958 } | 1958 } |
| 1959 | 1959 |
| 1960 const uint32_t notificationTime(0); | 1960 const uint32_t notificationTime(0); |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2002 return 0; | 2002 return 0; |
| 2003 } | 2003 } |
| 2004 | 2004 |
| 2005 // Destroy the old instance | 2005 // Destroy the old instance |
| 2006 if (input_file_player_) { | 2006 if (input_file_player_) { |
| 2007 input_file_player_->RegisterModuleFileCallback(NULL); | 2007 input_file_player_->RegisterModuleFileCallback(NULL); |
| 2008 input_file_player_.reset(); | 2008 input_file_player_.reset(); |
| 2009 } | 2009 } |
| 2010 | 2010 |
| 2011 // Create the instance | 2011 // Create the instance |
| 2012 input_file_player_ = FilePlayer::NewFilePlayer(_inputFilePlayerId, | 2012 input_file_player_ = FilePlayer::CreateFilePlayer(_inputFilePlayerId, |
| 2013 (const FileFormats)format); | 2013 (const FileFormats)format); |
| 2014 | 2014 |
| 2015 if (!input_file_player_) { | 2015 if (!input_file_player_) { |
| 2016 _engineStatisticsPtr->SetLastError( | 2016 _engineStatisticsPtr->SetLastError( |
| 2017 VE_INVALID_ARGUMENT, kTraceError, | 2017 VE_INVALID_ARGUMENT, kTraceError, |
| 2018 "StartPlayingInputFile() filePlayer format isnot correct"); | 2018 "StartPlayingInputFile() filePlayer format isnot correct"); |
| 2019 return -1; | 2019 return -1; |
| 2020 } | 2020 } |
| 2021 | 2021 |
| 2022 const uint32_t notificationTime(0); | 2022 const uint32_t notificationTime(0); |
| (...skipping 1466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3489 int64_t min_rtt = 0; | 3489 int64_t min_rtt = 0; |
| 3490 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) != | 3490 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) != |
| 3491 0) { | 3491 0) { |
| 3492 return 0; | 3492 return 0; |
| 3493 } | 3493 } |
| 3494 return rtt; | 3494 return rtt; |
| 3495 } | 3495 } |
| 3496 | 3496 |
| 3497 } // namespace voe | 3497 } // namespace voe |
| 3498 } // namespace webrtc | 3498 } // namespace webrtc |
| OLD | NEW |