| 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 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 // reconstruct the underlying VideoReceiveStream. Also serves as a wrapper | 388 // reconstruct the underlying VideoReceiveStream. Also serves as a wrapper |
| 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 bool disable_prerenderer_smoothing); |
| 399 ~WebRtcVideoReceiveStream(); | 400 ~WebRtcVideoReceiveStream(); |
| 400 | 401 |
| 401 const std::vector<uint32_t>& GetSsrcs() const; | 402 const std::vector<uint32_t>& GetSsrcs() const; |
| 402 | 403 |
| 403 void SetLocalSsrc(uint32_t local_ssrc); | 404 void SetLocalSsrc(uint32_t local_ssrc); |
| 404 void SetNackAndRemb(bool nack_enabled, bool remb_enabled); | 405 void SetNackAndRemb(bool nack_enabled, bool remb_enabled); |
| 405 void SetRecvCodecs(const std::vector<VideoCodecSettings>& recv_codecs); | 406 void SetRecvCodecs(const std::vector<VideoCodecSettings>& recv_codecs); |
| 406 void SetRtpExtensions(const std::vector<webrtc::RtpExtension>& extensions); | 407 void SetRtpExtensions(const std::vector<webrtc::RtpExtension>& extensions); |
| 407 | 408 |
| 408 void RenderFrame(const webrtc::VideoFrame& frame, | 409 void RenderFrame(const webrtc::VideoFrame& frame, |
| 409 int time_to_render_ms) override; | 410 int time_to_render_ms) override; |
| 410 bool IsTextureSupported() const override; | 411 bool IsTextureSupported() const override; |
| 412 bool PrerendererSmoothingDisabled() const override; |
| 411 bool IsDefaultStream() const; | 413 bool IsDefaultStream() const; |
| 412 | 414 |
| 413 void SetRenderer(cricket::VideoRenderer* renderer); | 415 void SetRenderer(cricket::VideoRenderer* renderer); |
| 414 cricket::VideoRenderer* GetRenderer(); | 416 cricket::VideoRenderer* GetRenderer(); |
| 415 | 417 |
| 416 VideoReceiverInfo GetVideoReceiverInfo(); | 418 VideoReceiverInfo GetVideoReceiverInfo(); |
| 417 | 419 |
| 418 private: | 420 private: |
| 419 struct AllocatedDecoder { | 421 struct AllocatedDecoder { |
| 420 AllocatedDecoder(webrtc::VideoDecoder* decoder, | 422 AllocatedDecoder(webrtc::VideoDecoder* decoder, |
| (...skipping 20 matching lines...) Expand all Loading... |
| 441 const std::vector<uint32_t> ssrcs_; | 443 const std::vector<uint32_t> ssrcs_; |
| 442 const std::vector<SsrcGroup> ssrc_groups_; | 444 const std::vector<SsrcGroup> ssrc_groups_; |
| 443 | 445 |
| 444 webrtc::VideoReceiveStream* stream_; | 446 webrtc::VideoReceiveStream* stream_; |
| 445 const bool default_stream_; | 447 const bool default_stream_; |
| 446 webrtc::VideoReceiveStream::Config config_; | 448 webrtc::VideoReceiveStream::Config config_; |
| 447 | 449 |
| 448 WebRtcVideoDecoderFactory* const external_decoder_factory_; | 450 WebRtcVideoDecoderFactory* const external_decoder_factory_; |
| 449 std::vector<AllocatedDecoder> allocated_decoders_; | 451 std::vector<AllocatedDecoder> allocated_decoders_; |
| 450 | 452 |
| 453 const bool disable_prerenderer_smoothing_; |
| 454 |
| 451 rtc::CriticalSection renderer_lock_; | 455 rtc::CriticalSection renderer_lock_; |
| 452 cricket::VideoRenderer* renderer_ GUARDED_BY(renderer_lock_); | 456 cricket::VideoRenderer* renderer_ GUARDED_BY(renderer_lock_); |
| 453 int last_width_ GUARDED_BY(renderer_lock_); | 457 int last_width_ GUARDED_BY(renderer_lock_); |
| 454 int last_height_ GUARDED_BY(renderer_lock_); | 458 int last_height_ GUARDED_BY(renderer_lock_); |
| 455 // Expands remote RTP timestamps to int64_t to be able to estimate how long | 459 // Expands remote RTP timestamps to int64_t to be able to estimate how long |
| 456 // the stream has been running. | 460 // the stream has been running. |
| 457 rtc::TimestampWrapAroundHandler timestamp_wraparound_handler_ | 461 rtc::TimestampWrapAroundHandler timestamp_wraparound_handler_ |
| 458 GUARDED_BY(renderer_lock_); | 462 GUARDED_BY(renderer_lock_); |
| 459 int64_t first_frame_timestamp_ GUARDED_BY(renderer_lock_); | 463 int64_t first_frame_timestamp_ GUARDED_BY(renderer_lock_); |
| 460 // Start NTP time is estimated as current remote NTP time (estimated from | 464 // 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_; | 523 WebRtcVideoDecoderFactory* const external_decoder_factory_; |
| 520 std::vector<VideoCodecSettings> recv_codecs_; | 524 std::vector<VideoCodecSettings> recv_codecs_; |
| 521 std::vector<webrtc::RtpExtension> recv_rtp_extensions_; | 525 std::vector<webrtc::RtpExtension> recv_rtp_extensions_; |
| 522 webrtc::Call::Config::BitrateConfig bitrate_config_; | 526 webrtc::Call::Config::BitrateConfig bitrate_config_; |
| 523 VideoOptions options_; | 527 VideoOptions options_; |
| 524 }; | 528 }; |
| 525 | 529 |
| 526 } // namespace cricket | 530 } // namespace cricket |
| 527 | 531 |
| 528 #endif // TALK_MEDIA_WEBRTC_WEBRTCVIDEOENGINE2_H_ | 532 #endif // TALK_MEDIA_WEBRTC_WEBRTCVIDEOENGINE2_H_ |
| OLD | NEW |