| Index: webrtc/api/rtpreceiver.h | 
| diff --git a/webrtc/api/rtpreceiver.h b/webrtc/api/rtpreceiver.h | 
| index 001264d7a761181f76380a6fc1b27e09569f9f60..c255400df50ff6e7c1794520bb562e6ddb7d88ed 100644 | 
| --- a/webrtc/api/rtpreceiver.h | 
| +++ b/webrtc/api/rtpreceiver.h | 
| @@ -10,19 +10,20 @@ | 
|  | 
| // This file contains classes that implement RtpReceiverInterface. | 
| // An RtpReceiver associates a MediaStreamTrackInterface with an underlying | 
| -// transport (provided by AudioProviderInterface/VideoProviderInterface) | 
| +// transport (provided by cricket::VoiceChannel/cricket::VideoChannel) | 
|  | 
| #ifndef WEBRTC_API_RTPRECEIVER_H_ | 
| #define WEBRTC_API_RTPRECEIVER_H_ | 
|  | 
| #include <string> | 
|  | 
| -#include "webrtc/api/mediastreamprovider.h" | 
| +#include "webrtc/api/mediastreaminterface.h" | 
| #include "webrtc/api/rtpreceiverinterface.h" | 
| #include "webrtc/api/remoteaudiosource.h" | 
| #include "webrtc/api/videotracksource.h" | 
| #include "webrtc/base/basictypes.h" | 
| #include "webrtc/media/base/videobroadcaster.h" | 
| +#include "webrtc/pc/channel.h" | 
|  | 
| namespace webrtc { | 
|  | 
| @@ -39,7 +40,7 @@ class AudioRtpReceiver : public ObserverInterface, | 
| AudioRtpReceiver(MediaStreamInterface* stream, | 
| const std::string& track_id, | 
| uint32_t ssrc, | 
| -                   AudioProviderInterface* provider); | 
| +                   cricket::VoiceChannel* channel); | 
|  | 
| virtual ~AudioRtpReceiver(); | 
|  | 
| @@ -58,6 +59,10 @@ class AudioRtpReceiver : public ObserverInterface, | 
| return track_.get(); | 
| } | 
|  | 
| +  cricket::MediaType media_type() const override { | 
| +    return cricket::MEDIA_TYPE_AUDIO; | 
| +  } | 
| + | 
| std::string id() const override { return id_; } | 
|  | 
| RtpParameters GetParameters() const override; | 
| @@ -66,14 +71,20 @@ class AudioRtpReceiver : public ObserverInterface, | 
| // RtpReceiverInternal implementation. | 
| void Stop() override; | 
|  | 
| +  // Does not take ownership. | 
| +  // Should call SetChannel(nullptr) before |channel| is destroyed. | 
| +  void SetChannel(cricket::VoiceChannel* channel) { channel_ = channel; } | 
| + | 
| private: | 
| void Reconfigure(); | 
|  | 
| const std::string id_; | 
| const uint32_t ssrc_; | 
| -  AudioProviderInterface* provider_;  // Set to null in Stop(). | 
| +  cricket::VoiceChannel* channel_; | 
| const rtc::scoped_refptr<AudioTrackInterface> track_; | 
| bool cached_track_enabled_; | 
| +  double cached_volume_ = 1; | 
| +  bool stopped_ = false; | 
| }; | 
|  | 
| class VideoRtpReceiver : public rtc::RefCountedObject<RtpReceiverInternal> { | 
| @@ -82,7 +93,7 @@ class VideoRtpReceiver : public rtc::RefCountedObject<RtpReceiverInternal> { | 
| const std::string& track_id, | 
| rtc::Thread* worker_thread, | 
| uint32_t ssrc, | 
| -                   VideoProviderInterface* provider); | 
| +                   cricket::VideoChannel* channel); | 
|  | 
| virtual ~VideoRtpReceiver(); | 
|  | 
| @@ -95,6 +106,10 @@ class VideoRtpReceiver : public rtc::RefCountedObject<RtpReceiverInternal> { | 
| return track_.get(); | 
| } | 
|  | 
| +  cricket::MediaType media_type() const override { | 
| +    return cricket::MEDIA_TYPE_VIDEO; | 
| +  } | 
| + | 
| std::string id() const override { return id_; } | 
|  | 
| RtpParameters GetParameters() const override; | 
| @@ -103,10 +118,14 @@ class VideoRtpReceiver : public rtc::RefCountedObject<RtpReceiverInternal> { | 
| // RtpReceiverInternal implementation. | 
| void Stop() override; | 
|  | 
| +  // Does not take ownership. | 
| +  // Should call SetChannel(nullptr) before |channel| is destroyed. | 
| +  void SetChannel(cricket::VideoChannel* channel) { channel_ = channel; } | 
| + | 
| private: | 
| std::string id_; | 
| uint32_t ssrc_; | 
| -  VideoProviderInterface* provider_; | 
| +  cricket::VideoChannel* channel_; | 
| // |broadcaster_| is needed since the decoder can only handle one sink. | 
| // It might be better if the decoder can handle multiple sinks and consider | 
| // the VideoSinkWants. | 
| @@ -115,6 +134,7 @@ class VideoRtpReceiver : public rtc::RefCountedObject<RtpReceiverInternal> { | 
| // the VideoRtpReceiver is stopped. | 
| rtc::scoped_refptr<VideoTrackSource> source_; | 
| rtc::scoped_refptr<VideoTrackInterface> track_; | 
| +  bool stopped_ = false; | 
| }; | 
|  | 
| }  // namespace webrtc | 
|  |