blob: d4d30d00bc5af3a7bc8a7b9f7986b91eb522ba6f [file] [log] [blame]
eladalon4bb3b9c2017-09-11 07:25:26 -07001/*
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
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020011#include "logging/rtc_event_log/rtc_stream_config.h"
eladalon4bb3b9c2017-09-11 07:25:26 -070012
13namespace webrtc {
14namespace rtclog {
15
16StreamConfig::StreamConfig() {}
17
18StreamConfig::~StreamConfig() {}
19
Bjorn Tereliusf4db5422018-06-26 11:41:27 +020020StreamConfig::StreamConfig(const StreamConfig& other) = default;
21
Elad Alon1d87b0e2017-10-03 15:01:03 +020022bool StreamConfig::operator==(const StreamConfig& other) const {
23 return local_ssrc == other.local_ssrc && remote_ssrc == other.remote_ssrc &&
24 rtx_ssrc == other.rtx_ssrc && rsid == other.rsid &&
25 remb == other.remb && rtcp_mode == other.rtcp_mode &&
26 rtp_extensions == other.rtp_extensions && codecs == other.codecs;
27}
28
Bjorn Tereliusf4db5422018-06-26 11:41:27 +020029bool StreamConfig::operator!=(const StreamConfig& other) const {
30 return !(*this == other);
31}
32
eladalon4bb3b9c2017-09-11 07:25:26 -070033StreamConfig::Codec::Codec(const std::string& payload_name,
34 int payload_type,
35 int rtx_payload_type)
Yves Gerey665174f2018-06-19 15:03:05 +020036 : payload_name(payload_name),
37 payload_type(payload_type),
38 rtx_payload_type(rtx_payload_type) {}
eladalon4bb3b9c2017-09-11 07:25:26 -070039
Elad Alon1d87b0e2017-10-03 15:01:03 +020040bool StreamConfig::Codec::operator==(const Codec& other) const {
41 return payload_name == other.payload_name &&
42 payload_type == other.payload_type &&
43 rtx_payload_type == other.rtx_payload_type;
44}
eladalon4bb3b9c2017-09-11 07:25:26 -070045
46} // namespace rtclog
47} // namespace webrtc