Chromium Code Reviews| Index: webrtc/media/engine/webrtcvideoengine2.h |
| diff --git a/webrtc/media/engine/webrtcvideoengine2.h b/webrtc/media/engine/webrtcvideoengine2.h |
| index 27eadb299ae69160ba7d9a41ca38c74463f4b691..5efce960bf51d18969e70f818d3e00cedf7918aa 100644 |
| --- a/webrtc/media/engine/webrtcvideoengine2.h |
| +++ b/webrtc/media/engine/webrtcvideoengine2.h |
| @@ -254,10 +254,12 @@ class WebRtcVideoChannel2 : public VideoMediaChannel, public webrtc::Transport { |
| void MuteStream(bool mute); |
| bool DisconnectCapturer(); |
| - void Start(); |
| - void Stop(); |
| + void SetSend(bool send); |
| - webrtc::RtpParameters rtp_parameters() const { return rtp_parameters_; } |
| + webrtc::RtpParameters rtp_parameters() const { |
| + rtc::CritScope cs(&lock_); |
|
pbos-webrtc
2016/03/22 18:13:43
This became non-trivial, move to .cc file.
Taylor Brandstetter
2016/03/22 18:32:43
Done.
|
| + return rtp_parameters_; |
| + } |
| // Implements webrtc::LoadObserver. |
| void OnLoadUpdate(Load load) override; |
| @@ -267,6 +269,10 @@ class WebRtcVideoChannel2 : public VideoMediaChannel, public webrtc::Transport { |
| void FillBandwidthEstimationInfo(BandwidthEstimationInfo* bwe_info); |
| private: |
| + // Calls Start or Stop according to whether or not |sending_| is true, |
| + // and whether or not the encoding in |rtp_parameters_| is active. |
| + void UpdateSendState(); |
|
pbos-webrtc
2016/03/22 18:13:43
put EXCLUSIVE_LOCKS_REQUIRED(lock_) before ; to ha
Taylor Brandstetter
2016/03/22 18:32:43
Somehow I didn't notice the other methods and that
|
| + |
| // Parameters needed to reconstruct the underlying stream. |
| // webrtc::VideoSendStream doesn't support setting a lot of options on the |
| // fly, so when those need to be changed we tear down and reconstruct with |
| @@ -372,7 +378,7 @@ class WebRtcVideoChannel2 : public VideoMediaChannel, public webrtc::Transport { |
| // TODO(skvlad): Move ssrcs_ and ssrc_groups_ into rtp_parameters_. |
| // TODO(skvlad): Combine parameters_ and rtp_parameters_ once we have only |
| // one stream per MediaChannel. |
| - webrtc::RtpParameters rtp_parameters_; |
| + webrtc::RtpParameters rtp_parameters_ GUARDED_BY(lock_); |
| bool pending_encoder_reconfiguration_ GUARDED_BY(lock_); |
| VideoEncoderSettings encoder_settings_ GUARDED_BY(lock_); |
| AllocatedEncoder allocated_encoder_ GUARDED_BY(lock_); |
| @@ -482,9 +488,6 @@ class WebRtcVideoChannel2 : public VideoMediaChannel, public webrtc::Transport { |
| const webrtc::PacketOptions& options) override; |
| bool SendRtcp(const uint8_t* data, size_t len) override; |
| - void StartAllSendStreams(); |
| - void StopAllSendStreams(); |
| - |
| static std::vector<VideoCodecSettings> MapCodecs( |
| const std::vector<VideoCodec>& codecs); |
| std::vector<VideoCodecSettings> FilterSupportedCodecs( |