Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(139)

Side by Side Diff: webrtc/modules/audio_coding/main/acm2/acm_send_test_oldapi.h

Issue 1322973004: Fold AudioEncoderMutable into AudioEncoder (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: review fixes Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_MAIN_ACM2_ACM_SEND_TEST_H_ 11 #ifndef WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_SEND_TEST_H_
12 #define WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_SEND_TEST_H_ 12 #define WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_SEND_TEST_H_
13 13
14 #include <vector> 14 #include <vector>
15 15
16 #include "webrtc/base/constructormagic.h" 16 #include "webrtc/base/constructormagic.h"
17 #include "webrtc/base/scoped_ptr.h" 17 #include "webrtc/base/scoped_ptr.h"
18 #include "webrtc/modules/audio_coding/main/interface/audio_coding_module.h" 18 #include "webrtc/modules/audio_coding/main/interface/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/interface/clock.h" 20 #include "webrtc/system_wrappers/interface/clock.h"
21 21
22 namespace webrtc { 22 namespace webrtc {
23 class AudioEncoderMutable; 23 class AudioEncoder;
24 24
25 namespace test { 25 namespace test {
26 class InputAudioFile; 26 class InputAudioFile;
27 class Packet; 27 class Packet;
28 28
29 class AcmSendTestOldApi : public AudioPacketizationCallback, 29 class AcmSendTestOldApi : public AudioPacketizationCallback,
30 public PacketSource { 30 public PacketSource {
31 public: 31 public:
32 AcmSendTestOldApi(InputAudioFile* audio_source, 32 AcmSendTestOldApi(InputAudioFile* audio_source,
33 int source_rate_hz, 33 int source_rate_hz,
34 int test_duration_ms); 34 int test_duration_ms);
35 virtual ~AcmSendTestOldApi() {} 35 virtual ~AcmSendTestOldApi() {}
36 36
37 // Registers the send codec. Returns true on success, false otherwise. 37 // Registers the send codec. Returns true on success, false otherwise.
38 bool RegisterCodec(const char* payload_name, 38 bool RegisterCodec(const char* payload_name,
39 int sampling_freq_hz, 39 int sampling_freq_hz,
40 int channels, 40 int channels,
41 int payload_type, 41 int payload_type,
42 int frame_size_samples); 42 int frame_size_samples);
43 43
44 // Registers an external send codec. Returns true on success, false otherwise. 44 // Registers an external send codec. Returns true on success, false otherwise.
45 bool RegisterExternalCodec(AudioEncoderMutable* external_speech_encoder); 45 bool RegisterExternalCodec(AudioEncoder* external_speech_encoder);
46 46
47 // Returns the next encoded packet. Returns NULL if the test duration was 47 // Returns the next encoded packet. Returns NULL if the test duration was
48 // exceeded. Ownership of the packet is handed over to the caller. 48 // exceeded. Ownership of the packet is handed over to the caller.
49 // Inherited from PacketSource. 49 // Inherited from PacketSource.
50 Packet* NextPacket(); 50 Packet* NextPacket();
51 51
52 // Inherited from AudioPacketizationCallback. 52 // Inherited from AudioPacketizationCallback.
53 int32_t SendData(FrameType frame_type, 53 int32_t SendData(FrameType frame_type,
54 uint8_t payload_type, 54 uint8_t payload_type,
55 uint32_t timestamp, 55 uint32_t timestamp,
(...skipping 26 matching lines...) Expand all
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 DISALLOW_COPY_AND_ASSIGN(AcmSendTestOldApi); 86 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_MAIN_ACM2_ACM_SEND_TEST_H_ 91 #endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_SEND_TEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698