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

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

Issue 1551813002: Storing raw audio sink for default audio track. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Addressing solenberg@'s comments. Created 4 years, 11 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 | « talk/media/base/mediachannel.h ('k') | talk/media/webrtc/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 * 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
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 rtc::scoped_refptr<webrtc::AudioSinkInterface> sink() const { return sink_; }
the sun 2016/01/11 10:38:27 super nit: could return a const &
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,
102 size_t length, 103 size_t length,
103 const webrtc::PacketTime& packet_time) override { 104 const webrtc::PacketTime& packet_time) override {
104 return true; 105 return true;
105 } 106 }
106 107
107 // webrtc::AudioReceiveStream implementation. 108 // webrtc::AudioReceiveStream implementation.
108 webrtc::AudioReceiveStream::Stats GetStats() const override; 109 webrtc::AudioReceiveStream::Stats GetStats() const override;
109 void SetSink(rtc::scoped_ptr<webrtc::AudioSinkInterface> sink) override; 110 void SetSink(
111 const rtc::scoped_refptr<webrtc::AudioSinkInterface>& sink) override;
110 112
111 webrtc::AudioReceiveStream::Config config_; 113 webrtc::AudioReceiveStream::Config config_;
112 webrtc::AudioReceiveStream::Stats stats_; 114 webrtc::AudioReceiveStream::Stats stats_;
113 int received_packets_; 115 int received_packets_;
114 rtc::scoped_ptr<webrtc::AudioSinkInterface> sink_; 116 rtc::scoped_refptr<webrtc::AudioSinkInterface> sink_;
115 }; 117 };
116 118
117 class FakeVideoSendStream final : public webrtc::VideoSendStream, 119 class FakeVideoSendStream final : public webrtc::VideoSendStream,
118 public webrtc::VideoCaptureInput { 120 public webrtc::VideoCaptureInput {
119 public: 121 public:
120 FakeVideoSendStream(const webrtc::VideoSendStream::Config& config, 122 FakeVideoSendStream(const webrtc::VideoSendStream::Config& config,
121 const webrtc::VideoEncoderConfig& encoder_config); 123 const webrtc::VideoEncoderConfig& encoder_config);
122 webrtc::VideoSendStream::Config GetConfig() const; 124 webrtc::VideoSendStream::Config GetConfig() const;
123 webrtc::VideoEncoderConfig GetEncoderConfig() const; 125 webrtc::VideoEncoderConfig GetEncoderConfig() const;
124 std::vector<webrtc::VideoStream> GetVideoStreams(); 126 std::vector<webrtc::VideoStream> GetVideoStreams();
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 std::vector<FakeAudioSendStream*> audio_send_streams_; 261 std::vector<FakeAudioSendStream*> audio_send_streams_;
260 std::vector<FakeVideoReceiveStream*> video_receive_streams_; 262 std::vector<FakeVideoReceiveStream*> video_receive_streams_;
261 std::vector<FakeAudioReceiveStream*> audio_receive_streams_; 263 std::vector<FakeAudioReceiveStream*> audio_receive_streams_;
262 264
263 int num_created_send_streams_; 265 int num_created_send_streams_;
264 int num_created_receive_streams_; 266 int num_created_receive_streams_;
265 }; 267 };
266 268
267 } // namespace cricket 269 } // namespace cricket
268 #endif // TALK_MEDIA_WEBRTC_WEBRTCVIDEOENGINE2_UNITTEST_H_ 270 #endif // TALK_MEDIA_WEBRTC_WEBRTCVIDEOENGINE2_UNITTEST_H_
OLDNEW
« no previous file with comments | « talk/media/base/mediachannel.h ('k') | talk/media/webrtc/fakewebrtccall.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698