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

Unified Diff: webrtc/modules/audio_coding/codecs/red/audio_encoder_copy_red.cc

Issue 1702943002: Pass ownership of external encoders to the ACM (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
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/red/audio_encoder_copy_red.cc
diff --git a/webrtc/modules/audio_coding/codecs/red/audio_encoder_copy_red.cc b/webrtc/modules/audio_coding/codecs/red/audio_encoder_copy_red.cc
index b5a124e43d31ea5e3e3bc2380ee9dc8582f29c31..4275f54103a52c8e8aa64957d78b34864b6fb3df 100644
--- a/webrtc/modules/audio_coding/codecs/red/audio_encoder_copy_red.cc
+++ b/webrtc/modules/audio_coding/codecs/red/audio_encoder_copy_red.cc
@@ -12,12 +12,23 @@
#include <string.h>
+#include <utility>
+
#include "webrtc/base/checks.h"
namespace webrtc {
-AudioEncoderCopyRed::AudioEncoderCopyRed(const Config& config)
- : speech_encoder_(config.speech_encoder),
+AudioEncoderCopyRed::Config::Config() = default;
+
+// TODO(kwiberg): =default this when Visual Studio learns to handle it.
+AudioEncoderCopyRed::Config::Config(Config&& c)
+ : payload_type(c.payload_type),
+ speech_encoder(std::move(c.speech_encoder)) {}
+
+AudioEncoderCopyRed::Config::~Config() = default;
+
+AudioEncoderCopyRed::AudioEncoderCopyRed(Config&& config)
+ : speech_encoder_(std::move(config.speech_encoder)),
red_payload_type_(config.payload_type) {
RTC_CHECK(speech_encoder_) << "Speech encoder not provided.";
}

Powered by Google App Engine
This is Rietveld 408576698