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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 WebRtcVideoDecoderFactory* external_decoder_factory_; | 126 WebRtcVideoDecoderFactory* external_decoder_factory_; |
127 WebRtcVideoEncoderFactory* external_encoder_factory_; | 127 WebRtcVideoEncoderFactory* external_encoder_factory_; |
128 std::unique_ptr<WebRtcVideoEncoderFactory> simulcast_encoder_factory_; | 128 std::unique_ptr<WebRtcVideoEncoderFactory> simulcast_encoder_factory_; |
129 }; | 129 }; |
130 | 130 |
131 class WebRtcVideoChannel2 : public VideoMediaChannel, public webrtc::Transport { | 131 class WebRtcVideoChannel2 : public VideoMediaChannel, public webrtc::Transport { |
132 public: | 132 public: |
133 WebRtcVideoChannel2(webrtc::Call* call, | 133 WebRtcVideoChannel2(webrtc::Call* call, |
134 const MediaConfig& config, | 134 const MediaConfig& config, |
135 const VideoOptions& options, | 135 const VideoOptions& options, |
136 const std::vector<VideoCodec>& recv_codecs, | |
137 WebRtcVideoEncoderFactory* external_encoder_factory, | 136 WebRtcVideoEncoderFactory* external_encoder_factory, |
138 WebRtcVideoDecoderFactory* external_decoder_factory); | 137 WebRtcVideoDecoderFactory* external_decoder_factory); |
139 ~WebRtcVideoChannel2() override; | 138 ~WebRtcVideoChannel2() override; |
140 | 139 |
141 // VideoMediaChannel implementation | 140 // VideoMediaChannel implementation |
142 rtc::DiffServCodePoint PreferredDscp() const override; | 141 rtc::DiffServCodePoint PreferredDscp() const override; |
143 | 142 |
144 bool SetSendParameters(const VideoSendParameters& params) override; | 143 bool SetSendParameters(const VideoSendParameters& params) override; |
145 bool SetRecvParameters(const VideoRecvParameters& params) override; | 144 bool SetRecvParameters(const VideoRecvParameters& params) override; |
146 webrtc::RtpParameters GetRtpSendParameters(uint32_t ssrc) const override; | 145 webrtc::RtpParameters GetRtpSendParameters(uint32_t ssrc) const override; |
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
467 | 466 |
468 void Construct(webrtc::Call* call, WebRtcVideoEngine2* engine); | 467 void Construct(webrtc::Call* call, WebRtcVideoEngine2* engine); |
469 | 468 |
470 bool SendRtp(const uint8_t* data, | 469 bool SendRtp(const uint8_t* data, |
471 size_t len, | 470 size_t len, |
472 const webrtc::PacketOptions& options) override; | 471 const webrtc::PacketOptions& options) override; |
473 bool SendRtcp(const uint8_t* data, size_t len) override; | 472 bool SendRtcp(const uint8_t* data, size_t len) override; |
474 | 473 |
475 static std::vector<VideoCodecSettings> MapCodecs( | 474 static std::vector<VideoCodecSettings> MapCodecs( |
476 const std::vector<VideoCodec>& codecs); | 475 const std::vector<VideoCodec>& codecs); |
477 std::vector<VideoCodecSettings> FilterSupportedCodecs( | 476 // Select what video codec will be used for sending, i.e. what codec is used |
478 const std::vector<VideoCodecSettings>& mapped_codecs) const; | 477 // for local encoding, based on supported remote codecs. The first remote |
| 478 // codec that is supported locally will be selected. |
| 479 rtc::Optional<VideoCodecSettings> SelectSendVideoCodec( |
| 480 const std::vector<VideoCodecSettings>& remote_mapped_codecs) const; |
| 481 |
479 static bool ReceiveCodecsHaveChanged(std::vector<VideoCodecSettings> before, | 482 static bool ReceiveCodecsHaveChanged(std::vector<VideoCodecSettings> before, |
480 std::vector<VideoCodecSettings> after); | 483 std::vector<VideoCodecSettings> after); |
481 | 484 |
482 void FillSenderStats(VideoMediaInfo* info, bool log_stats); | 485 void FillSenderStats(VideoMediaInfo* info, bool log_stats); |
483 void FillReceiverStats(VideoMediaInfo* info, bool log_stats); | 486 void FillReceiverStats(VideoMediaInfo* info, bool log_stats); |
484 void FillBandwidthEstimationStats(const webrtc::Call::Stats& stats, | 487 void FillBandwidthEstimationStats(const webrtc::Call::Stats& stats, |
485 VideoMediaInfo* info); | 488 VideoMediaInfo* info); |
486 | 489 |
487 rtc::ThreadChecker thread_checker_; | 490 rtc::ThreadChecker thread_checker_; |
488 | 491 |
(...skipping 28 matching lines...) Expand all Loading... |
517 VideoSendParameters send_params_; | 520 VideoSendParameters send_params_; |
518 VideoOptions default_send_options_; | 521 VideoOptions default_send_options_; |
519 VideoRecvParameters recv_params_; | 522 VideoRecvParameters recv_params_; |
520 bool red_disabled_by_remote_side_; | 523 bool red_disabled_by_remote_side_; |
521 int64_t last_stats_log_ms_; | 524 int64_t last_stats_log_ms_; |
522 }; | 525 }; |
523 | 526 |
524 } // namespace cricket | 527 } // namespace cricket |
525 | 528 |
526 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVIDEOENGINE2_H_ | 529 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVIDEOENGINE2_H_ |
OLD | NEW |