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 1747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1758 } | 1758 } |
1759 | 1759 |
1760 { | 1760 { |
1761 rtc::CritScope cs(&_fileCritSect); | 1761 rtc::CritScope cs(&_fileCritSect); |
1762 | 1762 |
1763 if (output_file_player_) { | 1763 if (output_file_player_) { |
1764 output_file_player_->RegisterModuleFileCallback(NULL); | 1764 output_file_player_->RegisterModuleFileCallback(NULL); |
1765 output_file_player_.reset(); | 1765 output_file_player_.reset(); |
1766 } | 1766 } |
1767 | 1767 |
1768 output_file_player_ = FilePlayer::NewFilePlayer( | 1768 output_file_player_ = FilePlayer::CreateFilePlayer( |
1769 _outputFilePlayerId, (const FileFormats)format); | 1769 _outputFilePlayerId, (const FileFormats)format); |
1770 | 1770 |
1771 if (!output_file_player_) { | 1771 if (!output_file_player_) { |
1772 _engineStatisticsPtr->SetLastError( | 1772 _engineStatisticsPtr->SetLastError( |
1773 VE_INVALID_ARGUMENT, kTraceError, | 1773 VE_INVALID_ARGUMENT, kTraceError, |
1774 "StartPlayingFileLocally() filePlayer format is not correct"); | 1774 "StartPlayingFileLocally() filePlayer format is not correct"); |
1775 return -1; | 1775 return -1; |
1776 } | 1776 } |
1777 | 1777 |
1778 const uint32_t notificationTime(0); | 1778 const uint32_t notificationTime(0); |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1825 { | 1825 { |
1826 rtc::CritScope cs(&_fileCritSect); | 1826 rtc::CritScope cs(&_fileCritSect); |
1827 | 1827 |
1828 // Destroy the old instance | 1828 // Destroy the old instance |
1829 if (output_file_player_) { | 1829 if (output_file_player_) { |
1830 output_file_player_->RegisterModuleFileCallback(NULL); | 1830 output_file_player_->RegisterModuleFileCallback(NULL); |
1831 output_file_player_.reset(); | 1831 output_file_player_.reset(); |
1832 } | 1832 } |
1833 | 1833 |
1834 // Create the instance | 1834 // Create the instance |
1835 output_file_player_ = FilePlayer::NewFilePlayer( | 1835 output_file_player_ = FilePlayer::CreateFilePlayer( |
1836 _outputFilePlayerId, (const FileFormats)format); | 1836 _outputFilePlayerId, (const FileFormats)format); |
1837 | 1837 |
1838 if (!output_file_player_) { | 1838 if (!output_file_player_) { |
1839 _engineStatisticsPtr->SetLastError( | 1839 _engineStatisticsPtr->SetLastError( |
1840 VE_INVALID_ARGUMENT, kTraceError, | 1840 VE_INVALID_ARGUMENT, kTraceError, |
1841 "StartPlayingFileLocally() filePlayer format isnot correct"); | 1841 "StartPlayingFileLocally() filePlayer format isnot correct"); |
1842 return -1; | 1842 return -1; |
1843 } | 1843 } |
1844 | 1844 |
1845 const uint32_t notificationTime(0); | 1845 const uint32_t notificationTime(0); |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1953 return 0; | 1953 return 0; |
1954 } | 1954 } |
1955 | 1955 |
1956 // Destroy the old instance | 1956 // Destroy the old instance |
1957 if (input_file_player_) { | 1957 if (input_file_player_) { |
1958 input_file_player_->RegisterModuleFileCallback(NULL); | 1958 input_file_player_->RegisterModuleFileCallback(NULL); |
1959 input_file_player_.reset(); | 1959 input_file_player_.reset(); |
1960 } | 1960 } |
1961 | 1961 |
1962 // Create the instance | 1962 // Create the instance |
1963 input_file_player_ = FilePlayer::NewFilePlayer(_inputFilePlayerId, | 1963 input_file_player_ = FilePlayer::CreateFilePlayer(_inputFilePlayerId, |
1964 (const FileFormats)format); | 1964 (const FileFormats)format); |
1965 | 1965 |
1966 if (!input_file_player_) { | 1966 if (!input_file_player_) { |
1967 _engineStatisticsPtr->SetLastError( | 1967 _engineStatisticsPtr->SetLastError( |
1968 VE_INVALID_ARGUMENT, kTraceError, | 1968 VE_INVALID_ARGUMENT, kTraceError, |
1969 "StartPlayingFileAsMicrophone() filePlayer format isnot correct"); | 1969 "StartPlayingFileAsMicrophone() filePlayer format isnot correct"); |
1970 return -1; | 1970 return -1; |
1971 } | 1971 } |
1972 | 1972 |
1973 const uint32_t notificationTime(0); | 1973 const uint32_t notificationTime(0); |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2015 return 0; | 2015 return 0; |
2016 } | 2016 } |
2017 | 2017 |
2018 // Destroy the old instance | 2018 // Destroy the old instance |
2019 if (input_file_player_) { | 2019 if (input_file_player_) { |
2020 input_file_player_->RegisterModuleFileCallback(NULL); | 2020 input_file_player_->RegisterModuleFileCallback(NULL); |
2021 input_file_player_.reset(); | 2021 input_file_player_.reset(); |
2022 } | 2022 } |
2023 | 2023 |
2024 // Create the instance | 2024 // Create the instance |
2025 input_file_player_ = FilePlayer::NewFilePlayer(_inputFilePlayerId, | 2025 input_file_player_ = FilePlayer::CreateFilePlayer(_inputFilePlayerId, |
2026 (const FileFormats)format); | 2026 (const FileFormats)format); |
2027 | 2027 |
2028 if (!input_file_player_) { | 2028 if (!input_file_player_) { |
2029 _engineStatisticsPtr->SetLastError( | 2029 _engineStatisticsPtr->SetLastError( |
2030 VE_INVALID_ARGUMENT, kTraceError, | 2030 VE_INVALID_ARGUMENT, kTraceError, |
2031 "StartPlayingInputFile() filePlayer format isnot correct"); | 2031 "StartPlayingInputFile() filePlayer format isnot correct"); |
2032 return -1; | 2032 return -1; |
2033 } | 2033 } |
2034 | 2034 |
2035 const uint32_t notificationTime(0); | 2035 const uint32_t notificationTime(0); |
(...skipping 1530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3566 int64_t min_rtt = 0; | 3566 int64_t min_rtt = 0; |
3567 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) != | 3567 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) != |
3568 0) { | 3568 0) { |
3569 return 0; | 3569 return 0; |
3570 } | 3570 } |
3571 return rtt; | 3571 return rtt; |
3572 } | 3572 } |
3573 | 3573 |
3574 } // namespace voe | 3574 } // namespace voe |
3575 } // namespace webrtc | 3575 } // namespace webrtc |
OLD | NEW |