• 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_video_send_stream_config.h"
12 
13 #include <utility>
14 
15 #include "absl/memory/memory.h"
16 
17 namespace webrtc {
18 
RtcEventVideoSendStreamConfig(std::unique_ptr<rtclog::StreamConfig> config)19 RtcEventVideoSendStreamConfig::RtcEventVideoSendStreamConfig(
20     std::unique_ptr<rtclog::StreamConfig> config)
21     : config_(std::move(config)) {}
22 
RtcEventVideoSendStreamConfig(const RtcEventVideoSendStreamConfig & other)23 RtcEventVideoSendStreamConfig::RtcEventVideoSendStreamConfig(
24     const RtcEventVideoSendStreamConfig& other)
25     : RtcEvent(other.timestamp_us_),
26       config_(std::make_unique<rtclog::StreamConfig>(*other.config_)) {}
27 
28 RtcEventVideoSendStreamConfig::~RtcEventVideoSendStreamConfig() = default;
29 
GetType() const30 RtcEvent::Type RtcEventVideoSendStreamConfig::GetType() const {
31   return RtcEvent::Type::VideoSendStreamConfig;
32 }
33 
IsConfigEvent() const34 bool RtcEventVideoSendStreamConfig::IsConfigEvent() const {
35   return true;
36 }
37 
38 std::unique_ptr<RtcEventVideoSendStreamConfig>
Copy() const39 RtcEventVideoSendStreamConfig::Copy() const {
40   return absl::WrapUnique<RtcEventVideoSendStreamConfig>(
41       new RtcEventVideoSendStreamConfig(*this));
42 }
43 
44 }  // namespace webrtc
45