Convert CNG into C++ and remove it from AudioDecoder
Broke out CNG from AudioDecoder as they didn't really share an interface. Converted the CNG code to C++, to make initialization and resource handling easier. This includes several changes to the behavior, favoring RTC_CHECKs over returning error codes. Review URL: https://codereview.webrtc.org/1868143002 Cr-Commit-Position: refs/heads/master@{#12491}
This commit is contained in:
@ -14,7 +14,6 @@
|
||||
#include <stdlib.h> // NULL
|
||||
|
||||
#include "webrtc/base/constructormagic.h"
|
||||
#include "webrtc/modules/audio_coding/codecs/cng/webrtc_cng.h"
|
||||
#include "webrtc/typedefs.h"
|
||||
|
||||
namespace webrtc {
|
||||
@ -94,10 +93,6 @@ class AudioDecoder {
|
||||
// Returns true if the packet has FEC and false otherwise.
|
||||
virtual bool PacketHasFec(const uint8_t* encoded, size_t encoded_len) const;
|
||||
|
||||
// If this is a CNG decoder, return the underlying CNG_dec_inst*. If this
|
||||
// isn't a CNG decoder, don't call this method.
|
||||
virtual CNG_dec_inst* CngDecoderInstance();
|
||||
|
||||
virtual size_t Channels() const = 0;
|
||||
|
||||
protected:
|
||||
|
||||
Reference in New Issue
Block a user