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

Side by Side Diff: webrtc/modules/audio_coding/codecs/red/audio_encoder_copy_red.cc

Issue 1891483006: We no longer use compilers that can't =default move construction and assignment (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « webrtc/modules/audio_coding/codecs/cng/audio_encoder_cng.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #include "webrtc/modules/audio_coding/codecs/red/audio_encoder_copy_red.h" 11 #include "webrtc/modules/audio_coding/codecs/red/audio_encoder_copy_red.h"
12 12
13 #include <string.h> 13 #include <string.h>
14 14
15 #include <utility> 15 #include <utility>
16 16
17 #include "webrtc/base/checks.h" 17 #include "webrtc/base/checks.h"
18 18
19 namespace webrtc { 19 namespace webrtc {
20 20
21 AudioEncoderCopyRed::Config::Config() = default; 21 AudioEncoderCopyRed::Config::Config() = default;
22 22 AudioEncoderCopyRed::Config::Config(Config&&) = default;
23 // TODO(kwiberg): =default this when Visual Studio learns to handle it.
24 AudioEncoderCopyRed::Config::Config(Config&& c)
25 : payload_type(c.payload_type),
26 speech_encoder(std::move(c.speech_encoder)) {}
27
28 AudioEncoderCopyRed::Config::~Config() = default; 23 AudioEncoderCopyRed::Config::~Config() = default;
29 24
30 AudioEncoderCopyRed::AudioEncoderCopyRed(Config&& config) 25 AudioEncoderCopyRed::AudioEncoderCopyRed(Config&& config)
31 : speech_encoder_(std::move(config.speech_encoder)), 26 : speech_encoder_(std::move(config.speech_encoder)),
32 red_payload_type_(config.payload_type) { 27 red_payload_type_(config.payload_type) {
33 RTC_CHECK(speech_encoder_) << "Speech encoder not provided."; 28 RTC_CHECK(speech_encoder_) << "Speech encoder not provided.";
34 } 29 }
35 30
36 AudioEncoderCopyRed::~AudioEncoderCopyRed() = default; 31 AudioEncoderCopyRed::~AudioEncoderCopyRed() = default;
37 32
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 121
127 void AudioEncoderCopyRed::SetProjectedPacketLossRate(double fraction) { 122 void AudioEncoderCopyRed::SetProjectedPacketLossRate(double fraction) {
128 speech_encoder_->SetProjectedPacketLossRate(fraction); 123 speech_encoder_->SetProjectedPacketLossRate(fraction);
129 } 124 }
130 125
131 void AudioEncoderCopyRed::SetTargetBitrate(int bits_per_second) { 126 void AudioEncoderCopyRed::SetTargetBitrate(int bits_per_second) {
132 speech_encoder_->SetTargetBitrate(bits_per_second); 127 speech_encoder_->SetTargetBitrate(bits_per_second);
133 } 128 }
134 129
135 } // namespace webrtc 130 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/codecs/cng/audio_encoder_cng.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698