| 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 |
| 11 #ifndef WEBRTC_MEDIA_ENGINE_WEBRTCVIDEOENGINE2_H_ | 11 #ifndef WEBRTC_MEDIA_ENGINE_WEBRTCVIDEOENGINE2_H_ |
| 12 #define WEBRTC_MEDIA_ENGINE_WEBRTCVIDEOENGINE2_H_ | 12 #define WEBRTC_MEDIA_ENGINE_WEBRTCVIDEOENGINE2_H_ |
| 13 | 13 |
| 14 #include <map> | 14 #include <map> |
| 15 #include <memory> | 15 #include <memory> |
| 16 #include <set> | 16 #include <set> |
| 17 #include <string> | 17 #include <string> |
| 18 #include <vector> | 18 #include <vector> |
| 19 | 19 |
| 20 #include "webrtc/base/asyncinvoker.h" | 20 #include "webrtc/base/asyncinvoker.h" |
| 21 #include "webrtc/base/criticalsection.h" | 21 #include "webrtc/base/criticalsection.h" |
| 22 #include "webrtc/base/networkroute.h" | 22 #include "webrtc/base/networkroute.h" |
| 23 #include "webrtc/base/thread_annotations.h" | 23 #include "webrtc/base/thread_annotations.h" |
| 24 #include "webrtc/base/thread_checker.h" | 24 #include "webrtc/base/thread_checker.h" |
| 25 #include "webrtc/media/base/videosinkinterface.h" | 25 #include "webrtc/media/base/videosinkinterface.h" |
| 26 #include "webrtc/media/base/videosourceinterface.h" | 26 #include "webrtc/media/base/videosourceinterface.h" |
| 27 #include "webrtc/call.h" | 27 #include "webrtc/call.h" |
| 28 #include "webrtc/media/base/mediaengine.h" | 28 #include "webrtc/media/base/mediaengine.h" |
| 29 #include "webrtc/media/base/videoframe.h" |
| 29 #include "webrtc/media/engine/webrtcvideodecoderfactory.h" | 30 #include "webrtc/media/engine/webrtcvideodecoderfactory.h" |
| 30 #include "webrtc/media/engine/webrtcvideoencoderfactory.h" | 31 #include "webrtc/media/engine/webrtcvideoencoderfactory.h" |
| 31 #include "webrtc/transport.h" | 32 #include "webrtc/transport.h" |
| 32 #include "webrtc/video_frame.h" | |
| 33 #include "webrtc/video_receive_stream.h" | 33 #include "webrtc/video_receive_stream.h" |
| 34 #include "webrtc/video_send_stream.h" | 34 #include "webrtc/video_send_stream.h" |
| 35 | 35 |
| 36 namespace webrtc { | 36 namespace webrtc { |
| 37 class VideoDecoder; | 37 class VideoDecoder; |
| 38 class VideoEncoder; | 38 class VideoEncoder; |
| 39 struct MediaConfig; | 39 struct MediaConfig; |
| 40 } | 40 } |
| 41 | 41 |
| 42 namespace rtc { | 42 namespace rtc { |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 virtual ~UnsignalledSsrcHandler() = default; | 75 virtual ~UnsignalledSsrcHandler() = default; |
| 76 }; | 76 }; |
| 77 | 77 |
| 78 // TODO(pbos): Remove, use external handlers only. | 78 // TODO(pbos): Remove, use external handlers only. |
| 79 class DefaultUnsignalledSsrcHandler : public UnsignalledSsrcHandler { | 79 class DefaultUnsignalledSsrcHandler : public UnsignalledSsrcHandler { |
| 80 public: | 80 public: |
| 81 DefaultUnsignalledSsrcHandler(); | 81 DefaultUnsignalledSsrcHandler(); |
| 82 Action OnUnsignalledSsrc(WebRtcVideoChannel2* channel, | 82 Action OnUnsignalledSsrc(WebRtcVideoChannel2* channel, |
| 83 uint32_t ssrc) override; | 83 uint32_t ssrc) override; |
| 84 | 84 |
| 85 rtc::VideoSinkInterface<webrtc::VideoFrame>* GetDefaultSink() const; | 85 rtc::VideoSinkInterface<VideoFrame>* GetDefaultSink() const; |
| 86 void SetDefaultSink(VideoMediaChannel* channel, | 86 void SetDefaultSink(VideoMediaChannel* channel, |
| 87 rtc::VideoSinkInterface<webrtc::VideoFrame>* sink); | 87 rtc::VideoSinkInterface<VideoFrame>* sink); |
| 88 virtual ~DefaultUnsignalledSsrcHandler() = default; | 88 virtual ~DefaultUnsignalledSsrcHandler() = default; |
| 89 | 89 |
| 90 private: | 90 private: |
| 91 uint32_t default_recv_ssrc_; | 91 uint32_t default_recv_ssrc_; |
| 92 rtc::VideoSinkInterface<webrtc::VideoFrame>* default_sink_; | 92 rtc::VideoSinkInterface<VideoFrame>* default_sink_; |
| 93 }; | 93 }; |
| 94 | 94 |
| 95 // WebRtcVideoEngine2 is used for the new native WebRTC Video API (webrtc:1667). | 95 // WebRtcVideoEngine2 is used for the new native WebRTC Video API (webrtc:1667). |
| 96 class WebRtcVideoEngine2 { | 96 class WebRtcVideoEngine2 { |
| 97 public: | 97 public: |
| 98 WebRtcVideoEngine2(); | 98 WebRtcVideoEngine2(); |
| 99 virtual ~WebRtcVideoEngine2(); | 99 virtual ~WebRtcVideoEngine2(); |
| 100 | 100 |
| 101 // Basic video engine implementation. | 101 // Basic video engine implementation. |
| 102 void Init(); | 102 void Init(); |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 webrtc::RtpParameters GetRtpReceiveParameters(uint32_t ssrc) const override; | 149 webrtc::RtpParameters GetRtpReceiveParameters(uint32_t ssrc) const override; |
| 150 bool SetRtpReceiveParameters( | 150 bool SetRtpReceiveParameters( |
| 151 uint32_t ssrc, | 151 uint32_t ssrc, |
| 152 const webrtc::RtpParameters& parameters) override; | 152 const webrtc::RtpParameters& parameters) override; |
| 153 bool GetSendCodec(VideoCodec* send_codec) override; | 153 bool GetSendCodec(VideoCodec* send_codec) override; |
| 154 bool SetSend(bool send) override; | 154 bool SetSend(bool send) override; |
| 155 bool SetVideoSend( | 155 bool SetVideoSend( |
| 156 uint32_t ssrc, | 156 uint32_t ssrc, |
| 157 bool enable, | 157 bool enable, |
| 158 const VideoOptions* options, | 158 const VideoOptions* options, |
| 159 rtc::VideoSourceInterface<webrtc::VideoFrame>* source) override; | 159 rtc::VideoSourceInterface<cricket::VideoFrame>* source) override; |
| 160 bool AddSendStream(const StreamParams& sp) override; | 160 bool AddSendStream(const StreamParams& sp) override; |
| 161 bool RemoveSendStream(uint32_t ssrc) override; | 161 bool RemoveSendStream(uint32_t ssrc) override; |
| 162 bool AddRecvStream(const StreamParams& sp) override; | 162 bool AddRecvStream(const StreamParams& sp) override; |
| 163 bool AddRecvStream(const StreamParams& sp, bool default_stream); | 163 bool AddRecvStream(const StreamParams& sp, bool default_stream); |
| 164 bool RemoveRecvStream(uint32_t ssrc) override; | 164 bool RemoveRecvStream(uint32_t ssrc) override; |
| 165 bool SetSink(uint32_t ssrc, | 165 bool SetSink(uint32_t ssrc, |
| 166 rtc::VideoSinkInterface<webrtc::VideoFrame>* sink) override; | 166 rtc::VideoSinkInterface<VideoFrame>* sink) override; |
| 167 bool GetStats(VideoMediaInfo* info) override; | 167 bool GetStats(VideoMediaInfo* info) override; |
| 168 | 168 |
| 169 void OnPacketReceived(rtc::CopyOnWriteBuffer* packet, | 169 void OnPacketReceived(rtc::CopyOnWriteBuffer* packet, |
| 170 const rtc::PacketTime& packet_time) override; | 170 const rtc::PacketTime& packet_time) override; |
| 171 void OnRtcpReceived(rtc::CopyOnWriteBuffer* packet, | 171 void OnRtcpReceived(rtc::CopyOnWriteBuffer* packet, |
| 172 const rtc::PacketTime& packet_time) override; | 172 const rtc::PacketTime& packet_time) override; |
| 173 void OnReadyToSend(bool ready) override; | 173 void OnReadyToSend(bool ready) override; |
| 174 void OnNetworkRouteChanged(const std::string& transport_name, | 174 void OnNetworkRouteChanged(const std::string& transport_name, |
| 175 const rtc::NetworkRoute& network_route) override; | 175 const rtc::NetworkRoute& network_route) override; |
| 176 void SetInterface(NetworkInterface* iface) override; | 176 void SetInterface(NetworkInterface* iface) override; |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 EXCLUSIVE_LOCKS_REQUIRED(stream_crit_); | 230 EXCLUSIVE_LOCKS_REQUIRED(stream_crit_); |
| 231 void DeleteReceiveStream(WebRtcVideoReceiveStream* stream) | 231 void DeleteReceiveStream(WebRtcVideoReceiveStream* stream) |
| 232 EXCLUSIVE_LOCKS_REQUIRED(stream_crit_); | 232 EXCLUSIVE_LOCKS_REQUIRED(stream_crit_); |
| 233 | 233 |
| 234 static std::string CodecSettingsVectorToString( | 234 static std::string CodecSettingsVectorToString( |
| 235 const std::vector<VideoCodecSettings>& codecs); | 235 const std::vector<VideoCodecSettings>& codecs); |
| 236 | 236 |
| 237 // Wrapper for the sender part, this is where the source is connected and | 237 // Wrapper for the sender part, this is where the source is connected and |
| 238 // frames are then converted from cricket frames to webrtc frames. | 238 // frames are then converted from cricket frames to webrtc frames. |
| 239 class WebRtcVideoSendStream | 239 class WebRtcVideoSendStream |
| 240 : public rtc::VideoSinkInterface<webrtc::VideoFrame>, | 240 : public rtc::VideoSinkInterface<cricket::VideoFrame>, |
| 241 public rtc::VideoSourceInterface<webrtc::VideoFrame> { | 241 public rtc::VideoSourceInterface<webrtc::VideoFrame> { |
| 242 public: | 242 public: |
| 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 virtual ~WebRtcVideoSendStream(); | 254 virtual ~WebRtcVideoSendStream(); |
| 255 | 255 |
| 256 void SetSendParameters(const ChangedSendParameters& send_params); | 256 void SetSendParameters(const ChangedSendParameters& send_params); |
| 257 bool SetRtpParameters(const webrtc::RtpParameters& parameters); | 257 bool SetRtpParameters(const webrtc::RtpParameters& parameters); |
| 258 webrtc::RtpParameters GetRtpParameters() const; | 258 webrtc::RtpParameters GetRtpParameters() const; |
| 259 | 259 |
| 260 // Implements rtc::VideoSourceInterface<webrtc::VideoFrame>. | 260 // Implements rtc::VideoSourceInterface<webrtc::VideoFrame>. |
| 261 // WebRtcVideoSendStream acts as a source to the webrtc::VideoSendStream | 261 // WebRtcVideoSendStream acts as a source to the webrtc::VideoSendStream |
| 262 // in |stream_|. | 262 // in |stream_|. The reason is that WebRtcVideoSendStream receives |
| 263 // cricket::VideoFrames and forwards webrtc::VideoFrames to |source_|. |
| 263 // TODO(perkj, nisse): Refactor WebRtcVideoSendStream to directly connect | 264 // TODO(perkj, nisse): Refactor WebRtcVideoSendStream to directly connect |
| 264 // the camera input |source_| | 265 // the camera input |source_| |
| 265 void AddOrUpdateSink(VideoSinkInterface<webrtc::VideoFrame>* sink, | 266 void AddOrUpdateSink(VideoSinkInterface<webrtc::VideoFrame>* sink, |
| 266 const rtc::VideoSinkWants& wants) override; | 267 const rtc::VideoSinkWants& wants) override; |
| 267 void RemoveSink(VideoSinkInterface<webrtc::VideoFrame>* sink) override; | 268 void RemoveSink(VideoSinkInterface<webrtc::VideoFrame>* sink) override; |
| 268 | 269 |
| 269 void OnFrame(const webrtc::VideoFrame& frame) override; | 270 void OnFrame(const cricket::VideoFrame& frame) override; |
| 270 bool SetVideoSend(bool mute, | 271 bool SetVideoSend(bool mute, |
| 271 const VideoOptions* options, | 272 const VideoOptions* options, |
| 272 rtc::VideoSourceInterface<webrtc::VideoFrame>* source); | 273 rtc::VideoSourceInterface<cricket::VideoFrame>* source); |
| 273 | 274 |
| 274 void SetSend(bool send); | 275 void SetSend(bool send); |
| 275 | 276 |
| 276 const std::vector<uint32_t>& GetSsrcs() const; | 277 const std::vector<uint32_t>& GetSsrcs() const; |
| 277 VideoSenderInfo GetVideoSenderInfo(bool log_stats); | 278 VideoSenderInfo GetVideoSenderInfo(bool log_stats); |
| 278 void FillBandwidthEstimationInfo(BandwidthEstimationInfo* bwe_info); | 279 void FillBandwidthEstimationInfo(BandwidthEstimationInfo* bwe_info); |
| 279 | 280 |
| 280 private: | 281 private: |
| 281 // Parameters needed to reconstruct the underlying stream. | 282 // Parameters needed to reconstruct the underlying stream. |
| 282 // webrtc::VideoSendStream doesn't support setting a lot of options on the | 283 // webrtc::VideoSendStream doesn't support setting a lot of options on the |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 // and whether or not the encoding in |rtp_parameters_| is active. | 340 // and whether or not the encoding in |rtp_parameters_| is active. |
| 340 void UpdateSendState(); | 341 void UpdateSendState(); |
| 341 | 342 |
| 342 rtc::ThreadChecker thread_checker_; | 343 rtc::ThreadChecker thread_checker_; |
| 343 rtc::AsyncInvoker invoker_; | 344 rtc::AsyncInvoker invoker_; |
| 344 rtc::Thread* worker_thread_; | 345 rtc::Thread* worker_thread_; |
| 345 const std::vector<uint32_t> ssrcs_ ACCESS_ON(&thread_checker_); | 346 const std::vector<uint32_t> ssrcs_ ACCESS_ON(&thread_checker_); |
| 346 const std::vector<SsrcGroup> ssrc_groups_ ACCESS_ON(&thread_checker_); | 347 const std::vector<SsrcGroup> ssrc_groups_ ACCESS_ON(&thread_checker_); |
| 347 webrtc::Call* const call_; | 348 webrtc::Call* const call_; |
| 348 const bool enable_cpu_overuse_detection_; | 349 const bool enable_cpu_overuse_detection_; |
| 349 rtc::VideoSourceInterface<webrtc::VideoFrame>* source_ | 350 rtc::VideoSourceInterface<cricket::VideoFrame>* source_ |
| 350 ACCESS_ON(&thread_checker_); | 351 ACCESS_ON(&thread_checker_); |
| 351 WebRtcVideoEncoderFactory* const external_encoder_factory_ | 352 WebRtcVideoEncoderFactory* const external_encoder_factory_ |
| 352 ACCESS_ON(&thread_checker_); | 353 ACCESS_ON(&thread_checker_); |
| 353 | 354 |
| 354 rtc::CriticalSection lock_; | 355 rtc::CriticalSection lock_; |
| 355 webrtc::VideoSendStream* stream_ ACCESS_ON(&thread_checker_); | 356 webrtc::VideoSendStream* stream_ ACCESS_ON(&thread_checker_); |
| 356 rtc::VideoSinkInterface<webrtc::VideoFrame>* encoder_sink_ | 357 rtc::VideoSinkInterface<webrtc::VideoFrame>* encoder_sink_ |
| 357 GUARDED_BY(lock_); | 358 GUARDED_BY(lock_); |
| 358 // Contains settings that are the same for all streams in the MediaChannel, | 359 // Contains settings that are the same for all streams in the MediaChannel, |
| 359 // such as codecs, header extensions, and the global bitrate limit for the | 360 // such as codecs, header extensions, and the global bitrate limit for the |
| 360 // entire channel. | 361 // entire channel. |
| 361 VideoSendStreamParameters parameters_ ACCESS_ON(&thread_checker_); | 362 VideoSendStreamParameters parameters_ ACCESS_ON(&thread_checker_); |
| 362 // Contains settings that are unique for each stream, such as max_bitrate. | 363 // Contains settings that are unique for each stream, such as max_bitrate. |
| 363 // Does *not* contain codecs, however. | 364 // Does *not* contain codecs, however. |
| 364 // TODO(skvlad): Move ssrcs_ and ssrc_groups_ into rtp_parameters_. | 365 // TODO(skvlad): Move ssrcs_ and ssrc_groups_ into rtp_parameters_. |
| 365 // TODO(skvlad): Combine parameters_ and rtp_parameters_ once we have only | 366 // TODO(skvlad): Combine parameters_ and rtp_parameters_ once we have only |
| 366 // one stream per MediaChannel. | 367 // one stream per MediaChannel. |
| 367 webrtc::RtpParameters rtp_parameters_ ACCESS_ON(&thread_checker_); | 368 webrtc::RtpParameters rtp_parameters_ ACCESS_ON(&thread_checker_); |
| 368 AllocatedEncoder allocated_encoder_ ACCESS_ON(&thread_checker_); | 369 AllocatedEncoder allocated_encoder_ ACCESS_ON(&thread_checker_); |
| 369 VideoFrameInfo last_frame_info_ GUARDED_BY(lock_); | 370 VideoFrameInfo last_frame_info_ GUARDED_BY(lock_); |
| 370 | 371 |
| 371 bool sending_ ACCESS_ON(&thread_checker_); | 372 bool sending_ ACCESS_ON(&thread_checker_); |
| 372 | 373 |
| 373 // The timestamp of the last frame received | 374 // The timestamp of the last frame received |
| 374 // Used to generate timestamp for the black frame when source is removed | 375 // Used to generate timestamp for the black frame when source is removed |
| 375 int64_t last_frame_timestamp_us_ GUARDED_BY(lock_); | 376 int64_t last_frame_timestamp_us_ GUARDED_BY(lock_); |
| 376 }; | 377 }; |
| 377 | 378 |
| 378 // Wrapper for the receiver part, contains configs etc. that are needed to | 379 // Wrapper for the receiver part, contains configs etc. that are needed to |
| 379 // reconstruct the underlying VideoReceiveStream. | 380 // reconstruct the underlying VideoReceiveStream. Also serves as a wrapper |
| 381 // between rtc::VideoSinkInterface<webrtc::VideoFrame> and |
| 382 // rtc::VideoSinkInterface<cricket::VideoFrame>. |
| 380 class WebRtcVideoReceiveStream | 383 class WebRtcVideoReceiveStream |
| 381 : public rtc::VideoSinkInterface<webrtc::VideoFrame> { | 384 : public rtc::VideoSinkInterface<webrtc::VideoFrame> { |
| 382 public: | 385 public: |
| 383 WebRtcVideoReceiveStream( | 386 WebRtcVideoReceiveStream( |
| 384 webrtc::Call* call, | 387 webrtc::Call* call, |
| 385 const StreamParams& sp, | 388 const StreamParams& sp, |
| 386 webrtc::VideoReceiveStream::Config config, | 389 webrtc::VideoReceiveStream::Config config, |
| 387 WebRtcVideoDecoderFactory* external_decoder_factory, | 390 WebRtcVideoDecoderFactory* external_decoder_factory, |
| 388 bool default_stream, | 391 bool default_stream, |
| 389 const std::vector<VideoCodecSettings>& recv_codecs, | 392 const std::vector<VideoCodecSettings>& recv_codecs, |
| 390 bool red_disabled_by_remote_side); | 393 bool red_disabled_by_remote_side); |
| 391 ~WebRtcVideoReceiveStream(); | 394 ~WebRtcVideoReceiveStream(); |
| 392 | 395 |
| 393 const std::vector<uint32_t>& GetSsrcs() const; | 396 const std::vector<uint32_t>& GetSsrcs() const; |
| 394 rtc::Optional<uint32_t> GetFirstPrimarySsrc() const; | 397 rtc::Optional<uint32_t> GetFirstPrimarySsrc() const; |
| 395 | 398 |
| 396 void SetLocalSsrc(uint32_t local_ssrc); | 399 void SetLocalSsrc(uint32_t local_ssrc); |
| 397 // TODO(deadbeef): Move these feedback parameters into the recv parameters. | 400 // TODO(deadbeef): Move these feedback parameters into the recv parameters. |
| 398 void SetFeedbackParameters(bool nack_enabled, | 401 void SetFeedbackParameters(bool nack_enabled, |
| 399 bool remb_enabled, | 402 bool remb_enabled, |
| 400 bool transport_cc_enabled, | 403 bool transport_cc_enabled, |
| 401 webrtc::RtcpMode rtcp_mode); | 404 webrtc::RtcpMode rtcp_mode); |
| 402 void SetRecvParameters(const ChangedRecvParameters& recv_params); | 405 void SetRecvParameters(const ChangedRecvParameters& recv_params); |
| 403 | 406 |
| 404 void OnFrame(const webrtc::VideoFrame& frame) override; | 407 void OnFrame(const webrtc::VideoFrame& frame) override; |
| 405 bool IsDefaultStream() const; | 408 bool IsDefaultStream() const; |
| 406 | 409 |
| 407 void SetSink(rtc::VideoSinkInterface<webrtc::VideoFrame>* sink); | 410 void SetSink(rtc::VideoSinkInterface<cricket::VideoFrame>* sink); |
| 408 | 411 |
| 409 VideoReceiverInfo GetVideoReceiverInfo(bool log_stats); | 412 VideoReceiverInfo GetVideoReceiverInfo(bool log_stats); |
| 410 | 413 |
| 411 // Used to disable RED/FEC when the remote description doesn't contain those | 414 // Used to disable RED/FEC when the remote description doesn't contain those |
| 412 // codecs. This is needed to be able to work around an RTX bug which is only | 415 // codecs. This is needed to be able to work around an RTX bug which is only |
| 413 // happening if the remote side doesn't send RED, but the local side is | 416 // happening if the remote side doesn't send RED, but the local side is |
| 414 // configured to receive RED. | 417 // configured to receive RED. |
| 415 // TODO(holmer): Remove this after a couple of Chrome versions, M53-54 | 418 // TODO(holmer): Remove this after a couple of Chrome versions, M53-54 |
| 416 // time frame. | 419 // time frame. |
| 417 void SetUlpfecDisabledRemotely(bool disable); | 420 void SetUlpfecDisabledRemotely(bool disable); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 444 | 447 |
| 445 webrtc::VideoReceiveStream* stream_; | 448 webrtc::VideoReceiveStream* stream_; |
| 446 const bool default_stream_; | 449 const bool default_stream_; |
| 447 webrtc::VideoReceiveStream::Config config_; | 450 webrtc::VideoReceiveStream::Config config_; |
| 448 bool red_disabled_by_remote_side_; | 451 bool red_disabled_by_remote_side_; |
| 449 | 452 |
| 450 WebRtcVideoDecoderFactory* const external_decoder_factory_; | 453 WebRtcVideoDecoderFactory* const external_decoder_factory_; |
| 451 std::vector<AllocatedDecoder> allocated_decoders_; | 454 std::vector<AllocatedDecoder> allocated_decoders_; |
| 452 | 455 |
| 453 rtc::CriticalSection sink_lock_; | 456 rtc::CriticalSection sink_lock_; |
| 454 rtc::VideoSinkInterface<webrtc::VideoFrame>* sink_ GUARDED_BY(sink_lock_); | 457 rtc::VideoSinkInterface<cricket::VideoFrame>* sink_ GUARDED_BY(sink_lock_); |
| 455 // Expands remote RTP timestamps to int64_t to be able to estimate how long | 458 // Expands remote RTP timestamps to int64_t to be able to estimate how long |
| 456 // the stream has been running. | 459 // the stream has been running. |
| 457 rtc::TimestampWrapAroundHandler timestamp_wraparound_handler_ | 460 rtc::TimestampWrapAroundHandler timestamp_wraparound_handler_ |
| 458 GUARDED_BY(sink_lock_); | 461 GUARDED_BY(sink_lock_); |
| 459 int64_t first_frame_timestamp_ GUARDED_BY(sink_lock_); | 462 int64_t first_frame_timestamp_ GUARDED_BY(sink_lock_); |
| 460 // Start NTP time is estimated as current remote NTP time (estimated from | 463 // Start NTP time is estimated as current remote NTP time (estimated from |
| 461 // RTCP) minus the elapsed time, as soon as remote NTP time is available. | 464 // RTCP) minus the elapsed time, as soon as remote NTP time is available. |
| 462 int64_t estimated_remote_start_ntp_time_ms_ GUARDED_BY(sink_lock_); | 465 int64_t estimated_remote_start_ntp_time_ms_ GUARDED_BY(sink_lock_); |
| 463 }; | 466 }; |
| 464 | 467 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 VideoSendParameters send_params_; | 517 VideoSendParameters send_params_; |
| 515 VideoOptions default_send_options_; | 518 VideoOptions default_send_options_; |
| 516 VideoRecvParameters recv_params_; | 519 VideoRecvParameters recv_params_; |
| 517 bool red_disabled_by_remote_side_; | 520 bool red_disabled_by_remote_side_; |
| 518 int64_t last_stats_log_ms_; | 521 int64_t last_stats_log_ms_; |
| 519 }; | 522 }; |
| 520 | 523 |
| 521 } // namespace cricket | 524 } // namespace cricket |
| 522 | 525 |
| 523 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVIDEOENGINE2_H_ | 526 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVIDEOENGINE2_H_ |
| OLD | NEW |