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

Unified Diff: webrtc/modules/audio_coding/codecs/isac/audio_encoder_isac_t.h

Issue 1821513003: Rent-A-Codec: Reference count the shared iSAC bandwidth estimation state (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@acm-13
Patch Set: Created 4 years, 9 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/isac/audio_encoder_isac_t.h
diff --git a/webrtc/modules/audio_coding/codecs/isac/audio_encoder_isac_t.h b/webrtc/modules/audio_coding/codecs/isac/audio_encoder_isac_t.h
index e840f3b1b186cbe839acbfa8c9cdc6ce70c4a9d3..0da8ed71d66d15e2c014bee891bc976971eaa322 100644
--- a/webrtc/modules/audio_coding/codecs/isac/audio_encoder_isac_t.h
+++ b/webrtc/modules/audio_coding/codecs/isac/audio_encoder_isac_t.h
@@ -13,6 +13,7 @@
#include <vector>
+#include "webrtc/base/scoped_ref_ptr.h"
#include "webrtc/modules/audio_coding/codecs/audio_encoder.h"
#include "webrtc/modules/audio_coding/codecs/isac/locked_bandwidth_info.h"
@@ -30,7 +31,7 @@ class AudioEncoderIsacT final : public AudioEncoder {
struct Config {
bool IsOk() const;
- LockedIsacBandwidthInfo* bwinfo = nullptr;
+ rtc::scoped_refptr<LockedIsacBandwidthInfo> bwinfo;
int payload_type = 103;
int sample_rate_hz = 16000;
@@ -50,8 +51,9 @@ class AudioEncoderIsacT final : public AudioEncoder {
};
explicit AudioEncoderIsacT(const Config& config);
- explicit AudioEncoderIsacT(const CodecInst& codec_inst,
- LockedIsacBandwidthInfo* bwinfo);
+ explicit AudioEncoderIsacT(
+ const CodecInst& codec_inst,
+ const rtc::scoped_refptr<LockedIsacBandwidthInfo>& bwinfo);
~AudioEncoderIsacT() override;
size_t MaxEncodedBytes() const override;
@@ -77,7 +79,7 @@ class AudioEncoderIsacT final : public AudioEncoder {
Config config_;
typename T::instance_type* isac_state_ = nullptr;
- LockedIsacBandwidthInfo* bwinfo_ = nullptr;
+ rtc::scoped_refptr<LockedIsacBandwidthInfo> bwinfo_;
// Have we accepted input but not yet emitted it in a packet?
bool packet_in_progress_ = false;

Powered by Google App Engine
This is Rietveld 408576698