OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 rtc::DiffServCodePoint PreferredDscp() const override; | 143 rtc::DiffServCodePoint PreferredDscp() const override; |
144 | 144 |
145 bool SetSendParameters(const VideoSendParameters& params) override; | 145 bool SetSendParameters(const VideoSendParameters& params) override; |
146 bool SetRecvParameters(const VideoRecvParameters& params) override; | 146 bool SetRecvParameters(const VideoRecvParameters& params) override; |
147 webrtc::RtpParameters GetRtpParameters(uint32_t ssrc) const override; | 147 webrtc::RtpParameters GetRtpParameters(uint32_t ssrc) const override; |
148 bool SetRtpParameters(uint32_t ssrc, | 148 bool SetRtpParameters(uint32_t ssrc, |
149 const webrtc::RtpParameters& parameters) override; | 149 const webrtc::RtpParameters& parameters) override; |
150 bool GetSendCodec(VideoCodec* send_codec) override; | 150 bool GetSendCodec(VideoCodec* send_codec) override; |
151 bool SetSend(bool send) override; | 151 bool SetSend(bool send) override; |
152 bool SetVideoSend(uint32_t ssrc, | 152 bool SetVideoSend(uint32_t ssrc, |
153 bool mute, | 153 bool enable, |
154 const VideoOptions* options) override; | 154 const VideoOptions* options, |
| 155 VideoCapturer* capturer) override; |
155 bool AddSendStream(const StreamParams& sp) override; | 156 bool AddSendStream(const StreamParams& sp) override; |
156 bool RemoveSendStream(uint32_t ssrc) override; | 157 bool RemoveSendStream(uint32_t ssrc) override; |
157 bool AddRecvStream(const StreamParams& sp) override; | 158 bool AddRecvStream(const StreamParams& sp) override; |
158 bool AddRecvStream(const StreamParams& sp, bool default_stream); | 159 bool AddRecvStream(const StreamParams& sp, bool default_stream); |
159 bool RemoveRecvStream(uint32_t ssrc) override; | 160 bool RemoveRecvStream(uint32_t ssrc) override; |
160 bool SetSink(uint32_t ssrc, | 161 bool SetSink(uint32_t ssrc, |
161 rtc::VideoSinkInterface<VideoFrame>* sink) override; | 162 rtc::VideoSinkInterface<VideoFrame>* sink) override; |
162 bool GetStats(VideoMediaInfo* info) override; | 163 bool GetStats(VideoMediaInfo* info) override; |
163 bool SetCapturer(uint32_t ssrc, VideoCapturer* capturer) override; | |
164 | 164 |
165 void OnPacketReceived(rtc::CopyOnWriteBuffer* packet, | 165 void OnPacketReceived(rtc::CopyOnWriteBuffer* packet, |
166 const rtc::PacketTime& packet_time) override; | 166 const rtc::PacketTime& packet_time) override; |
167 void OnRtcpReceived(rtc::CopyOnWriteBuffer* packet, | 167 void OnRtcpReceived(rtc::CopyOnWriteBuffer* packet, |
168 const rtc::PacketTime& packet_time) override; | 168 const rtc::PacketTime& packet_time) override; |
169 void OnReadyToSend(bool ready) override; | 169 void OnReadyToSend(bool ready) override; |
170 void SetInterface(NetworkInterface* iface) override; | 170 void SetInterface(NetworkInterface* iface) override; |
171 | 171 |
172 // Implemented for VideoMediaChannelTest. | 172 // Implemented for VideoMediaChannelTest. |
173 bool sending() const { return sending_; } | 173 bool sending() const { return sending_; } |
(...skipping 24 matching lines...) Expand all Loading... |
198 // These optionals are unset if not changed. | 198 // These optionals are unset if not changed. |
199 rtc::Optional<std::vector<VideoCodecSettings>> codec_settings; | 199 rtc::Optional<std::vector<VideoCodecSettings>> codec_settings; |
200 rtc::Optional<std::vector<webrtc::RtpExtension>> rtp_header_extensions; | 200 rtc::Optional<std::vector<webrtc::RtpExtension>> rtp_header_extensions; |
201 }; | 201 }; |
202 | 202 |
203 bool GetChangedSendParameters(const VideoSendParameters& params, | 203 bool GetChangedSendParameters(const VideoSendParameters& params, |
204 ChangedSendParameters* changed_params) const; | 204 ChangedSendParameters* changed_params) const; |
205 bool GetChangedRecvParameters(const VideoRecvParameters& params, | 205 bool GetChangedRecvParameters(const VideoRecvParameters& params, |
206 ChangedRecvParameters* changed_params) const; | 206 ChangedRecvParameters* changed_params) const; |
207 | 207 |
208 bool MuteStream(uint32_t ssrc, bool mute); | |
209 | |
210 void SetMaxSendBandwidth(int bps); | 208 void SetMaxSendBandwidth(int bps); |
211 void SetOptions(uint32_t ssrc, const VideoOptions& options); | |
212 | 209 |
213 void ConfigureReceiverRtp(webrtc::VideoReceiveStream::Config* config, | 210 void ConfigureReceiverRtp(webrtc::VideoReceiveStream::Config* config, |
214 const StreamParams& sp) const; | 211 const StreamParams& sp) const; |
215 bool CodecIsExternallySupported(const std::string& name) const; | 212 bool CodecIsExternallySupported(const std::string& name) const; |
216 bool ValidateSendSsrcAvailability(const StreamParams& sp) const | 213 bool ValidateSendSsrcAvailability(const StreamParams& sp) const |
217 EXCLUSIVE_LOCKS_REQUIRED(stream_crit_); | 214 EXCLUSIVE_LOCKS_REQUIRED(stream_crit_); |
218 bool ValidateReceiveSsrcAvailability(const StreamParams& sp) const | 215 bool ValidateReceiveSsrcAvailability(const StreamParams& sp) const |
219 EXCLUSIVE_LOCKS_REQUIRED(stream_crit_); | 216 EXCLUSIVE_LOCKS_REQUIRED(stream_crit_); |
220 void DeleteReceiveStream(WebRtcVideoReceiveStream* stream) | 217 void DeleteReceiveStream(WebRtcVideoReceiveStream* stream) |
221 EXCLUSIVE_LOCKS_REQUIRED(stream_crit_); | 218 EXCLUSIVE_LOCKS_REQUIRED(stream_crit_); |
(...skipping 13 matching lines...) Expand all Loading... |
235 const webrtc::VideoSendStream::Config& config, | 232 const webrtc::VideoSendStream::Config& config, |
236 const VideoOptions& options, | 233 const VideoOptions& options, |
237 WebRtcVideoEncoderFactory* external_encoder_factory, | 234 WebRtcVideoEncoderFactory* external_encoder_factory, |
238 bool enable_cpu_overuse_detection, | 235 bool enable_cpu_overuse_detection, |
239 int max_bitrate_bps, | 236 int max_bitrate_bps, |
240 const rtc::Optional<VideoCodecSettings>& codec_settings, | 237 const rtc::Optional<VideoCodecSettings>& codec_settings, |
241 const std::vector<webrtc::RtpExtension>& rtp_extensions, | 238 const std::vector<webrtc::RtpExtension>& rtp_extensions, |
242 const VideoSendParameters& send_params); | 239 const VideoSendParameters& send_params); |
243 virtual ~WebRtcVideoSendStream(); | 240 virtual ~WebRtcVideoSendStream(); |
244 | 241 |
245 void SetOptions(const VideoOptions& options); | |
246 // TODO(pbos): Move logic from SetOptions into this method. | |
247 void SetSendParameters(const ChangedSendParameters& send_params); | 242 void SetSendParameters(const ChangedSendParameters& send_params); |
248 bool SetRtpParameters(const webrtc::RtpParameters& parameters); | 243 bool SetRtpParameters(const webrtc::RtpParameters& parameters); |
249 webrtc::RtpParameters GetRtpParameters() const; | 244 webrtc::RtpParameters GetRtpParameters() const; |
250 | 245 |
251 void OnFrame(const cricket::VideoFrame& frame) override; | 246 void OnFrame(const cricket::VideoFrame& frame) override; |
252 bool SetCapturer(VideoCapturer* capturer); | 247 bool SetVideoSend(bool mute, |
253 void MuteStream(bool mute); | 248 const VideoOptions* options, |
| 249 VideoCapturer* capturer); |
254 bool DisconnectCapturer(); | 250 bool DisconnectCapturer(); |
255 | 251 |
256 void SetSend(bool send); | 252 void SetSend(bool send); |
257 | 253 |
258 // Implements webrtc::LoadObserver. | 254 // Implements webrtc::LoadObserver. |
259 void OnLoadUpdate(Load load) override; | 255 void OnLoadUpdate(Load load) override; |
260 | 256 |
261 const std::vector<uint32_t>& GetSsrcs() const; | 257 const std::vector<uint32_t>& GetSsrcs() const; |
262 VideoSenderInfo GetVideoSenderInfo(); | 258 VideoSenderInfo GetVideoSenderInfo(); |
263 void FillBandwidthEstimationInfo(BandwidthEstimationInfo* bwe_info); | 259 void FillBandwidthEstimationInfo(BandwidthEstimationInfo* bwe_info); |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
523 // TODO(deadbeef): Don't duplicate information between | 519 // TODO(deadbeef): Don't duplicate information between |
524 // send_params/recv_params, rtp_extensions, options, etc. | 520 // send_params/recv_params, rtp_extensions, options, etc. |
525 VideoSendParameters send_params_; | 521 VideoSendParameters send_params_; |
526 VideoOptions default_send_options_; | 522 VideoOptions default_send_options_; |
527 VideoRecvParameters recv_params_; | 523 VideoRecvParameters recv_params_; |
528 }; | 524 }; |
529 | 525 |
530 } // namespace cricket | 526 } // namespace cricket |
531 | 527 |
532 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVIDEOENGINE2_H_ | 528 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVIDEOENGINE2_H_ |
OLD | NEW |