OLD | NEW |
(Empty) | |
| 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 WEBRTC_API_TEST_FAKERTPSENDERRECEIVER_H_ |
| 12 #define WEBRTC_API_TEST_FAKERTPSENDERRECEIVER_H_ |
| 13 |
| 14 #include <string> |
| 15 #include <vector> |
| 16 |
| 17 #include "webrtc/api/rtpparameters.h" |
| 18 #include "webrtc/api/rtpreceiverinterface.h" |
| 19 #include "webrtc/api/rtpsenderinterface.h" |
| 20 |
| 21 namespace webrtc { |
| 22 |
| 23 class FakeRtpSender : public rtc::RefCountedObject<RtpSenderInterface> { |
| 24 public: |
| 25 FakeRtpSender(cricket::MediaType media_type, RtpParameters parameters); |
| 26 |
| 27 bool SetTrack(MediaStreamTrackInterface* track) override; |
| 28 rtc::scoped_refptr<MediaStreamTrackInterface> track() const override; |
| 29 uint32_t ssrc() const override; |
| 30 cricket::MediaType media_type() const override; |
| 31 std::string id() const override; |
| 32 std::vector<std::string> stream_ids() const override; |
| 33 RtpParameters GetParameters() const override; |
| 34 bool SetParameters(const RtpParameters& parameters) override; |
| 35 |
| 36 private: |
| 37 const cricket::MediaType media_type_; |
| 38 RtpParameters rtp_parameters_; |
| 39 rtc::scoped_refptr<MediaStreamTrackInterface> track_; |
| 40 }; |
| 41 |
| 42 class FakeRtpReceiver : public rtc::RefCountedObject<RtpReceiverInterface> { |
| 43 public: |
| 44 FakeRtpReceiver(cricket::MediaType media_type, RtpParameters parameters); |
| 45 |
| 46 void SetTrack(MediaStreamTrackInterface* track); |
| 47 rtc::scoped_refptr<MediaStreamTrackInterface> track() const override; |
| 48 cricket::MediaType media_type() const override; |
| 49 std::string id() const override; |
| 50 RtpParameters GetParameters() const override; |
| 51 bool SetParameters(const RtpParameters& parameters) override; |
| 52 void SetObserver(RtpReceiverObserverInterface* observer) override; |
| 53 |
| 54 private: |
| 55 const cricket::MediaType media_type_; |
| 56 RtpParameters rtp_parameters_; |
| 57 rtc::scoped_refptr<MediaStreamTrackInterface> track_; |
| 58 }; |
| 59 |
| 60 } // namespace webrtc |
| 61 |
| 62 #endif // WEBRTC_API_TEST_FAKERTPSENDERRECEIVER_H_ |
OLD | NEW |