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 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
389 // between webrtc::VideoRenderer and cricket::VideoRenderer. | 389 // between webrtc::VideoRenderer and cricket::VideoRenderer. |
390 class WebRtcVideoReceiveStream : public webrtc::VideoRenderer { | 390 class WebRtcVideoReceiveStream : public webrtc::VideoRenderer { |
391 public: | 391 public: |
392 WebRtcVideoReceiveStream( | 392 WebRtcVideoReceiveStream( |
393 webrtc::Call* call, | 393 webrtc::Call* call, |
394 const StreamParams& sp, | 394 const StreamParams& sp, |
395 const webrtc::VideoReceiveStream::Config& config, | 395 const webrtc::VideoReceiveStream::Config& config, |
396 WebRtcVideoDecoderFactory* external_decoder_factory, | 396 WebRtcVideoDecoderFactory* external_decoder_factory, |
397 bool default_stream, | 397 bool default_stream, |
398 const std::vector<VideoCodecSettings>& recv_codecs); | 398 const std::vector<VideoCodecSettings>& recv_codecs); |
| 399 WebRtcVideoReceiveStream( |
| 400 webrtc::Call* call, |
| 401 const StreamParams& sp, |
| 402 const webrtc::VideoReceiveStream::Config& config, |
| 403 WebRtcVideoDecoderFactory* external_decoder_factory, |
| 404 bool default_stream, |
| 405 const std::vector<VideoCodecSettings>& recv_codecs, |
| 406 bool disable_prerenderer_smoothing); |
399 ~WebRtcVideoReceiveStream(); | 407 ~WebRtcVideoReceiveStream(); |
400 | 408 |
401 const std::vector<uint32_t>& GetSsrcs() const; | 409 const std::vector<uint32_t>& GetSsrcs() const; |
402 | 410 |
403 void SetLocalSsrc(uint32_t local_ssrc); | 411 void SetLocalSsrc(uint32_t local_ssrc); |
404 void SetNackAndRemb(bool nack_enabled, bool remb_enabled); | 412 void SetNackAndRemb(bool nack_enabled, bool remb_enabled); |
405 void SetRecvCodecs(const std::vector<VideoCodecSettings>& recv_codecs); | 413 void SetRecvCodecs(const std::vector<VideoCodecSettings>& recv_codecs); |
406 void SetRtpExtensions(const std::vector<webrtc::RtpExtension>& extensions); | 414 void SetRtpExtensions(const std::vector<webrtc::RtpExtension>& extensions); |
407 | 415 |
408 void RenderFrame(const webrtc::VideoFrame& frame, | 416 void RenderFrame(const webrtc::VideoFrame& frame, |
409 int time_to_render_ms) override; | 417 int time_to_render_ms) override; |
410 bool IsTextureSupported() const override; | 418 bool IsTextureSupported() const override; |
| 419 bool PrerendererSmoothingDisabled() const override; |
411 bool IsDefaultStream() const; | 420 bool IsDefaultStream() const; |
412 | 421 |
413 void SetRenderer(cricket::VideoRenderer* renderer); | 422 void SetRenderer(cricket::VideoRenderer* renderer); |
414 cricket::VideoRenderer* GetRenderer(); | 423 cricket::VideoRenderer* GetRenderer(); |
415 | 424 |
416 VideoReceiverInfo GetVideoReceiverInfo(); | 425 VideoReceiverInfo GetVideoReceiverInfo(); |
417 | 426 |
418 private: | 427 private: |
419 struct AllocatedDecoder { | 428 struct AllocatedDecoder { |
420 AllocatedDecoder(webrtc::VideoDecoder* decoder, | 429 AllocatedDecoder(webrtc::VideoDecoder* decoder, |
(...skipping 20 matching lines...) Expand all Loading... |
441 const std::vector<uint32_t> ssrcs_; | 450 const std::vector<uint32_t> ssrcs_; |
442 const std::vector<SsrcGroup> ssrc_groups_; | 451 const std::vector<SsrcGroup> ssrc_groups_; |
443 | 452 |
444 webrtc::VideoReceiveStream* stream_; | 453 webrtc::VideoReceiveStream* stream_; |
445 const bool default_stream_; | 454 const bool default_stream_; |
446 webrtc::VideoReceiveStream::Config config_; | 455 webrtc::VideoReceiveStream::Config config_; |
447 | 456 |
448 WebRtcVideoDecoderFactory* const external_decoder_factory_; | 457 WebRtcVideoDecoderFactory* const external_decoder_factory_; |
449 std::vector<AllocatedDecoder> allocated_decoders_; | 458 std::vector<AllocatedDecoder> allocated_decoders_; |
450 | 459 |
| 460 const bool disable_prerenderer_smoothing_; |
| 461 |
451 rtc::CriticalSection renderer_lock_; | 462 rtc::CriticalSection renderer_lock_; |
452 cricket::VideoRenderer* renderer_ GUARDED_BY(renderer_lock_); | 463 cricket::VideoRenderer* renderer_ GUARDED_BY(renderer_lock_); |
453 int last_width_ GUARDED_BY(renderer_lock_); | 464 int last_width_ GUARDED_BY(renderer_lock_); |
454 int last_height_ GUARDED_BY(renderer_lock_); | 465 int last_height_ GUARDED_BY(renderer_lock_); |
455 // Expands remote RTP timestamps to int64_t to be able to estimate how long | 466 // Expands remote RTP timestamps to int64_t to be able to estimate how long |
456 // the stream has been running. | 467 // the stream has been running. |
457 rtc::TimestampWrapAroundHandler timestamp_wraparound_handler_ | 468 rtc::TimestampWrapAroundHandler timestamp_wraparound_handler_ |
458 GUARDED_BY(renderer_lock_); | 469 GUARDED_BY(renderer_lock_); |
459 int64_t first_frame_timestamp_ GUARDED_BY(renderer_lock_); | 470 int64_t first_frame_timestamp_ GUARDED_BY(renderer_lock_); |
460 // Start NTP time is estimated as current remote NTP time (estimated from | 471 // 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... |
519 WebRtcVideoDecoderFactory* const external_decoder_factory_; | 530 WebRtcVideoDecoderFactory* const external_decoder_factory_; |
520 std::vector<VideoCodecSettings> recv_codecs_; | 531 std::vector<VideoCodecSettings> recv_codecs_; |
521 std::vector<webrtc::RtpExtension> recv_rtp_extensions_; | 532 std::vector<webrtc::RtpExtension> recv_rtp_extensions_; |
522 webrtc::Call::Config::BitrateConfig bitrate_config_; | 533 webrtc::Call::Config::BitrateConfig bitrate_config_; |
523 VideoOptions options_; | 534 VideoOptions options_; |
524 }; | 535 }; |
525 | 536 |
526 } // namespace cricket | 537 } // namespace cricket |
527 | 538 |
528 #endif // TALK_MEDIA_WEBRTC_WEBRTCVIDEOENGINE2_H_ | 539 #endif // TALK_MEDIA_WEBRTC_WEBRTCVIDEOENGINE2_H_ |
OLD | NEW |