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

Unified Diff: webrtc/audio/audio_receive_stream.h

Issue 2886993005: Introduce RtpStreamReceiver and RtpStreamReceiverControllerInterface. (Closed)
Patch Set: Protect construction of FlexfecReceiveStreamImpl. Created 3 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/audio/audio_receive_stream.h
diff --git a/webrtc/audio/audio_receive_stream.h b/webrtc/audio/audio_receive_stream.h
index 7dcc6d3c53930b5a3be97c50278af7abbe1cfdd6..92c4763b51b4c3b9c8ecf8f44df647d7631f2459 100644
--- a/webrtc/audio/audio_receive_stream.h
+++ b/webrtc/audio/audio_receive_stream.h
@@ -26,6 +26,8 @@ namespace webrtc {
class PacketRouter;
class RtcEventLog;
class RtpPacketReceived;
+class RtpStreamReceiverControllerInterface;
+class RtpStreamReceiverInterface;
namespace voe {
class ChannelProxy;
@@ -36,10 +38,10 @@ class AudioSendStream;
class AudioReceiveStream final : public webrtc::AudioReceiveStream,
public AudioMixer::Source,
- public Syncable,
- public RtpPacketSinkInterface {
+ public Syncable {
public:
- AudioReceiveStream(PacketRouter* packet_router,
+ AudioReceiveStream(RtpStreamReceiverControllerInterface* receiver_controller,
+ PacketRouter* packet_router,
const webrtc::AudioReceiveStream::Config& config,
const rtc::scoped_refptr<webrtc::AudioState>& audio_state,
webrtc::RtcEventLog* event_log);
@@ -54,8 +56,11 @@ class AudioReceiveStream final : public webrtc::AudioReceiveStream,
void SetGain(float gain) override;
std::vector<webrtc::RtpSource> GetSources() const override;
- // RtpPacketSinkInterface.
- void OnRtpPacket(const RtpPacketReceived& packet) override;
+ // TODO(nisse): We don't formally implement RtpPacketSinkInterface, and this
+ // method shouldn't be needed. But it's currently used by the
+ // AudioReceiveStreamTest.ReceiveRtpPacket unittest. Figure out if that test
+ // shuld be refactored or deleted, and then delete this method.
+ void OnRtpPacket(const RtpPacketReceived& packet);
// AudioMixer::Source
AudioFrameInfo GetAudioFrameWithInfo(int sample_rate_hz,
@@ -87,6 +92,8 @@ class AudioReceiveStream final : public webrtc::AudioReceiveStream,
bool playing_ ACCESS_ON(worker_thread_checker_) = false;
+ std::unique_ptr<RtpStreamReceiverInterface> rtp_stream_receiver_;
+
RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(AudioReceiveStream);
};
} // namespace internal

Powered by Google App Engine
This is Rietveld 408576698