• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #include "absl/strings/string_view.h"
14 
15 namespace webrtc {
16 namespace rtclog {
17 
StreamConfig()18 StreamConfig::StreamConfig() {}
19 
~StreamConfig()20 StreamConfig::~StreamConfig() {}
21 
22 StreamConfig::StreamConfig(const StreamConfig& other) = default;
23 
operator ==(const StreamConfig & other) const24 bool StreamConfig::operator==(const StreamConfig& other) const {
25   return local_ssrc == other.local_ssrc && remote_ssrc == other.remote_ssrc &&
26          rtx_ssrc == other.rtx_ssrc && rsid == other.rsid &&
27          remb == other.remb && rtcp_mode == other.rtcp_mode &&
28          rtp_extensions == other.rtp_extensions && codecs == other.codecs;
29 }
30 
operator !=(const StreamConfig & other) const31 bool StreamConfig::operator!=(const StreamConfig& other) const {
32   return !(*this == other);
33 }
34 
Codec(absl::string_view payload_name,int payload_type,int rtx_payload_type)35 StreamConfig::Codec::Codec(absl::string_view payload_name,
36                            int payload_type,
37                            int rtx_payload_type)
38     : payload_name(payload_name),
39       payload_type(payload_type),
40       rtx_payload_type(rtx_payload_type) {}
41 
operator ==(const Codec & other) const42 bool StreamConfig::Codec::operator==(const Codec& other) const {
43   return payload_name == other.payload_name &&
44          payload_type == other.payload_type &&
45          rtx_payload_type == other.rtx_payload_type;
46 }
47 
48 }  // namespace rtclog
49 }  // namespace webrtc
50