tor-browser

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

mock_encoder_selector.h (1412B)


      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 #ifndef API_TEST_MOCK_ENCODER_SELECTOR_H_
     12 #define API_TEST_MOCK_ENCODER_SELECTOR_H_
     13 
     14 #include <optional>
     15 
     16 #include "api/units/data_rate.h"
     17 #include "api/video/render_resolution.h"
     18 #include "api/video_codecs/sdp_video_format.h"
     19 #include "api/video_codecs/video_encoder_factory.h"
     20 #include "test/gmock.h"
     21 
     22 namespace webrtc {
     23 
     24 class MockEncoderSelector
     25    : public VideoEncoderFactory::EncoderSelectorInterface {
     26 public:
     27  MOCK_METHOD(void,
     28              OnCurrentEncoder,
     29              (const SdpVideoFormat& format),
     30              (override));
     31 
     32  MOCK_METHOD(std::optional<SdpVideoFormat>,
     33              OnAvailableBitrate,
     34              (const DataRate& rate),
     35              (override));
     36 
     37  MOCK_METHOD(std::optional<SdpVideoFormat>,
     38              OnResolutionChange,
     39              (const RenderResolution& resolution),
     40              (override));
     41 
     42  MOCK_METHOD(std::optional<SdpVideoFormat>, OnEncoderBroken, (), (override));
     43 };
     44 
     45 }  // namespace webrtc
     46 
     47 #endif  // API_TEST_MOCK_ENCODER_SELECTOR_H_