From b3032b6e330de5d8989627925ca5921f2e665a47 Mon Sep 17 00:00:00 2001 From: Ilya Nikolaevskiy Date: Tue, 5 Feb 2019 15:33:25 +0000 Subject: [PATCH] Revert "Partial frame capture API part 4" This reverts commit 62b9fb44aa9a05ef0e4866bcc0580779456c4cf7. Reason for revert: Speculative revert for broken bots Original change's description: > Partial frame capture API part 4 > > Wire-up PartialFrameCompressor to VideoStreamEncoder. > > Bug: webrtc:10152 > Change-Id: I6a3df28e392cf3f47aec1c97abb1d4d73d5f7e2a > Reviewed-on: https://webrtc-review.googlesource.com/c/120409 > Reviewed-by: Stefan Holmer > Commit-Queue: Ilya Nikolaevskiy > Cr-Commit-Position: refs/heads/master@{#26548} TBR=ilnik@webrtc.org,sprang@webrtc.org,stefan@webrtc.org Change-Id: Ib26fbf1b49f21f9f55b9b3e54fa6e6e33bf26dd2 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: webrtc:10152 Reviewed-on: https://webrtc-review.googlesource.com/c/121564 Reviewed-by: Ilya Nikolaevskiy Commit-Queue: Ilya Nikolaevskiy Cr-Commit-Position: refs/heads/master@{#26555} --- video/video_stream_encoder.cc | 17 ----------------- video/video_stream_encoder.h | 4 ---- 2 files changed, 21 deletions(-) diff --git a/video/video_stream_encoder.cc b/video/video_stream_encoder.cc index b4b5af556d..ea59b0aba0 100644 --- a/video/video_stream_encoder.cc +++ b/video/video_stream_encoder.cc @@ -336,7 +336,6 @@ class VideoStreamEncoder::VideoSourceProxy { } // Limit to configured max framerate. wants.max_framerate_fps = std::min(max_framerate_, wants.max_framerate_fps); - wants.partial_frames = true; return wants; } @@ -714,24 +713,8 @@ void VideoStreamEncoder::ConfigureQualityScaler() { void VideoStreamEncoder::OnFrame(const VideoFrame& video_frame) { RTC_DCHECK_RUNS_SERIALIZED(&incoming_frame_race_checker_); - - const VideoFrame::PartialFrameDescription* partial_desc = - video_frame.partial_frame_description(); VideoFrame incoming_frame = video_frame; - if (video_frame.cache_buffer_for_partial_updates()) { - VideoFrameBuffer* input_buffer = video_frame.video_frame_buffer(); - if (!partial_frame_assembler_.ApplyPartialUpdate( - input_buffer, &incoming_frame, partial_desc)) { - // Can't apply new image to the cached buffer because of some error. - // Nothing sensible to encode. - // Detailed error message is already logged by |ApplyPartialUpdate()|. - return; - } - } else { - partial_frame_assembler_.Reset(); - } - // Local time in webrtc time base. int64_t current_time_us = clock_->TimeInMicroseconds(); int64_t current_time_ms = current_time_us / rtc::kNumMicrosecsPerMillisec; diff --git a/video/video_stream_encoder.h b/video/video_stream_encoder.h index 0c9cb3c828..577ca5b562 100644 --- a/video/video_stream_encoder.h +++ b/video/video_stream_encoder.h @@ -33,7 +33,6 @@ #include "rtc_base/sequenced_task_checker.h" #include "rtc_base/task_queue.h" #include "video/overuse_frame_detector.h" -#include "video/partial_frame_assembler.h" namespace webrtc { @@ -296,9 +295,6 @@ class VideoStreamEncoder : public VideoStreamEncoderInterface, // the worker thread. std::atomic pending_frame_drops_; - PartialFrameAssembler partial_frame_assembler_ - RTC_GUARDED_BY(incoming_frame_race_checker_); - // All public methods are proxied to |encoder_queue_|. It must must be // destroyed first to make sure no tasks are run that use other members. rtc::TaskQueue encoder_queue_;