tor-browser

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

mock_rtpreceiver.h (2175B)


      1 /*
      2 *  Copyright 2016 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_RTPRECEIVER_H_
     12 #define API_TEST_MOCK_RTPRECEIVER_H_
     13 
     14 #include <optional>
     15 #include <string>
     16 #include <vector>
     17 
     18 #include "api/crypto/frame_decryptor_interface.h"
     19 #include "api/media_stream_interface.h"
     20 #include "api/media_types.h"
     21 #include "api/rtp_parameters.h"
     22 #include "api/rtp_receiver_interface.h"
     23 #include "api/scoped_refptr.h"
     24 #include "api/transport/rtp/rtp_source.h"
     25 #include "rtc_base/ref_counted_object.h"
     26 #include "test/gmock.h"
     27 
     28 namespace webrtc {
     29 
     30 class MockRtpReceiver : public RefCountedObject<RtpReceiverInterface> {
     31 public:
     32  MOCK_METHOD(scoped_refptr<MediaStreamTrackInterface>,
     33              track,
     34              (),
     35              (const, override));
     36  MOCK_METHOD(std::vector<scoped_refptr<MediaStreamInterface>>,
     37              streams,
     38              (),
     39              (const, override));
     40  MOCK_METHOD(MediaType, media_type, (), (const, override));
     41  MOCK_METHOD(std::string, id, (), (const, override));
     42  MOCK_METHOD(RtpParameters, GetParameters, (), (const, override));
     43  MOCK_METHOD(bool,
     44              SetParameters,
     45              (const RtpParameters& parameters),
     46              (override));
     47  MOCK_METHOD(void, SetObserver, (RtpReceiverObserverInterface*), (override));
     48  MOCK_METHOD(void,
     49              SetJitterBufferMinimumDelay,
     50              (std::optional<double>),
     51              (override));
     52  MOCK_METHOD(std::vector<RtpSource>, GetSources, (), (const, override));
     53  MOCK_METHOD(void,
     54              SetFrameDecryptor,
     55              (scoped_refptr<FrameDecryptorInterface>),
     56              (override));
     57  MOCK_METHOD(scoped_refptr<FrameDecryptorInterface>,
     58              GetFrameDecryptor,
     59              (),
     60              (const, override));
     61 };
     62 
     63 }  // namespace webrtc
     64 
     65 #endif  // API_TEST_MOCK_RTPRECEIVER_H_