OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2014 Google Inc. | 3 * Copyright 2014 Google Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 // reconstruct the underlying VideoReceiveStream. Also serves as a wrapper | 387 // reconstruct the underlying VideoReceiveStream. Also serves as a wrapper |
388 // between webrtc::VideoRenderer and cricket::VideoRenderer. | 388 // between webrtc::VideoRenderer and cricket::VideoRenderer. |
389 class WebRtcVideoReceiveStream : public webrtc::VideoRenderer { | 389 class WebRtcVideoReceiveStream : public webrtc::VideoRenderer { |
390 public: | 390 public: |
391 WebRtcVideoReceiveStream( | 391 WebRtcVideoReceiveStream( |
392 webrtc::Call* call, | 392 webrtc::Call* call, |
393 const StreamParams& sp, | 393 const StreamParams& sp, |
394 const webrtc::VideoReceiveStream::Config& config, | 394 const webrtc::VideoReceiveStream::Config& config, |
395 WebRtcVideoDecoderFactory* external_decoder_factory, | 395 WebRtcVideoDecoderFactory* external_decoder_factory, |
396 bool default_stream, | 396 bool default_stream, |
397 const std::vector<VideoCodecSettings>& recv_codecs); | 397 const std::vector<VideoCodecSettings>& recv_codecs, |
| 398 bool disable_prerenderer_smoothing); |
398 ~WebRtcVideoReceiveStream(); | 399 ~WebRtcVideoReceiveStream(); |
399 | 400 |
400 const std::vector<uint32_t>& GetSsrcs() const; | 401 const std::vector<uint32_t>& GetSsrcs() const; |
401 | 402 |
402 void SetLocalSsrc(uint32_t local_ssrc); | 403 void SetLocalSsrc(uint32_t local_ssrc); |
403 void SetFeedbackParameters(bool nack_enabled, | 404 void SetFeedbackParameters(bool nack_enabled, |
404 bool remb_enabled, | 405 bool remb_enabled, |
405 bool transport_cc_enabled); | 406 bool transport_cc_enabled); |
406 void SetRecvCodecs(const std::vector<VideoCodecSettings>& recv_codecs); | 407 void SetRecvCodecs(const std::vector<VideoCodecSettings>& recv_codecs); |
407 void SetRtpExtensions(const std::vector<webrtc::RtpExtension>& extensions); | 408 void SetRtpExtensions(const std::vector<webrtc::RtpExtension>& extensions); |
408 | 409 |
409 void RenderFrame(const webrtc::VideoFrame& frame, | 410 void RenderFrame(const webrtc::VideoFrame& frame, |
410 int time_to_render_ms) override; | 411 int time_to_render_ms) override; |
411 bool IsTextureSupported() const override; | 412 bool IsTextureSupported() const override; |
| 413 bool SmoothsRenderedFrames() const override; |
412 bool IsDefaultStream() const; | 414 bool IsDefaultStream() const; |
413 | 415 |
414 void SetRenderer(cricket::VideoRenderer* renderer); | 416 void SetRenderer(cricket::VideoRenderer* renderer); |
415 cricket::VideoRenderer* GetRenderer(); | 417 cricket::VideoRenderer* GetRenderer(); |
416 | 418 |
417 VideoReceiverInfo GetVideoReceiverInfo(); | 419 VideoReceiverInfo GetVideoReceiverInfo(); |
418 | 420 |
419 private: | 421 private: |
420 struct AllocatedDecoder { | 422 struct AllocatedDecoder { |
421 AllocatedDecoder(webrtc::VideoDecoder* decoder, | 423 AllocatedDecoder(webrtc::VideoDecoder* decoder, |
(...skipping 20 matching lines...) Expand all Loading... |
442 const std::vector<uint32_t> ssrcs_; | 444 const std::vector<uint32_t> ssrcs_; |
443 const std::vector<SsrcGroup> ssrc_groups_; | 445 const std::vector<SsrcGroup> ssrc_groups_; |
444 | 446 |
445 webrtc::VideoReceiveStream* stream_; | 447 webrtc::VideoReceiveStream* stream_; |
446 const bool default_stream_; | 448 const bool default_stream_; |
447 webrtc::VideoReceiveStream::Config config_; | 449 webrtc::VideoReceiveStream::Config config_; |
448 | 450 |
449 WebRtcVideoDecoderFactory* const external_decoder_factory_; | 451 WebRtcVideoDecoderFactory* const external_decoder_factory_; |
450 std::vector<AllocatedDecoder> allocated_decoders_; | 452 std::vector<AllocatedDecoder> allocated_decoders_; |
451 | 453 |
| 454 const bool disable_prerenderer_smoothing_; |
| 455 |
452 rtc::CriticalSection renderer_lock_; | 456 rtc::CriticalSection renderer_lock_; |
453 cricket::VideoRenderer* renderer_ GUARDED_BY(renderer_lock_); | 457 cricket::VideoRenderer* renderer_ GUARDED_BY(renderer_lock_); |
454 int last_width_ GUARDED_BY(renderer_lock_); | 458 int last_width_ GUARDED_BY(renderer_lock_); |
455 int last_height_ GUARDED_BY(renderer_lock_); | 459 int last_height_ GUARDED_BY(renderer_lock_); |
456 // Expands remote RTP timestamps to int64_t to be able to estimate how long | 460 // Expands remote RTP timestamps to int64_t to be able to estimate how long |
457 // the stream has been running. | 461 // the stream has been running. |
458 rtc::TimestampWrapAroundHandler timestamp_wraparound_handler_ | 462 rtc::TimestampWrapAroundHandler timestamp_wraparound_handler_ |
459 GUARDED_BY(renderer_lock_); | 463 GUARDED_BY(renderer_lock_); |
460 int64_t first_frame_timestamp_ GUARDED_BY(renderer_lock_); | 464 int64_t first_frame_timestamp_ GUARDED_BY(renderer_lock_); |
461 // Start NTP time is estimated as current remote NTP time (estimated from | 465 // Start NTP time is estimated as current remote NTP time (estimated from |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
520 WebRtcVideoDecoderFactory* const external_decoder_factory_; | 524 WebRtcVideoDecoderFactory* const external_decoder_factory_; |
521 std::vector<VideoCodecSettings> recv_codecs_; | 525 std::vector<VideoCodecSettings> recv_codecs_; |
522 std::vector<webrtc::RtpExtension> recv_rtp_extensions_; | 526 std::vector<webrtc::RtpExtension> recv_rtp_extensions_; |
523 webrtc::Call::Config::BitrateConfig bitrate_config_; | 527 webrtc::Call::Config::BitrateConfig bitrate_config_; |
524 VideoOptions options_; | 528 VideoOptions options_; |
525 }; | 529 }; |
526 | 530 |
527 } // namespace cricket | 531 } // namespace cricket |
528 | 532 |
529 #endif // TALK_MEDIA_WEBRTC_WEBRTCVIDEOENGINE2_H_ | 533 #endif // TALK_MEDIA_WEBRTC_WEBRTCVIDEOENGINE2_H_ |
OLD | NEW |