Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(366)

Side by Side Diff: webrtc/media/engine/fakewebrtccall.h

Issue 2066973002: Add AudioSendStream::SetMuted() method and use it in WVoMC::MuteStream(). (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/audio_send_stream.h ('k') | webrtc/media/engine/fakewebrtccall.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 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 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 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 28 matching lines...) Expand all
39 int event_code = 0; 39 int event_code = 0;
40 int duration_ms = 0; 40 int duration_ms = 0;
41 }; 41 };
42 42
43 explicit FakeAudioSendStream(const webrtc::AudioSendStream::Config& config); 43 explicit FakeAudioSendStream(const webrtc::AudioSendStream::Config& config);
44 44
45 const webrtc::AudioSendStream::Config& GetConfig() const; 45 const webrtc::AudioSendStream::Config& GetConfig() const;
46 void SetStats(const webrtc::AudioSendStream::Stats& stats); 46 void SetStats(const webrtc::AudioSendStream::Stats& stats);
47 TelephoneEvent GetLatestTelephoneEvent() const; 47 TelephoneEvent GetLatestTelephoneEvent() const;
48 bool IsSending() const { return sending_; } 48 bool IsSending() const { return sending_; }
49 bool muted() const { return muted_; }
49 50
50 private: 51 private:
51 // webrtc::AudioSendStream implementation. 52 // webrtc::AudioSendStream implementation.
52 void Start() override { sending_ = true; } 53 void Start() override { sending_ = true; }
53 void Stop() override { sending_ = false; } 54 void Stop() override { sending_ = false; }
54 55
55 bool SendTelephoneEvent(int payload_type, int event, 56 bool SendTelephoneEvent(int payload_type, int event,
56 int duration_ms) override; 57 int duration_ms) override;
58 void SetMuted(bool muted) override;
57 webrtc::AudioSendStream::Stats GetStats() const override; 59 webrtc::AudioSendStream::Stats GetStats() const override;
58 60
59 TelephoneEvent latest_telephone_event_; 61 TelephoneEvent latest_telephone_event_;
60 webrtc::AudioSendStream::Config config_; 62 webrtc::AudioSendStream::Config config_;
61 webrtc::AudioSendStream::Stats stats_; 63 webrtc::AudioSendStream::Stats stats_;
62 bool sending_ = false; 64 bool sending_ = false;
65 bool muted_ = false;
63 }; 66 };
64 67
65 class FakeAudioReceiveStream final : public webrtc::AudioReceiveStream { 68 class FakeAudioReceiveStream final : public webrtc::AudioReceiveStream {
66 public: 69 public:
67 explicit FakeAudioReceiveStream( 70 explicit FakeAudioReceiveStream(
68 const webrtc::AudioReceiveStream::Config& config); 71 const webrtc::AudioReceiveStream::Config& config);
69 72
70 const webrtc::AudioReceiveStream::Config& GetConfig() const; 73 const webrtc::AudioReceiveStream::Config& GetConfig() const;
71 void SetStats(const webrtc::AudioReceiveStream::Stats& stats); 74 void SetStats(const webrtc::AudioReceiveStream::Stats& stats);
72 int received_packets() const { return received_packets_; } 75 int received_packets() const { return received_packets_; }
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 std::vector<FakeAudioSendStream*> audio_send_streams_; 238 std::vector<FakeAudioSendStream*> audio_send_streams_;
236 std::vector<FakeVideoReceiveStream*> video_receive_streams_; 239 std::vector<FakeVideoReceiveStream*> video_receive_streams_;
237 std::vector<FakeAudioReceiveStream*> audio_receive_streams_; 240 std::vector<FakeAudioReceiveStream*> audio_receive_streams_;
238 241
239 int num_created_send_streams_; 242 int num_created_send_streams_;
240 int num_created_receive_streams_; 243 int num_created_receive_streams_;
241 }; 244 };
242 245
243 } // namespace cricket 246 } // namespace cricket
244 #endif // TALK_MEDIA_WEBRTC_WEBRTCVIDEOENGINE2_UNITTEST_H_ 247 #endif // TALK_MEDIA_WEBRTC_WEBRTCVIDEOENGINE2_UNITTEST_H_
OLDNEW
« no previous file with comments | « webrtc/audio_send_stream.h ('k') | webrtc/media/engine/fakewebrtccall.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698