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/rtc_stream_config.h"
12 
13 namespace webrtc {
14 namespace rtclog {
15 
StreamConfig()16 StreamConfig::StreamConfig() {}
17 
~StreamConfig()18 StreamConfig::~StreamConfig() {}
19 
20 StreamConfig::StreamConfig(const StreamConfig& other) = default;
21 
operator ==(const StreamConfig & other) const22 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 
operator !=(const StreamConfig & other) const29 bool StreamConfig::operator!=(const StreamConfig& other) const {
30   return !(*this == other);
31 }
32 
Codec(const std::string & payload_name,int payload_type,int rtx_payload_type)33 StreamConfig::Codec::Codec(const std::string& payload_name,
34                            int payload_type,
35                            int rtx_payload_type)
36     : payload_name(payload_name),
37       payload_type(payload_type),
38       rtx_payload_type(rtx_payload_type) {}
39 
operator ==(const Codec & other) const40 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 }
45 
46 }  // namespace rtclog
47 }  // namespace webrtc
48