| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 |
| 11 #ifndef WEBRTC_MODULES_AUDIO_CODING_ACM2_ACM_SEND_TEST_OLDAPI_H_ | 11 #ifndef WEBRTC_MODULES_AUDIO_CODING_ACM2_ACM_SEND_TEST_OLDAPI_H_ |
| 12 #define WEBRTC_MODULES_AUDIO_CODING_ACM2_ACM_SEND_TEST_OLDAPI_H_ | 12 #define WEBRTC_MODULES_AUDIO_CODING_ACM2_ACM_SEND_TEST_OLDAPI_H_ |
| 13 | 13 |
| 14 #include <memory> |
| 14 #include <vector> | 15 #include <vector> |
| 15 | 16 |
| 16 #include "webrtc/base/constructormagic.h" | 17 #include "webrtc/base/constructormagic.h" |
| 17 #include "webrtc/base/scoped_ptr.h" | |
| 18 #include "webrtc/modules/audio_coding/include/audio_coding_module.h" | 18 #include "webrtc/modules/audio_coding/include/audio_coding_module.h" |
| 19 #include "webrtc/modules/audio_coding/neteq/tools/packet_source.h" | 19 #include "webrtc/modules/audio_coding/neteq/tools/packet_source.h" |
| 20 #include "webrtc/system_wrappers/include/clock.h" | 20 #include "webrtc/system_wrappers/include/clock.h" |
| 21 | 21 |
| 22 namespace webrtc { | 22 namespace webrtc { |
| 23 class AudioEncoder; | 23 class AudioEncoder; |
| 24 | 24 |
| 25 namespace test { | 25 namespace test { |
| 26 class InputAudioFile; | 26 class InputAudioFile; |
| 27 class Packet; | 27 class Packet; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 | 61 |
| 62 private: | 62 private: |
| 63 static const int kBlockSizeMs = 10; | 63 static const int kBlockSizeMs = 10; |
| 64 | 64 |
| 65 // Creates a Packet object from the last packet produced by ACM (and received | 65 // Creates a Packet object from the last packet produced by ACM (and received |
| 66 // through the SendData method as a callback). Ownership of the new Packet | 66 // through the SendData method as a callback). Ownership of the new Packet |
| 67 // object is transferred to the caller. | 67 // object is transferred to the caller. |
| 68 Packet* CreatePacket(); | 68 Packet* CreatePacket(); |
| 69 | 69 |
| 70 SimulatedClock clock_; | 70 SimulatedClock clock_; |
| 71 rtc::scoped_ptr<AudioCodingModule> acm_; | 71 std::unique_ptr<AudioCodingModule> acm_; |
| 72 InputAudioFile* audio_source_; | 72 InputAudioFile* audio_source_; |
| 73 int source_rate_hz_; | 73 int source_rate_hz_; |
| 74 const size_t input_block_size_samples_; | 74 const size_t input_block_size_samples_; |
| 75 AudioFrame input_frame_; | 75 AudioFrame input_frame_; |
| 76 bool codec_registered_; | 76 bool codec_registered_; |
| 77 int test_duration_ms_; | 77 int test_duration_ms_; |
| 78 // The following member variables are set whenever SendData() is called. | 78 // The following member variables are set whenever SendData() is called. |
| 79 FrameType frame_type_; | 79 FrameType frame_type_; |
| 80 int payload_type_; | 80 int payload_type_; |
| 81 uint32_t timestamp_; | 81 uint32_t timestamp_; |
| 82 uint16_t sequence_number_; | 82 uint16_t sequence_number_; |
| 83 std::vector<uint8_t> last_payload_vec_; | 83 std::vector<uint8_t> last_payload_vec_; |
| 84 bool data_to_send_; | 84 bool data_to_send_; |
| 85 | 85 |
| 86 RTC_DISALLOW_COPY_AND_ASSIGN(AcmSendTestOldApi); | 86 RTC_DISALLOW_COPY_AND_ASSIGN(AcmSendTestOldApi); |
| 87 }; | 87 }; |
| 88 | 88 |
| 89 } // namespace test | 89 } // namespace test |
| 90 } // namespace webrtc | 90 } // namespace webrtc |
| 91 #endif // WEBRTC_MODULES_AUDIO_CODING_ACM2_ACM_SEND_TEST_OLDAPI_H_ | 91 #endif // WEBRTC_MODULES_AUDIO_CODING_ACM2_ACM_SEND_TEST_OLDAPI_H_ |
| OLD | NEW |