Make AudioDecoder stateless
The channels_ member varable is removed from the base class, and the associated accessor function is changed to Channels() which is a pure virtual function. R=jmarusic@webrtc.org Review URL: https://webrtc-codereview.appspot.com/43779004 Cr-Commit-Position: refs/heads/master@{#8775} git-svn-id: http://webrtc.googlecode.com/svn/trunk@8775 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -31,6 +31,7 @@ class MockAudioDecoder : public AudioDecoder {
|
||||
MOCK_METHOD5(IncomingPacket, int(const uint8_t*, size_t, uint16_t, uint32_t,
|
||||
uint32_t));
|
||||
MOCK_METHOD0(ErrorCode, int());
|
||||
MOCK_CONST_METHOD0(Channels, size_t());
|
||||
MOCK_CONST_METHOD0(codec_type, NetEqDecoder());
|
||||
MOCK_METHOD1(CodecSupported, bool(NetEqDecoder));
|
||||
};
|
||||
|
||||
@ -41,6 +41,7 @@ class ExternalPcm16B : public AudioDecoder {
|
||||
*speech_type = ConvertSpeechType(1);
|
||||
return ret;
|
||||
}
|
||||
size_t Channels() const override { return 1; }
|
||||
|
||||
private:
|
||||
DISALLOW_COPY_AND_ASSIGN(ExternalPcm16B);
|
||||
|
||||
Reference in New Issue
Block a user