tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

rtc_stream_config.cc (1648B)


      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 
     18 StreamConfig::StreamConfig() {}
     19 
     20 StreamConfig::~StreamConfig() {}
     21 
     22 StreamConfig::StreamConfig(const StreamConfig& other) = default;
     23 
     24 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 
     31 bool StreamConfig::operator!=(const StreamConfig& other) const {
     32  return !(*this == other);
     33 }
     34 
     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 
     42 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