tor-browser

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

rtp_transceiver_interface.cc (1781B)


      1 /*
      2 *  Copyright 2018 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 "api/rtp_transceiver_interface.h"
     12 
     13 #include <optional>
     14 
     15 #include "api/rtc_error.h"
     16 #include "api/rtp_transceiver_direction.h"
     17 #include "rtc_base/checks.h"
     18 
     19 namespace webrtc {
     20 
     21 RtpTransceiverInit::RtpTransceiverInit() = default;
     22 
     23 RtpTransceiverInit::RtpTransceiverInit(const RtpTransceiverInit& rhs) = default;
     24 
     25 RtpTransceiverInit::~RtpTransceiverInit() = default;
     26 
     27 std::optional<RtpTransceiverDirection>
     28 RtpTransceiverInterface::fired_direction() const {
     29  return std::nullopt;
     30 }
     31 
     32 bool RtpTransceiverInterface::stopping() const {
     33  return false;
     34 }
     35 
     36 void RtpTransceiverInterface::Stop() {
     37  StopInternal();
     38 }
     39 
     40 RTCError RtpTransceiverInterface::StopStandard() {
     41  RTC_DCHECK_NOTREACHED()
     42      << "DEBUG: RtpTransceiverInterface::StopStandard called";
     43  return RTCError::OK();
     44 }
     45 
     46 void RtpTransceiverInterface::StopInternal() {
     47  RTC_DCHECK_NOTREACHED()
     48      << "DEBUG: RtpTransceiverInterface::StopInternal called";
     49 }
     50 
     51 // TODO(bugs.webrtc.org/11839) Remove default implementations when clients
     52 // are updated.
     53 void RtpTransceiverInterface::SetDirection(
     54    RtpTransceiverDirection new_direction) {
     55  SetDirectionWithError(new_direction);
     56 }
     57 
     58 RTCError RtpTransceiverInterface::SetDirectionWithError(
     59    RtpTransceiverDirection /* new_direction */) {
     60  RTC_DCHECK_NOTREACHED() << "Default implementation called";
     61  return RTCError::OK();
     62 }
     63 
     64 }  // namespace webrtc