Chromium Code Reviews| Index: webrtc/api/rtpreceiver.h |
| diff --git a/webrtc/api/rtpreceiver.h b/webrtc/api/rtpreceiver.h |
| index a62ed19dbf101cfc9307e44a8611a068ea70571c..191538c59bbcaf1844af03496223b2518662ec1a 100644 |
| --- a/webrtc/api/rtpreceiver.h |
| +++ b/webrtc/api/rtpreceiver.h |
| @@ -19,6 +19,7 @@ |
| #include "webrtc/api/mediastreamprovider.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" |
| @@ -29,7 +30,8 @@ class AudioRtpReceiver : public ObserverInterface, |
| public AudioSourceInterface::AudioObserver, |
| public rtc::RefCountedObject<RtpReceiverInterface> { |
| public: |
| - AudioRtpReceiver(AudioTrackInterface* track, |
| + AudioRtpReceiver(MediaStreamInterface* stream, |
| + const std::string& track_id, |
| uint32_t ssrc, |
| AudioProviderInterface* provider); |
| @@ -41,6 +43,10 @@ class AudioRtpReceiver : public ObserverInterface, |
| // AudioSourceInterface::AudioObserver implementation |
| void OnSetVolume(double volume) override; |
| + rtc::scoped_refptr<AudioTrackInterface> audio_track() const { |
| + return track_.get(); |
| + } |
| + |
| // RtpReceiverInterface implementation |
| rtc::scoped_refptr<MediaStreamTrackInterface> track() const override { |
| return track_.get(); |
| @@ -54,9 +60,12 @@ class AudioRtpReceiver : public ObserverInterface, |
| void Reconfigure(); |
| const std::string id_; |
| - const rtc::scoped_refptr<AudioTrackInterface> track_; |
| const uint32_t ssrc_; |
| AudioProviderInterface* provider_; // Set to null in Stop(). |
| + // |source_| is held here to be able to change the state of the source when |
| + // the VideoRtpReceiver is stopped. |
|
Taylor Brandstetter
2016/03/21 18:49:54
Is this comment still valid? Also, change "Video"
perkj_webrtc
2016/03/22 16:59:54
actually no.
|
| + rtc::scoped_refptr<RemoteAudioSource> source_; |
| + const rtc::scoped_refptr<AudioTrackInterface> track_; |
| bool cached_track_enabled_; |
| }; |