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

Unified Diff: webrtc/modules/audio_coding/codecs/g722/include/audio_encoder_g722.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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_coding/codecs/g722/include/audio_encoder_g722.h
diff --git a/webrtc/modules/audio_coding/codecs/g722/include/audio_encoder_g722.h b/webrtc/modules/audio_coding/codecs/g722/include/audio_encoder_g722.h
index 1f36facd66f1a50068d3c770a5bb83902227ac61..36f809a9dd837f29b1d47aa3c476159f80a60bb5 100644
--- a/webrtc/modules/audio_coding/codecs/g722/include/audio_encoder_g722.h
+++ b/webrtc/modules/audio_coding/codecs/g722/include/audio_encoder_g722.h
@@ -14,28 +14,29 @@
#include "webrtc/base/buffer.h"
#include "webrtc/base/scoped_ptr.h"
#include "webrtc/modules/audio_coding/codecs/audio_encoder.h"
-#include "webrtc/modules/audio_coding/codecs/audio_encoder_mutable_impl.h"
#include "webrtc/modules/audio_coding/codecs/g722/include/g722_interface.h"
namespace webrtc {
+struct CodecInst;
+
class AudioEncoderG722 final : public AudioEncoder {
public:
struct Config {
- Config() : payload_type(9), frame_size_ms(20), num_channels(1) {}
bool IsOk() const;
- int payload_type;
- int frame_size_ms;
- int num_channels;
+ int payload_type = 9;
+ int frame_size_ms = 20;
+ int num_channels = 1;
};
explicit AudioEncoderG722(const Config& config);
+ explicit AudioEncoderG722(const CodecInst& codec_inst);
~AudioEncoderG722() override;
+ size_t MaxEncodedBytes() const override;
int SampleRateHz() const override;
int NumChannels() const override;
- size_t MaxEncodedBytes() const override;
int RtpTimestampRateHz() const override;
size_t Num10MsFramesInNextPacket() const override;
size_t Max10MsFramesInAPacket() const override;
@@ -44,6 +45,7 @@ class AudioEncoderG722 final : public AudioEncoder {
const int16_t* audio,
size_t max_encoded_bytes,
uint8_t* encoded) override;
+ void Reset() override;
private:
// The encoder state for one channel.
@@ -66,13 +68,5 @@ class AudioEncoderG722 final : public AudioEncoder {
rtc::Buffer interleave_buffer_;
};
-struct CodecInst;
-
-class AudioEncoderMutableG722
- : public AudioEncoderMutableImpl<AudioEncoderG722> {
- public:
- explicit AudioEncoderMutableG722(const CodecInst& codec_inst);
-};
-
} // namespace webrtc
#endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_G722_INCLUDE_AUDIO_ENCODER_G722_H_

Powered by Google App Engine
This is Rietveld 408576698