1 /*
2 * Copyright (c) 2019 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_frame_decoded.h"
12
13 #include "absl/memory/memory.h"
14
15 namespace webrtc {
16
RtcEventFrameDecoded(int64_t render_time_ms,uint32_t ssrc,int width,int height,VideoCodecType codec,uint8_t qp)17 RtcEventFrameDecoded::RtcEventFrameDecoded(int64_t render_time_ms,
18 uint32_t ssrc,
19 int width,
20 int height,
21 VideoCodecType codec,
22 uint8_t qp)
23 : render_time_ms_(render_time_ms),
24 ssrc_(ssrc),
25 width_(width),
26 height_(height),
27 codec_(codec),
28 qp_(qp) {}
29
RtcEventFrameDecoded(const RtcEventFrameDecoded & other)30 RtcEventFrameDecoded::RtcEventFrameDecoded(const RtcEventFrameDecoded& other)
31 : RtcEvent(other.timestamp_us_),
32 render_time_ms_(other.render_time_ms_),
33 ssrc_(other.ssrc_),
34 width_(other.width_),
35 height_(other.height_),
36 codec_(other.codec_),
37 qp_(other.qp_) {}
38
Copy() const39 std::unique_ptr<RtcEventFrameDecoded> RtcEventFrameDecoded::Copy() const {
40 return absl::WrapUnique<RtcEventFrameDecoded>(
41 new RtcEventFrameDecoded(*this));
42 }
43
44 } // namespace webrtc
45