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_receive_stream_config.h" 12 13 #include <utility> 14 15 #include "absl/memory/memory.h" 16 #include "rtc_base/checks.h" 17 18 namespace webrtc { 19 RtcEventVideoReceiveStreamConfig(std::unique_ptr<rtclog::StreamConfig> config)20RtcEventVideoReceiveStreamConfig::RtcEventVideoReceiveStreamConfig( 21 std::unique_ptr<rtclog::StreamConfig> config) 22 : config_(std::move(config)) { 23 RTC_DCHECK(config_); 24 } 25 RtcEventVideoReceiveStreamConfig(const RtcEventVideoReceiveStreamConfig & other)26RtcEventVideoReceiveStreamConfig::RtcEventVideoReceiveStreamConfig( 27 const RtcEventVideoReceiveStreamConfig& other) 28 : RtcEvent(other.timestamp_us_), 29 config_(std::make_unique<rtclog::StreamConfig>(*other.config_)) {} 30 31 RtcEventVideoReceiveStreamConfig::~RtcEventVideoReceiveStreamConfig() = default; 32 GetType() const33RtcEvent::Type RtcEventVideoReceiveStreamConfig::GetType() const { 34 return Type::VideoReceiveStreamConfig; 35 } 36 IsConfigEvent() const37bool RtcEventVideoReceiveStreamConfig::IsConfigEvent() const { 38 return true; 39 } 40 41 std::unique_ptr<RtcEventVideoReceiveStreamConfig> Copy() const42RtcEventVideoReceiveStreamConfig::Copy() const { 43 return absl::WrapUnique<RtcEventVideoReceiveStreamConfig>( 44 new RtcEventVideoReceiveStreamConfig(*this)); 45 } 46 47 } // namespace webrtc 48