Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(185)

Side by Side Diff: webrtc/media/engine/webrtcvideoengine2.h

Issue 1818023002: Delete class webrtc::VideoRenderer and its header file. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Address pbos' comments. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 13 matching lines...) Expand all
24 #include "webrtc/media/base/videosinkinterface.h" 24 #include "webrtc/media/base/videosinkinterface.h"
25 #include "webrtc/media/base/videosourceinterface.h" 25 #include "webrtc/media/base/videosourceinterface.h"
26 #include "webrtc/call.h" 26 #include "webrtc/call.h"
27 #include "webrtc/media/base/mediaengine.h" 27 #include "webrtc/media/base/mediaengine.h"
28 #include "webrtc/media/engine/webrtcvideochannelfactory.h" 28 #include "webrtc/media/engine/webrtcvideochannelfactory.h"
29 #include "webrtc/media/engine/webrtcvideodecoderfactory.h" 29 #include "webrtc/media/engine/webrtcvideodecoderfactory.h"
30 #include "webrtc/media/engine/webrtcvideoencoderfactory.h" 30 #include "webrtc/media/engine/webrtcvideoencoderfactory.h"
31 #include "webrtc/transport.h" 31 #include "webrtc/transport.h"
32 #include "webrtc/video_frame.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_renderer.h"
35 #include "webrtc/video_send_stream.h" 34 #include "webrtc/video_send_stream.h"
36 35
37 namespace webrtc { 36 namespace webrtc {
38 class VideoDecoder; 37 class VideoDecoder;
39 class VideoEncoder; 38 class VideoEncoder;
40 struct MediaConfig; 39 struct MediaConfig;
41 } 40 }
42 41
43 namespace rtc { 42 namespace rtc {
44 class Thread; 43 class Thread;
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 // Used to generate the timestamps of subsequent frames 386 // Used to generate the timestamps of subsequent frames
388 int64_t first_frame_timestamp_ms_ GUARDED_BY(lock_); 387 int64_t first_frame_timestamp_ms_ GUARDED_BY(lock_);
389 388
390 // The timestamp of the last frame received 389 // The timestamp of the last frame received
391 // Used to generate timestamp for the black frame when capturer is removed 390 // Used to generate timestamp for the black frame when capturer is removed
392 int64_t last_frame_timestamp_ms_ GUARDED_BY(lock_); 391 int64_t last_frame_timestamp_ms_ GUARDED_BY(lock_);
393 }; 392 };
394 393
395 // Wrapper for the receiver part, contains configs etc. that are needed to 394 // Wrapper for the receiver part, contains configs etc. that are needed to
396 // reconstruct the underlying VideoReceiveStream. Also serves as a wrapper 395 // reconstruct the underlying VideoReceiveStream. Also serves as a wrapper
397 // between webrtc::VideoRenderer and cricket::VideoRenderer. 396 // between rtc::VideoSinkInterface<webrtc::VideoFrame> and
398 class WebRtcVideoReceiveStream : public webrtc::VideoRenderer { 397 // cricket::VideoRenderer.
perkj_webrtc 2016/03/22 08:43:44 Not true. cricket::VIdeoRenderer is no more.
nisse-webrtc 2016/03/22 10:47:14 I'm updating the comment. cricket::VideoRenderer i
398 class WebRtcVideoReceiveStream
399 : public rtc::VideoSinkInterface<webrtc::VideoFrame> {
399 public: 400 public:
400 WebRtcVideoReceiveStream( 401 WebRtcVideoReceiveStream(
401 webrtc::Call* call, 402 webrtc::Call* call,
402 const StreamParams& sp, 403 const StreamParams& sp,
403 const webrtc::VideoReceiveStream::Config& config, 404 const webrtc::VideoReceiveStream::Config& config,
404 WebRtcVideoDecoderFactory* external_decoder_factory, 405 WebRtcVideoDecoderFactory* external_decoder_factory,
405 bool default_stream, 406 bool default_stream,
406 const std::vector<VideoCodecSettings>& recv_codecs, 407 const std::vector<VideoCodecSettings>& recv_codecs);
407 bool disable_prerenderer_smoothing);
408 ~WebRtcVideoReceiveStream(); 408 ~WebRtcVideoReceiveStream();
409 409
410 const std::vector<uint32_t>& GetSsrcs() const; 410 const std::vector<uint32_t>& GetSsrcs() const;
411 411
412 void SetLocalSsrc(uint32_t local_ssrc); 412 void SetLocalSsrc(uint32_t local_ssrc);
413 // TODO(deadbeef): Move these feedback parameters into the recv parameters. 413 // TODO(deadbeef): Move these feedback parameters into the recv parameters.
414 void SetFeedbackParameters(bool nack_enabled, 414 void SetFeedbackParameters(bool nack_enabled,
415 bool remb_enabled, 415 bool remb_enabled,
416 bool transport_cc_enabled, 416 bool transport_cc_enabled,
417 webrtc::RtcpMode rtcp_mode); 417 webrtc::RtcpMode rtcp_mode);
418 void SetRecvParameters(const ChangedRecvParameters& recv_params); 418 void SetRecvParameters(const ChangedRecvParameters& recv_params);
419 419
420 void OnFrame(const webrtc::VideoFrame& frame) override; 420 void OnFrame(const webrtc::VideoFrame& frame) override;
421 bool SmoothsRenderedFrames() const override;
422 bool IsDefaultStream() const; 421 bool IsDefaultStream() const;
423 422
424 void SetSink(rtc::VideoSinkInterface<cricket::VideoFrame>* sink); 423 void SetSink(rtc::VideoSinkInterface<cricket::VideoFrame>* sink);
425 424
426 VideoReceiverInfo GetVideoReceiverInfo(); 425 VideoReceiverInfo GetVideoReceiverInfo();
427 426
428 private: 427 private:
429 struct AllocatedDecoder { 428 struct AllocatedDecoder {
430 AllocatedDecoder(webrtc::VideoDecoder* decoder, 429 AllocatedDecoder(webrtc::VideoDecoder* decoder,
431 webrtc::VideoCodecType type, 430 webrtc::VideoCodecType type,
(...skipping 20 matching lines...) Expand all
452 const std::vector<uint32_t> ssrcs_; 451 const std::vector<uint32_t> ssrcs_;
453 const std::vector<SsrcGroup> ssrc_groups_; 452 const std::vector<SsrcGroup> ssrc_groups_;
454 453
455 webrtc::VideoReceiveStream* stream_; 454 webrtc::VideoReceiveStream* stream_;
456 const bool default_stream_; 455 const bool default_stream_;
457 webrtc::VideoReceiveStream::Config config_; 456 webrtc::VideoReceiveStream::Config config_;
458 457
459 WebRtcVideoDecoderFactory* const external_decoder_factory_; 458 WebRtcVideoDecoderFactory* const external_decoder_factory_;
460 std::vector<AllocatedDecoder> allocated_decoders_; 459 std::vector<AllocatedDecoder> allocated_decoders_;
461 460
462 const bool disable_prerenderer_smoothing_;
463
464 rtc::CriticalSection sink_lock_; 461 rtc::CriticalSection sink_lock_;
465 rtc::VideoSinkInterface<cricket::VideoFrame>* sink_ GUARDED_BY(sink_lock_); 462 rtc::VideoSinkInterface<cricket::VideoFrame>* sink_ GUARDED_BY(sink_lock_);
466 int last_width_ GUARDED_BY(sink_lock_); 463 int last_width_ GUARDED_BY(sink_lock_);
467 int last_height_ GUARDED_BY(sink_lock_); 464 int last_height_ GUARDED_BY(sink_lock_);
468 // Expands remote RTP timestamps to int64_t to be able to estimate how long 465 // Expands remote RTP timestamps to int64_t to be able to estimate how long
469 // the stream has been running. 466 // the stream has been running.
470 rtc::TimestampWrapAroundHandler timestamp_wraparound_handler_ 467 rtc::TimestampWrapAroundHandler timestamp_wraparound_handler_
471 GUARDED_BY(sink_lock_); 468 GUARDED_BY(sink_lock_);
472 int64_t first_frame_timestamp_ GUARDED_BY(sink_lock_); 469 int64_t first_frame_timestamp_ GUARDED_BY(sink_lock_);
473 // Start NTP time is estimated as current remote NTP time (estimated from 470 // Start NTP time is estimated as current remote NTP time (estimated from
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 // TODO(deadbeef): Don't duplicate information between 527 // TODO(deadbeef): Don't duplicate information between
531 // send_params/recv_params, rtp_extensions, options, etc. 528 // send_params/recv_params, rtp_extensions, options, etc.
532 VideoSendParameters send_params_; 529 VideoSendParameters send_params_;
533 VideoOptions default_send_options_; 530 VideoOptions default_send_options_;
534 VideoRecvParameters recv_params_; 531 VideoRecvParameters recv_params_;
535 }; 532 };
536 533
537 } // namespace cricket 534 } // namespace cricket
538 535
539 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVIDEOENGINE2_H_ 536 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVIDEOENGINE2_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698