Wrap ACM2 code inside acm2 namespace. This gurantees that one ACM would not use components of others by accident.
BUG= R=minyue@webrtc.org Review URL: https://webrtc-codereview.appspot.com/2344004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@4933 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -27,6 +27,7 @@ namespace webrtc {
|
||||
|
||||
// forward declaration
|
||||
struct CodecInst;
|
||||
struct WebRtcACMCodecParams;
|
||||
|
||||
namespace acm1 {
|
||||
|
||||
|
||||
@ -3002,12 +3002,13 @@ int AudioCodingModuleImpl::LeastRequiredDelayMs() const {
|
||||
|
||||
int AudioCodingModuleImpl::EnableNack(size_t max_nack_list_size) {
|
||||
// Don't do anything if |max_nack_list_size| is out of range.
|
||||
if (max_nack_list_size == 0 || max_nack_list_size > Nack::kNackListSizeLimit)
|
||||
if (max_nack_list_size == 0 ||
|
||||
max_nack_list_size > acm2::Nack::kNackListSizeLimit)
|
||||
return -1;
|
||||
|
||||
CriticalSectionScoped lock(acm_crit_sect_);
|
||||
if (!nack_enabled_) {
|
||||
nack_.reset(Nack::Create(kNackThresholdPackets));
|
||||
nack_.reset(acm2::Nack::Create(kNackThresholdPackets));
|
||||
nack_enabled_ = true;
|
||||
|
||||
// Sampling rate might need to be updated if we change from disable to
|
||||
|
||||
@ -28,7 +28,10 @@ struct WebRtcACMCodecParams;
|
||||
class CriticalSectionWrapper;
|
||||
class RWLockWrapper;
|
||||
class Clock;
|
||||
|
||||
namespace acm2 {
|
||||
class Nack;
|
||||
}
|
||||
|
||||
namespace acm1 {
|
||||
|
||||
@ -437,7 +440,7 @@ class AudioCodingModuleImpl : public AudioCodingModule {
|
||||
int64_t last_receive_timestamp_;
|
||||
|
||||
Clock* clock_;
|
||||
scoped_ptr<Nack> nack_;
|
||||
scoped_ptr<acm2::Nack> nack_;
|
||||
bool nack_enabled_;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user