OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2015 Google Inc. | 3 * Copyright 2015 Google Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 | 82 |
83 class FakeAudioReceiveStream final : public webrtc::AudioReceiveStream { | 83 class FakeAudioReceiveStream final : public webrtc::AudioReceiveStream { |
84 public: | 84 public: |
85 explicit FakeAudioReceiveStream( | 85 explicit FakeAudioReceiveStream( |
86 const webrtc::AudioReceiveStream::Config& config); | 86 const webrtc::AudioReceiveStream::Config& config); |
87 | 87 |
88 const webrtc::AudioReceiveStream::Config& GetConfig() const; | 88 const webrtc::AudioReceiveStream::Config& GetConfig() const; |
89 void SetStats(const webrtc::AudioReceiveStream::Stats& stats); | 89 void SetStats(const webrtc::AudioReceiveStream::Stats& stats); |
90 int received_packets() const { return received_packets_; } | 90 int received_packets() const { return received_packets_; } |
91 void IncrementReceivedPackets(); | 91 void IncrementReceivedPackets(); |
| 92 const webrtc::AudioSinkInterface* sink() const { return sink_.get(); } |
92 | 93 |
93 private: | 94 private: |
94 // webrtc::ReceiveStream implementation. | 95 // webrtc::ReceiveStream implementation. |
95 void Start() override {} | 96 void Start() override {} |
96 void Stop() override {} | 97 void Stop() override {} |
97 void SignalNetworkState(webrtc::NetworkState state) override {} | 98 void SignalNetworkState(webrtc::NetworkState state) override {} |
98 bool DeliverRtcp(const uint8_t* packet, size_t length) override { | 99 bool DeliverRtcp(const uint8_t* packet, size_t length) override { |
99 return true; | 100 return true; |
100 } | 101 } |
101 bool DeliverRtp(const uint8_t* packet, | 102 bool DeliverRtp(const uint8_t* packet, |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 std::vector<FakeAudioSendStream*> audio_send_streams_; | 260 std::vector<FakeAudioSendStream*> audio_send_streams_; |
260 std::vector<FakeVideoReceiveStream*> video_receive_streams_; | 261 std::vector<FakeVideoReceiveStream*> video_receive_streams_; |
261 std::vector<FakeAudioReceiveStream*> audio_receive_streams_; | 262 std::vector<FakeAudioReceiveStream*> audio_receive_streams_; |
262 | 263 |
263 int num_created_send_streams_; | 264 int num_created_send_streams_; |
264 int num_created_receive_streams_; | 265 int num_created_receive_streams_; |
265 }; | 266 }; |
266 | 267 |
267 } // namespace cricket | 268 } // namespace cricket |
268 #endif // TALK_MEDIA_WEBRTC_WEBRTCVIDEOENGINE2_UNITTEST_H_ | 269 #endif // TALK_MEDIA_WEBRTC_WEBRTCVIDEOENGINE2_UNITTEST_H_ |
OLD | NEW |