Index: talk/app/webrtc/rtpsender.h |
diff --git a/talk/app/webrtc/rtpsender.h b/talk/app/webrtc/rtpsender.h |
index d5f88a941add3df7e8a2bcdc3efe0a0ab62eb073..374190932325bb9715ed4b477b61556177833935 100644 |
--- a/talk/app/webrtc/rtpsender.h |
+++ b/talk/app/webrtc/rtpsender.h |
@@ -36,7 +36,6 @@ |
#include "talk/app/webrtc/mediastreamprovider.h" |
#include "talk/app/webrtc/rtpsenderinterface.h" |
-#include "talk/app/webrtc/statscollector.h" |
#include "talk/media/base/audiorenderer.h" |
#include "webrtc/base/basictypes.h" |
#include "webrtc/base/criticalsection.h" |
@@ -71,15 +70,9 @@ |
class AudioRtpSender : public ObserverInterface, |
public rtc::RefCountedObject<RtpSenderInterface> { |
public: |
- // StatsCollector provided so that Add/RemoveLocalAudioTrack can be called |
- // at the appropriate times. |
AudioRtpSender(AudioTrackInterface* track, |
- const std::string& stream_id, |
- AudioProviderInterface* provider, |
- StatsCollector* stats); |
- |
- // Randomly generates id and stream_id. |
- AudioRtpSender(AudioProviderInterface* provider, StatsCollector* stats); |
+ uint32_t ssrc, |
+ AudioProviderInterface* provider); |
virtual ~AudioRtpSender(); |
@@ -92,37 +85,18 @@ |
return track_.get(); |
} |
- void SetSsrc(uint32_t ssrc) override; |
- |
- uint32_t ssrc() const override { return ssrc_; } |
- |
- cricket::MediaType media_type() const override { |
- return cricket::MEDIA_TYPE_AUDIO; |
- } |
- |
std::string id() const override { return id_; } |
- |
- void set_stream_id(const std::string& stream_id) override { |
- stream_id_ = stream_id; |
- } |
- std::string stream_id() const override { return stream_id_; } |
void Stop() override; |
private: |
- bool can_send_track() const { return track_ && ssrc_; } |
- // Helper function to construct options for |
- // AudioProviderInterface::SetAudioSend. |
- void SetAudioSend(); |
+ void Reconfigure(); |
std::string id_; |
- std::string stream_id_; |
+ rtc::scoped_refptr<AudioTrackInterface> track_; |
+ uint32_t ssrc_; |
AudioProviderInterface* provider_; |
- StatsCollector* stats_; |
- rtc::scoped_refptr<AudioTrackInterface> track_; |
- uint32_t ssrc_ = 0; |
- bool cached_track_enabled_ = false; |
- bool stopped_ = false; |
+ bool cached_track_enabled_; |
// Used to pass the data callback from the |track_| to the other end of |
// cricket::AudioRenderer. |
@@ -133,11 +107,8 @@ |
public rtc::RefCountedObject<RtpSenderInterface> { |
public: |
VideoRtpSender(VideoTrackInterface* track, |
- const std::string& stream_id, |
+ uint32_t ssrc, |
VideoProviderInterface* provider); |
- |
- // Randomly generates id and stream_id. |
- explicit VideoRtpSender(VideoProviderInterface* provider); |
virtual ~VideoRtpSender(); |
@@ -150,36 +121,18 @@ |
return track_.get(); |
} |
- void SetSsrc(uint32_t ssrc) override; |
- |
- uint32_t ssrc() const override { return ssrc_; } |
- |
- cricket::MediaType media_type() const override { |
- return cricket::MEDIA_TYPE_VIDEO; |
- } |
- |
std::string id() const override { return id_; } |
- |
- void set_stream_id(const std::string& stream_id) override { |
- stream_id_ = stream_id; |
- } |
- std::string stream_id() const override { return stream_id_; } |
void Stop() override; |
private: |
- bool can_send_track() const { return track_ && ssrc_; } |
- // Helper function to construct options for |
- // VideoProviderInterface::SetVideoSend. |
- void SetVideoSend(); |
+ void Reconfigure(); |
std::string id_; |
- std::string stream_id_; |
+ rtc::scoped_refptr<VideoTrackInterface> track_; |
+ uint32_t ssrc_; |
VideoProviderInterface* provider_; |
- rtc::scoped_refptr<VideoTrackInterface> track_; |
- uint32_t ssrc_ = 0; |
- bool cached_track_enabled_ = false; |
- bool stopped_ = false; |
+ bool cached_track_enabled_; |
}; |
} // namespace webrtc |