eladalon | 4bb3b9c | 2017-09-11 07:25:26 -0700 | [diff] [blame] | 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 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 11 | #include "logging/rtc_event_log/rtc_stream_config.h" |
eladalon | 4bb3b9c | 2017-09-11 07:25:26 -0700 | [diff] [blame] | 12 | |
| 13 | namespace webrtc { |
| 14 | namespace rtclog { |
| 15 | |
| 16 | StreamConfig::StreamConfig() {} |
| 17 | |
| 18 | StreamConfig::~StreamConfig() {} |
| 19 | |
Bjorn Terelius | f4db542 | 2018-06-26 11:41:27 +0200 | [diff] [blame] | 20 | StreamConfig::StreamConfig(const StreamConfig& other) = default; |
| 21 | |
Elad Alon | 1d87b0e | 2017-10-03 15:01:03 +0200 | [diff] [blame] | 22 | bool 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 Terelius | f4db542 | 2018-06-26 11:41:27 +0200 | [diff] [blame] | 29 | bool StreamConfig::operator!=(const StreamConfig& other) const { |
| 30 | return !(*this == other); |
| 31 | } |
| 32 | |
eladalon | 4bb3b9c | 2017-09-11 07:25:26 -0700 | [diff] [blame] | 33 | StreamConfig::Codec::Codec(const std::string& payload_name, |
| 34 | int payload_type, |
| 35 | int rtx_payload_type) |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 36 | : payload_name(payload_name), |
| 37 | payload_type(payload_type), |
| 38 | rtx_payload_type(rtx_payload_type) {} |
eladalon | 4bb3b9c | 2017-09-11 07:25:26 -0700 | [diff] [blame] | 39 | |
Elad Alon | 1d87b0e | 2017-10-03 15:01:03 +0200 | [diff] [blame] | 40 | bool 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 | } |
eladalon | 4bb3b9c | 2017-09-11 07:25:26 -0700 | [diff] [blame] | 45 | |
| 46 | } // namespace rtclog |
| 47 | } // namespace webrtc |