tor-browser

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

MockCall.cpp (1539B)


      1 /* This Source Code Form is subject to the terms of the Mozilla Public
      2 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
      3 * You can obtain one at http://mozilla.org/MPL/2.0/. */
      4 
      5 #include "MockCall.h"
      6 
      7 namespace test {
      8 
      9 const webrtc::AudioSendStream::Config& MockAudioSendStream::GetConfig() const {
     10  return *mCallWrapper->GetMockCall()->mAudioSendConfig;
     11 }
     12 
     13 void MockAudioSendStream::Reconfigure(const Config& config,
     14                                      webrtc::SetParametersCallback callback) {
     15  mCallWrapper->GetMockCall()->mAudioSendConfig = mozilla::Some(config);
     16 }
     17 
     18 void MockAudioReceiveStream::SetDecoderMap(
     19    std::map<int, webrtc::SdpAudioFormat> decoder_map) {
     20  MOZ_RELEASE_ASSERT(mCallWrapper->GetMockCall()->mAudioReceiveConfig.isSome());
     21  mCallWrapper->GetMockCall()->mAudioReceiveConfig->decoder_map =
     22      std::move(decoder_map);
     23 }
     24 
     25 void MockVideoSendStream::ReconfigureVideoEncoder(
     26    webrtc::VideoEncoderConfig config) {
     27  mCallWrapper->GetMockCall()->mVideoSendEncoderConfig =
     28      mozilla::Some(config.Copy());
     29 }
     30 
     31 void MockVideoSendStream::ReconfigureVideoEncoder(
     32    webrtc::VideoEncoderConfig config, webrtc::SetParametersCallback callback) {
     33  ReconfigureVideoEncoder(std::move(config));
     34 }
     35 
     36 void MockVideoSendStream::SetSource(
     37    webrtc::VideoSourceInterface<webrtc::VideoFrame>* source,
     38    const webrtc::DegradationPreference& degradation_preference) {
     39  mCallWrapper->GetMockCall()->mConfiguredDegradationPreference =
     40      degradation_preference;
     41 }
     42 
     43 }  // namespace test