| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2011 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 11 matching lines...) Expand all Loading... |
| 22 namespace webrtc { | 22 namespace webrtc { |
| 23 | 23 |
| 24 class ActivityMonitor : public ACMVADCallback { | 24 class ActivityMonitor : public ACMVADCallback { |
| 25 public: | 25 public: |
| 26 ActivityMonitor(); | 26 ActivityMonitor(); |
| 27 int32_t InFrameType(FrameType frame_type); | 27 int32_t InFrameType(FrameType frame_type); |
| 28 void PrintStatistics(); | 28 void PrintStatistics(); |
| 29 void ResetStatistics(); | 29 void ResetStatistics(); |
| 30 void GetStatistics(uint32_t* stats); | 30 void GetStatistics(uint32_t* stats); |
| 31 private: | 31 private: |
| 32 // 0 - kFrameEmpty | 32 // 0 - kEmptyFrame |
| 33 // 1 - kAudioFrameSpeech | 33 // 1 - kAudioFrameSpeech |
| 34 // 2 - kAudioFrameCN | 34 // 2 - kAudioFrameCN |
| 35 // 3 - kVideoFrameKey (not used by audio) | 35 // 3 - kVideoFrameKey (not used by audio) |
| 36 // 4 - kVideoFrameDelta (not used by audio) | 36 // 4 - kVideoFrameDelta (not used by audio) |
| 37 uint32_t counter_[5]; | 37 uint32_t counter_[5]; |
| 38 }; | 38 }; |
| 39 | 39 |
| 40 | 40 |
| 41 // TestVadDtx is to verify that VAD/DTX perform as they should. It runs through | 41 // TestVadDtx is to verify that VAD/DTX perform as they should. It runs through |
| 42 // an audio file and check if the occurrence of various packet types follows | 42 // an audio file and check if the occurrence of various packet types follows |
| (...skipping 10 matching lines...) Expand all Loading... |
| 53 protected: | 53 protected: |
| 54 void RegisterCodec(CodecInst codec_param); | 54 void RegisterCodec(CodecInst codec_param); |
| 55 | 55 |
| 56 // Encoding a file and see if the numbers that various packets occur follow | 56 // Encoding a file and see if the numbers that various packets occur follow |
| 57 // the expectation. Saves result to a file. | 57 // the expectation. Saves result to a file. |
| 58 // expects[x] means | 58 // expects[x] means |
| 59 // -1 : do not care, | 59 // -1 : do not care, |
| 60 // 0 : there have been no packets of type |x|, | 60 // 0 : there have been no packets of type |x|, |
| 61 // 1 : there have been packets of type |x|, | 61 // 1 : there have been packets of type |x|, |
| 62 // with |x| indicates the following packet types | 62 // with |x| indicates the following packet types |
| 63 // 0 - kFrameEmpty | 63 // 0 - kEmptyFrame |
| 64 // 1 - kAudioFrameSpeech | 64 // 1 - kAudioFrameSpeech |
| 65 // 2 - kAudioFrameCN | 65 // 2 - kAudioFrameCN |
| 66 // 3 - kVideoFrameKey (not used by audio) | 66 // 3 - kVideoFrameKey (not used by audio) |
| 67 // 4 - kVideoFrameDelta (not used by audio) | 67 // 4 - kVideoFrameDelta (not used by audio) |
| 68 void Run(std::string in_filename, int frequency, int channels, | 68 void Run(std::string in_filename, int frequency, int channels, |
| 69 std::string out_filename, bool append, const int* expects); | 69 std::string out_filename, bool append, const int* expects); |
| 70 | 70 |
| 71 rtc::scoped_ptr<AudioCodingModule> acm_send_; | 71 rtc::scoped_ptr<AudioCodingModule> acm_send_; |
| 72 rtc::scoped_ptr<AudioCodingModule> acm_receive_; | 72 rtc::scoped_ptr<AudioCodingModule> acm_receive_; |
| 73 rtc::scoped_ptr<Channel> channel_; | 73 rtc::scoped_ptr<Channel> channel_; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 93 | 93 |
| 94 // TestOpusDtx is to verify that the Opus DTX performs as it should. | 94 // TestOpusDtx is to verify that the Opus DTX performs as it should. |
| 95 class TestOpusDtx final : public TestVadDtx { | 95 class TestOpusDtx final : public TestVadDtx { |
| 96 public: | 96 public: |
| 97 void Perform() override; | 97 void Perform() override; |
| 98 }; | 98 }; |
| 99 | 99 |
| 100 } // namespace webrtc | 100 } // namespace webrtc |
| 101 | 101 |
| 102 #endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_TESTVADDTX_H_ | 102 #endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_TESTVADDTX_H_ |
| OLD | NEW |