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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
243 WebRtcVideoSendStream( | 243 WebRtcVideoSendStream( |
244 webrtc::Call* call, | 244 webrtc::Call* call, |
245 const StreamParams& sp, | 245 const StreamParams& sp, |
246 webrtc::VideoSendStream::Config config, | 246 webrtc::VideoSendStream::Config config, |
247 const VideoOptions& options, | 247 const VideoOptions& options, |
248 WebRtcVideoEncoderFactory* external_encoder_factory, | 248 WebRtcVideoEncoderFactory* external_encoder_factory, |
249 bool enable_cpu_overuse_detection, | 249 bool enable_cpu_overuse_detection, |
250 int max_bitrate_bps, | 250 int max_bitrate_bps, |
251 const rtc::Optional<VideoCodecSettings>& codec_settings, | 251 const rtc::Optional<VideoCodecSettings>& codec_settings, |
252 const rtc::Optional<std::vector<webrtc::RtpExtension>>& rtp_extensions, | 252 const rtc::Optional<std::vector<webrtc::RtpExtension>>& rtp_extensions, |
253 const VideoSendParameters& send_params); | 253 const VideoSendParameters& send_params, |
254 bool map_flexfec_send); | |
254 virtual ~WebRtcVideoSendStream(); | 255 virtual ~WebRtcVideoSendStream(); |
255 | 256 |
256 void SetSendParameters(const ChangedSendParameters& send_params); | 257 void SetSendParameters(const ChangedSendParameters& send_params); |
257 bool SetRtpParameters(const webrtc::RtpParameters& parameters); | 258 bool SetRtpParameters(const webrtc::RtpParameters& parameters); |
258 webrtc::RtpParameters GetRtpParameters() const; | 259 webrtc::RtpParameters GetRtpParameters() const; |
259 | 260 |
260 // Implements rtc::VideoSourceInterface<webrtc::VideoFrame>. | 261 // Implements rtc::VideoSourceInterface<webrtc::VideoFrame>. |
261 // WebRtcVideoSendStream acts as a source to the webrtc::VideoSendStream | 262 // WebRtcVideoSendStream acts as a source to the webrtc::VideoSendStream |
262 // in |stream_|. This is done to proxy VideoSinkWants from the encoder to | 263 // in |stream_|. This is done to proxy VideoSinkWants from the encoder to |
263 // the worker thread. | 264 // the worker thread. |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
445 int64_t estimated_remote_start_ntp_time_ms_ GUARDED_BY(sink_lock_); | 446 int64_t estimated_remote_start_ntp_time_ms_ GUARDED_BY(sink_lock_); |
446 }; | 447 }; |
447 | 448 |
448 void Construct(webrtc::Call* call, WebRtcVideoEngine2* engine); | 449 void Construct(webrtc::Call* call, WebRtcVideoEngine2* engine); |
449 | 450 |
450 bool SendRtp(const uint8_t* data, | 451 bool SendRtp(const uint8_t* data, |
451 size_t len, | 452 size_t len, |
452 const webrtc::PacketOptions& options) override; | 453 const webrtc::PacketOptions& options) override; |
453 bool SendRtcp(const uint8_t* data, size_t len) override; | 454 bool SendRtcp(const uint8_t* data, size_t len) override; |
454 | 455 |
456 // If |map_flexfec| is true and if the "flexfec-03" SDP codec exists in | |
457 // |codecs|, its payload type will be mapped to the VideoCodecSettings of the | |
perkj_webrtc
2017/05/12 12:05:06
/s all ?
brandtr
2017/05/15 12:24:13
Moved the logic instead.
| |
458 // media codecs. | |
455 static std::vector<VideoCodecSettings> MapCodecs( | 459 static std::vector<VideoCodecSettings> MapCodecs( |
456 const std::vector<VideoCodec>& codecs); | 460 const std::vector<VideoCodec>& codecs, |
461 bool map_flexfec); | |
457 // Select what video codec will be used for sending, i.e. what codec is used | 462 // Select what video codec will be used for sending, i.e. what codec is used |
458 // for local encoding, based on supported remote codecs. The first remote | 463 // for local encoding, based on supported remote codecs. The first remote |
459 // codec that is supported locally will be selected. | 464 // codec that is supported locally will be selected. |
460 rtc::Optional<VideoCodecSettings> SelectSendVideoCodec( | 465 rtc::Optional<VideoCodecSettings> SelectSendVideoCodec( |
461 const std::vector<VideoCodecSettings>& remote_mapped_codecs) const; | 466 const std::vector<VideoCodecSettings>& remote_mapped_codecs) const; |
462 | 467 |
463 static bool ReceiveCodecsHaveChanged(std::vector<VideoCodecSettings> before, | 468 static bool ReceiveCodecsHaveChanged(std::vector<VideoCodecSettings> before, |
464 std::vector<VideoCodecSettings> after); | 469 std::vector<VideoCodecSettings> after); |
465 | 470 |
466 void FillSenderStats(VideoMediaInfo* info, bool log_stats); | 471 void FillSenderStats(VideoMediaInfo* info, bool log_stats); |
(...skipping 29 matching lines...) Expand all Loading... | |
496 WebRtcVideoDecoderFactory* const external_decoder_factory_; | 501 WebRtcVideoDecoderFactory* const external_decoder_factory_; |
497 std::vector<VideoCodecSettings> recv_codecs_; | 502 std::vector<VideoCodecSettings> recv_codecs_; |
498 std::vector<webrtc::RtpExtension> recv_rtp_extensions_; | 503 std::vector<webrtc::RtpExtension> recv_rtp_extensions_; |
499 webrtc::Call::Config::BitrateConfig bitrate_config_; | 504 webrtc::Call::Config::BitrateConfig bitrate_config_; |
500 // TODO(deadbeef): Don't duplicate information between | 505 // TODO(deadbeef): Don't duplicate information between |
501 // send_params/recv_params, rtp_extensions, options, etc. | 506 // send_params/recv_params, rtp_extensions, options, etc. |
502 VideoSendParameters send_params_; | 507 VideoSendParameters send_params_; |
503 VideoOptions default_send_options_; | 508 VideoOptions default_send_options_; |
504 VideoRecvParameters recv_params_; | 509 VideoRecvParameters recv_params_; |
505 int64_t last_stats_log_ms_; | 510 int64_t last_stats_log_ms_; |
511 | |
512 const bool map_flexfec_recv_; | |
perkj_webrtc
2017/05/12 12:05:05
Can we add a comment what these two means?
brandtr
2017/05/15 12:24:13
Removed instead.
| |
513 const bool map_flexfec_send_; | |
506 }; | 514 }; |
507 | 515 |
508 } // namespace cricket | 516 } // namespace cricket |
509 | 517 |
510 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVIDEOENGINE2_H_ | 518 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVIDEOENGINE2_H_ |
OLD | NEW |