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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 bool SetRecvParameters(const VideoRecvParameters& params) override; | 149 bool SetRecvParameters(const VideoRecvParameters& params) override; |
150 webrtc::RtpParameters GetRtpSendParameters(uint32_t ssrc) const override; | 150 webrtc::RtpParameters GetRtpSendParameters(uint32_t ssrc) const override; |
151 bool SetRtpSendParameters(uint32_t ssrc, | 151 bool SetRtpSendParameters(uint32_t ssrc, |
152 const webrtc::RtpParameters& parameters) override; | 152 const webrtc::RtpParameters& parameters) override; |
153 webrtc::RtpParameters GetRtpReceiveParameters(uint32_t ssrc) const override; | 153 webrtc::RtpParameters GetRtpReceiveParameters(uint32_t ssrc) const override; |
154 bool SetRtpReceiveParameters( | 154 bool SetRtpReceiveParameters( |
155 uint32_t ssrc, | 155 uint32_t ssrc, |
156 const webrtc::RtpParameters& parameters) override; | 156 const webrtc::RtpParameters& parameters) override; |
157 bool GetSendCodec(VideoCodec* send_codec) override; | 157 bool GetSendCodec(VideoCodec* send_codec) override; |
158 bool SetSend(bool send) override; | 158 bool SetSend(bool send) override; |
159 bool SetVideoSend(uint32_t ssrc, | 159 bool SetVideoSend( |
160 bool mute, | 160 uint32_t ssrc, |
161 const VideoOptions* options) override; | 161 bool enable, |
| 162 const VideoOptions* options, |
| 163 rtc::VideoSourceInterface<cricket::VideoFrame>* source) override; |
162 bool AddSendStream(const StreamParams& sp) override; | 164 bool AddSendStream(const StreamParams& sp) override; |
163 bool RemoveSendStream(uint32_t ssrc) override; | 165 bool RemoveSendStream(uint32_t ssrc) override; |
164 bool AddRecvStream(const StreamParams& sp) override; | 166 bool AddRecvStream(const StreamParams& sp) override; |
165 bool AddRecvStream(const StreamParams& sp, bool default_stream); | 167 bool AddRecvStream(const StreamParams& sp, bool default_stream); |
166 bool RemoveRecvStream(uint32_t ssrc) override; | 168 bool RemoveRecvStream(uint32_t ssrc) override; |
167 bool SetSink(uint32_t ssrc, | 169 bool SetSink(uint32_t ssrc, |
168 rtc::VideoSinkInterface<VideoFrame>* sink) override; | 170 rtc::VideoSinkInterface<VideoFrame>* sink) override; |
169 bool GetStats(VideoMediaInfo* info) override; | 171 bool GetStats(VideoMediaInfo* info) override; |
170 void SetSource( | |
171 uint32_t ssrc, | |
172 rtc::VideoSourceInterface<cricket::VideoFrame>* source) override; | |
173 | 172 |
174 void OnPacketReceived(rtc::CopyOnWriteBuffer* packet, | 173 void OnPacketReceived(rtc::CopyOnWriteBuffer* packet, |
175 const rtc::PacketTime& packet_time) override; | 174 const rtc::PacketTime& packet_time) override; |
176 void OnRtcpReceived(rtc::CopyOnWriteBuffer* packet, | 175 void OnRtcpReceived(rtc::CopyOnWriteBuffer* packet, |
177 const rtc::PacketTime& packet_time) override; | 176 const rtc::PacketTime& packet_time) override; |
178 void OnReadyToSend(bool ready) override; | 177 void OnReadyToSend(bool ready) override; |
179 void OnNetworkRouteChanged(const std::string& transport_name, | 178 void OnNetworkRouteChanged(const std::string& transport_name, |
180 const rtc::NetworkRoute& network_route) override; | 179 const rtc::NetworkRoute& network_route) override; |
181 void SetInterface(NetworkInterface* iface) override; | 180 void SetInterface(NetworkInterface* iface) override; |
182 | 181 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 rtc::Optional<std::vector<VideoCodecSettings>> codec_settings; | 218 rtc::Optional<std::vector<VideoCodecSettings>> codec_settings; |
220 rtc::Optional<std::vector<webrtc::RtpExtension>> rtp_header_extensions; | 219 rtc::Optional<std::vector<webrtc::RtpExtension>> rtp_header_extensions; |
221 }; | 220 }; |
222 | 221 |
223 bool GetChangedSendParameters(const VideoSendParameters& params, | 222 bool GetChangedSendParameters(const VideoSendParameters& params, |
224 ChangedSendParameters* changed_params) const; | 223 ChangedSendParameters* changed_params) const; |
225 bool GetChangedRecvParameters(const VideoRecvParameters& params, | 224 bool GetChangedRecvParameters(const VideoRecvParameters& params, |
226 ChangedRecvParameters* changed_params) const; | 225 ChangedRecvParameters* changed_params) const; |
227 | 226 |
228 void SetMaxSendBandwidth(int bps); | 227 void SetMaxSendBandwidth(int bps); |
229 void SetOptions(uint32_t ssrc, const VideoOptions& options); | |
230 | 228 |
231 void ConfigureReceiverRtp(webrtc::VideoReceiveStream::Config* config, | 229 void ConfigureReceiverRtp(webrtc::VideoReceiveStream::Config* config, |
232 const StreamParams& sp) const; | 230 const StreamParams& sp) const; |
233 bool CodecIsExternallySupported(const std::string& name) const; | 231 bool CodecIsExternallySupported(const std::string& name) const; |
234 bool ValidateSendSsrcAvailability(const StreamParams& sp) const | 232 bool ValidateSendSsrcAvailability(const StreamParams& sp) const |
235 EXCLUSIVE_LOCKS_REQUIRED(stream_crit_); | 233 EXCLUSIVE_LOCKS_REQUIRED(stream_crit_); |
236 bool ValidateReceiveSsrcAvailability(const StreamParams& sp) const | 234 bool ValidateReceiveSsrcAvailability(const StreamParams& sp) const |
237 EXCLUSIVE_LOCKS_REQUIRED(stream_crit_); | 235 EXCLUSIVE_LOCKS_REQUIRED(stream_crit_); |
238 void DeleteReceiveStream(WebRtcVideoReceiveStream* stream) | 236 void DeleteReceiveStream(WebRtcVideoReceiveStream* stream) |
239 EXCLUSIVE_LOCKS_REQUIRED(stream_crit_); | 237 EXCLUSIVE_LOCKS_REQUIRED(stream_crit_); |
(...skipping 13 matching lines...) Expand all Loading... |
253 const webrtc::VideoSendStream::Config& config, | 251 const webrtc::VideoSendStream::Config& config, |
254 const VideoOptions& options, | 252 const VideoOptions& options, |
255 WebRtcVideoEncoderFactory* external_encoder_factory, | 253 WebRtcVideoEncoderFactory* external_encoder_factory, |
256 bool enable_cpu_overuse_detection, | 254 bool enable_cpu_overuse_detection, |
257 int max_bitrate_bps, | 255 int max_bitrate_bps, |
258 const rtc::Optional<VideoCodecSettings>& codec_settings, | 256 const rtc::Optional<VideoCodecSettings>& codec_settings, |
259 const std::vector<webrtc::RtpExtension>& rtp_extensions, | 257 const std::vector<webrtc::RtpExtension>& rtp_extensions, |
260 const VideoSendParameters& send_params); | 258 const VideoSendParameters& send_params); |
261 virtual ~WebRtcVideoSendStream(); | 259 virtual ~WebRtcVideoSendStream(); |
262 | 260 |
263 void SetOptions(const VideoOptions& options); | |
264 // TODO(pbos): Move logic from SetOptions into this method. | |
265 void SetSendParameters(const ChangedSendParameters& send_params); | 261 void SetSendParameters(const ChangedSendParameters& send_params); |
266 bool SetRtpParameters(const webrtc::RtpParameters& parameters); | 262 bool SetRtpParameters(const webrtc::RtpParameters& parameters); |
267 webrtc::RtpParameters GetRtpParameters() const; | 263 webrtc::RtpParameters GetRtpParameters() const; |
268 | 264 |
269 void OnFrame(const cricket::VideoFrame& frame) override; | 265 void OnFrame(const cricket::VideoFrame& frame) override; |
270 void SetSource(rtc::VideoSourceInterface<cricket::VideoFrame>* source); | 266 bool SetVideoSend(bool mute, |
| 267 const VideoOptions* options, |
| 268 rtc::VideoSourceInterface<cricket::VideoFrame>* source); |
271 void DisconnectSource(); | 269 void DisconnectSource(); |
272 | 270 |
273 void SetSend(bool send); | 271 void SetSend(bool send); |
274 | 272 |
275 // Implements webrtc::LoadObserver. | 273 // Implements webrtc::LoadObserver. |
276 void OnLoadUpdate(Load load) override; | 274 void OnLoadUpdate(Load load) override; |
277 | 275 |
278 const std::vector<uint32_t>& GetSsrcs() const; | 276 const std::vector<uint32_t>& GetSsrcs() const; |
279 VideoSenderInfo GetVideoSenderInfo(); | 277 VideoSenderInfo GetVideoSenderInfo(); |
280 void FillBandwidthEstimationInfo(BandwidthEstimationInfo* bwe_info); | 278 void FillBandwidthEstimationInfo(BandwidthEstimationInfo* bwe_info); |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
551 // send_params/recv_params, rtp_extensions, options, etc. | 549 // send_params/recv_params, rtp_extensions, options, etc. |
552 VideoSendParameters send_params_; | 550 VideoSendParameters send_params_; |
553 VideoOptions default_send_options_; | 551 VideoOptions default_send_options_; |
554 VideoRecvParameters recv_params_; | 552 VideoRecvParameters recv_params_; |
555 bool red_disabled_by_remote_side_; | 553 bool red_disabled_by_remote_side_; |
556 }; | 554 }; |
557 | 555 |
558 } // namespace cricket | 556 } // namespace cricket |
559 | 557 |
560 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVIDEOENGINE2_H_ | 558 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVIDEOENGINE2_H_ |
OLD | NEW |