• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  *  Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
3  *
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
6  *  tree. An additional intellectual property rights grant can be found
7  *  in the file PATENTS.  All contributing project authors may
8  *  be found in the AUTHORS file in the root of the source tree.
9  */
10 
11 #include "logging/rtc_event_log/events/rtc_event_audio_send_stream_config.h"
12 
13 #include <utility>
14 
15 #include "absl/memory/memory.h"
16 #include "logging/rtc_event_log/rtc_stream_config.h"
17 #include "rtc_base/checks.h"
18 
19 namespace webrtc {
20 
RtcEventAudioSendStreamConfig(std::unique_ptr<rtclog::StreamConfig> config)21 RtcEventAudioSendStreamConfig::RtcEventAudioSendStreamConfig(
22     std::unique_ptr<rtclog::StreamConfig> config)
23     : config_(std::move(config)) {
24   RTC_DCHECK(config_);
25 }
26 
RtcEventAudioSendStreamConfig(const RtcEventAudioSendStreamConfig & other)27 RtcEventAudioSendStreamConfig::RtcEventAudioSendStreamConfig(
28     const RtcEventAudioSendStreamConfig& other)
29     : RtcEvent(other.timestamp_us_),
30       config_(std::make_unique<rtclog::StreamConfig>(*other.config_)) {}
31 
32 RtcEventAudioSendStreamConfig::~RtcEventAudioSendStreamConfig() = default;
33 
GetType() const34 RtcEvent::Type RtcEventAudioSendStreamConfig::GetType() const {
35   return RtcEvent::Type::AudioSendStreamConfig;
36 }
37 
IsConfigEvent() const38 bool RtcEventAudioSendStreamConfig::IsConfigEvent() const {
39   return true;
40 }
41 
42 std::unique_ptr<RtcEventAudioSendStreamConfig>
Copy() const43 RtcEventAudioSendStreamConfig::Copy() const {
44   return absl::WrapUnique<RtcEventAudioSendStreamConfig>(
45       new RtcEventAudioSendStreamConfig(*this));
46 }
47 
48 }  // namespace webrtc
49