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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 // not take the ownership of |decoder_factory|. The caller needs to make sure | 112 // not take the ownership of |decoder_factory|. The caller needs to make sure |
113 // that |decoder_factory| outlives the video engine. | 113 // that |decoder_factory| outlives the video engine. |
114 void SetExternalDecoderFactory(WebRtcVideoDecoderFactory* decoder_factory); | 114 void SetExternalDecoderFactory(WebRtcVideoDecoderFactory* decoder_factory); |
115 // Set a WebRtcVideoEncoderFactory for external encoding. Video engine does | 115 // Set a WebRtcVideoEncoderFactory for external encoding. Video engine does |
116 // not take the ownership of |encoder_factory|. The caller needs to make sure | 116 // not take the ownership of |encoder_factory|. The caller needs to make sure |
117 // that |encoder_factory| outlives the video engine. | 117 // that |encoder_factory| outlives the video engine. |
118 virtual void SetExternalEncoderFactory( | 118 virtual void SetExternalEncoderFactory( |
119 WebRtcVideoEncoderFactory* encoder_factory); | 119 WebRtcVideoEncoderFactory* encoder_factory); |
120 | 120 |
121 private: | 121 private: |
122 std::vector<VideoCodec> GetSupportedCodecs() const; | |
123 | |
124 std::vector<VideoCodec> video_codecs_; | 122 std::vector<VideoCodec> video_codecs_; |
125 | 123 |
126 bool initialized_; | 124 bool initialized_; |
127 | 125 |
128 WebRtcVideoDecoderFactory* external_decoder_factory_; | 126 WebRtcVideoDecoderFactory* external_decoder_factory_; |
129 WebRtcVideoEncoderFactory* external_encoder_factory_; | 127 WebRtcVideoEncoderFactory* external_encoder_factory_; |
130 std::unique_ptr<WebRtcVideoEncoderFactory> simulcast_encoder_factory_; | 128 std::unique_ptr<WebRtcVideoEncoderFactory> simulcast_encoder_factory_; |
131 }; | 129 }; |
132 | 130 |
133 class WebRtcVideoChannel2 : public VideoMediaChannel, public webrtc::Transport { | 131 class WebRtcVideoChannel2 : public VideoMediaChannel, public webrtc::Transport { |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 | 217 |
220 bool GetChangedSendParameters(const VideoSendParameters& params, | 218 bool GetChangedSendParameters(const VideoSendParameters& params, |
221 ChangedSendParameters* changed_params) const; | 219 ChangedSendParameters* changed_params) const; |
222 bool GetChangedRecvParameters(const VideoRecvParameters& params, | 220 bool GetChangedRecvParameters(const VideoRecvParameters& params, |
223 ChangedRecvParameters* changed_params) const; | 221 ChangedRecvParameters* changed_params) const; |
224 | 222 |
225 void SetMaxSendBandwidth(int bps); | 223 void SetMaxSendBandwidth(int bps); |
226 | 224 |
227 void ConfigureReceiverRtp(webrtc::VideoReceiveStream::Config* config, | 225 void ConfigureReceiverRtp(webrtc::VideoReceiveStream::Config* config, |
228 const StreamParams& sp) const; | 226 const StreamParams& sp) const; |
229 bool CodecIsExternallySupported(const std::string& name) const; | |
230 bool ValidateSendSsrcAvailability(const StreamParams& sp) const | 227 bool ValidateSendSsrcAvailability(const StreamParams& sp) const |
231 EXCLUSIVE_LOCKS_REQUIRED(stream_crit_); | 228 EXCLUSIVE_LOCKS_REQUIRED(stream_crit_); |
232 bool ValidateReceiveSsrcAvailability(const StreamParams& sp) const | 229 bool ValidateReceiveSsrcAvailability(const StreamParams& sp) const |
233 EXCLUSIVE_LOCKS_REQUIRED(stream_crit_); | 230 EXCLUSIVE_LOCKS_REQUIRED(stream_crit_); |
234 void DeleteReceiveStream(WebRtcVideoReceiveStream* stream) | 231 void DeleteReceiveStream(WebRtcVideoReceiveStream* stream) |
235 EXCLUSIVE_LOCKS_REQUIRED(stream_crit_); | 232 EXCLUSIVE_LOCKS_REQUIRED(stream_crit_); |
236 | 233 |
237 static std::string CodecSettingsVectorToString( | 234 static std::string CodecSettingsVectorToString( |
238 const std::vector<VideoCodecSettings>& codecs); | 235 const std::vector<VideoCodecSettings>& codecs); |
239 | 236 |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
537 VideoSendParameters send_params_; | 534 VideoSendParameters send_params_; |
538 VideoOptions default_send_options_; | 535 VideoOptions default_send_options_; |
539 VideoRecvParameters recv_params_; | 536 VideoRecvParameters recv_params_; |
540 bool red_disabled_by_remote_side_; | 537 bool red_disabled_by_remote_side_; |
541 int64_t last_stats_log_ms_; | 538 int64_t last_stats_log_ms_; |
542 }; | 539 }; |
543 | 540 |
544 } // namespace cricket | 541 } // namespace cricket |
545 | 542 |
546 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVIDEOENGINE2_H_ | 543 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVIDEOENGINE2_H_ |
OLD | NEW |