Remove deprecated AudioCodingModule::Destroy.
Have Channel hold a pointer rather than reference, and shorten the name. TESTED=trybots R=turaj@webrtc.org Review URL: https://webrtc-codereview.appspot.com/2256004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@4820 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@@ -49,7 +49,7 @@ class AcmReceiverTest : public AudioPacketizationCallback,
|
||||
|
||||
void SetUp() {
|
||||
ASSERT_TRUE(receiver_.get() != NULL);
|
||||
ASSERT_TRUE(acm_ != NULL);
|
||||
ASSERT_TRUE(acm_.get() != NULL);
|
||||
for (int n = 0; n < ACMCodecDB::kNumCodecs; n++) {
|
||||
ASSERT_EQ(0, ACMCodecDB::Codec(n, &codecs_[n]));
|
||||
}
|
||||
@@ -69,7 +69,6 @@ class AcmReceiverTest : public AudioPacketizationCallback,
|
||||
}
|
||||
|
||||
void TearDown() {
|
||||
AudioCodingModule::Destroy(acm_);
|
||||
}
|
||||
|
||||
void InsertOnePacketOfSilence(int codec_id) {
|
||||
@@ -145,7 +144,7 @@ class AcmReceiverTest : public AudioPacketizationCallback,
|
||||
|
||||
scoped_ptr<AcmReceiver> receiver_;
|
||||
CodecInst codecs_[ACMCodecDB::kMaxNumCodecs];
|
||||
AudioCodingModule* acm_;
|
||||
scoped_ptr<AudioCodingModule> acm_;
|
||||
WebRtcRTPHeader rtp_header_;
|
||||
uint32_t timestamp_;
|
||||
bool packet_sent_; // Set when SendData is called reset when inserting audio.
|
||||
|
||||
@@ -28,11 +28,6 @@ AudioCodingModule* AudioCodingModule::Create(int id, Clock* clock) {
|
||||
return new acm1::AudioCodingModuleImpl(id, clock);
|
||||
}
|
||||
|
||||
// Destroy module
|
||||
void AudioCodingModule::Destroy(AudioCodingModule* module) {
|
||||
delete module;
|
||||
}
|
||||
|
||||
// Get number of supported codecs
|
||||
int AudioCodingModule::NumberOfCodecs() {
|
||||
return ACMCodecDB::kNumCodecs;
|
||||
|
||||
@@ -82,16 +82,13 @@ class AudioCodingModule: public Module {
|
||||
// Creation and destruction of a ACM.
|
||||
//
|
||||
// The second method is used for testing where a simulated clock can be
|
||||
// injected into ACM. ACM will take the owner ship of the object clock and
|
||||
// injected into ACM. ACM will take the ownership of the object clock and
|
||||
// delete it when destroyed.
|
||||
//
|
||||
static AudioCodingModule* Create(int id);
|
||||
static AudioCodingModule* Create(int id, Clock* clock);
|
||||
virtual ~AudioCodingModule() {};
|
||||
|
||||
// TODO(ajm): Deprecated. Remove all calls to this unneeded method.
|
||||
static void Destroy(AudioCodingModule* module);
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// Utility functions
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user