2013-05-29 13:41:03 +00:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
|
|
|
|
|
*
|
|
|
|
|
* Use of this source code is governed by a BSD-style license
|
|
|
|
|
* that can be found in the LICENSE file in the root of the source
|
|
|
|
|
* tree. An additional intellectual property rights grant can be found
|
|
|
|
|
* in the file PATENTS. All contributing project authors may
|
|
|
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
|
|
|
*/
|
|
|
|
|
|
2017-09-15 06:47:31 +02:00
|
|
|
#include "test/frame_generator_capturer.h"
|
2013-05-29 13:41:03 +00:00
|
|
|
|
2018-11-28 16:47:49 +01:00
|
|
|
#include <algorithm>
|
|
|
|
|
#include <cmath>
|
|
|
|
|
#include <limits>
|
2019-09-17 17:06:18 +02:00
|
|
|
#include <memory>
|
2017-03-17 05:55:25 -07:00
|
|
|
#include <utility>
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
2020-04-01 13:43:08 +02:00
|
|
|
#include "absl/strings/match.h"
|
2019-12-05 15:59:00 +01:00
|
|
|
#include "api/test/create_frame_generator.h"
|
2018-11-28 16:47:49 +01:00
|
|
|
#include "rtc_base/checks.h"
|
2017-09-15 06:47:31 +02:00
|
|
|
#include "rtc_base/logging.h"
|
|
|
|
|
#include "rtc_base/task_queue.h"
|
2019-01-11 09:11:00 -08:00
|
|
|
#include "rtc_base/time_utils.h"
|
2017-09-15 06:47:31 +02:00
|
|
|
#include "system_wrappers/include/clock.h"
|
2019-07-31 17:30:03 +02:00
|
|
|
#include "test/testsupport/file_utils.h"
|
2013-05-29 13:41:03 +00:00
|
|
|
|
|
|
|
|
namespace webrtc {
|
|
|
|
|
namespace test {
|
2019-07-31 17:30:03 +02:00
|
|
|
namespace {
|
|
|
|
|
std::string TransformFilePath(std::string path) {
|
|
|
|
|
static const std::string resource_prefix = "res://";
|
2020-12-16 07:29:02 +01:00
|
|
|
int ext_pos = path.rfind('.');
|
2019-07-31 17:30:03 +02:00
|
|
|
if (ext_pos < 0) {
|
|
|
|
|
return test::ResourcePath(path, "yuv");
|
2020-04-01 13:43:08 +02:00
|
|
|
} else if (absl::StartsWith(path, resource_prefix)) {
|
2019-07-31 17:30:03 +02:00
|
|
|
std::string name = path.substr(resource_prefix.length(), ext_pos);
|
|
|
|
|
std::string ext = path.substr(ext_pos, path.size());
|
|
|
|
|
return test::ResourcePath(name, ext);
|
|
|
|
|
}
|
|
|
|
|
return path;
|
|
|
|
|
}
|
|
|
|
|
} // namespace
|
2013-05-29 13:41:03 +00:00
|
|
|
|
2019-02-28 13:30:04 +01:00
|
|
|
FrameGeneratorCapturer::FrameGeneratorCapturer(
|
|
|
|
|
Clock* clock,
|
2019-12-04 12:37:13 +01:00
|
|
|
std::unique_ptr<FrameGeneratorInterface> frame_generator,
|
2019-02-28 13:30:04 +01:00
|
|
|
int target_fps,
|
|
|
|
|
TaskQueueFactory& task_queue_factory)
|
2016-09-16 07:53:41 -07:00
|
|
|
: clock_(clock),
|
2018-12-14 13:35:32 +01:00
|
|
|
sending_(true),
|
2016-11-01 11:45:46 -07:00
|
|
|
sink_wants_observer_(nullptr),
|
2017-02-27 06:52:10 -08:00
|
|
|
frame_generator_(std::move(frame_generator)),
|
2018-08-30 11:19:23 +02:00
|
|
|
source_fps_(target_fps),
|
|
|
|
|
target_capture_fps_(target_fps),
|
2017-03-17 05:55:25 -07:00
|
|
|
first_frame_capture_time_(-1),
|
2019-02-28 13:30:04 +01:00
|
|
|
task_queue_(task_queue_factory.CreateTaskQueue(
|
|
|
|
|
"FrameGenCapQ",
|
|
|
|
|
TaskQueueFactory::Priority::HIGH)) {
|
2017-02-27 06:52:10 -08:00
|
|
|
RTC_DCHECK(frame_generator_);
|
2016-09-16 07:53:41 -07:00
|
|
|
RTC_DCHECK_GT(target_fps, 0);
|
2013-05-29 13:41:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FrameGeneratorCapturer::~FrameGeneratorCapturer() {
|
|
|
|
|
Stop();
|
|
|
|
|
}
|
|
|
|
|
|
2019-07-31 17:30:03 +02:00
|
|
|
std::unique_ptr<FrameGeneratorCapturer> FrameGeneratorCapturer::Create(
|
|
|
|
|
Clock* clock,
|
|
|
|
|
TaskQueueFactory& task_queue_factory,
|
|
|
|
|
FrameGeneratorCapturerConfig::SquaresVideo config) {
|
2019-09-17 17:06:18 +02:00
|
|
|
return std::make_unique<FrameGeneratorCapturer>(
|
2019-07-31 17:30:03 +02:00
|
|
|
clock,
|
2019-12-05 15:59:00 +01:00
|
|
|
CreateSquareFrameGenerator(config.width, config.height,
|
|
|
|
|
config.pixel_format, config.num_squares),
|
2019-07-31 17:30:03 +02:00
|
|
|
config.framerate, task_queue_factory);
|
|
|
|
|
}
|
|
|
|
|
std::unique_ptr<FrameGeneratorCapturer> FrameGeneratorCapturer::Create(
|
|
|
|
|
Clock* clock,
|
|
|
|
|
TaskQueueFactory& task_queue_factory,
|
|
|
|
|
FrameGeneratorCapturerConfig::SquareSlides config) {
|
2019-09-17 17:06:18 +02:00
|
|
|
return std::make_unique<FrameGeneratorCapturer>(
|
2019-07-31 17:30:03 +02:00
|
|
|
clock,
|
2019-12-05 15:59:00 +01:00
|
|
|
CreateSlideFrameGenerator(
|
2019-07-31 17:30:03 +02:00
|
|
|
config.width, config.height,
|
|
|
|
|
/*frame_repeat_count*/ config.change_interval.seconds<double>() *
|
|
|
|
|
config.framerate),
|
|
|
|
|
config.framerate, task_queue_factory);
|
|
|
|
|
}
|
|
|
|
|
std::unique_ptr<FrameGeneratorCapturer> FrameGeneratorCapturer::Create(
|
|
|
|
|
Clock* clock,
|
|
|
|
|
TaskQueueFactory& task_queue_factory,
|
|
|
|
|
FrameGeneratorCapturerConfig::VideoFile config) {
|
|
|
|
|
RTC_CHECK(config.width && config.height);
|
2019-09-17 17:06:18 +02:00
|
|
|
return std::make_unique<FrameGeneratorCapturer>(
|
2019-07-31 17:30:03 +02:00
|
|
|
clock,
|
2019-12-05 15:59:00 +01:00
|
|
|
CreateFromYuvFileFrameGenerator({TransformFilePath(config.name)},
|
|
|
|
|
config.width, config.height,
|
|
|
|
|
/*frame_repeat_count*/ 1),
|
2019-07-31 17:30:03 +02:00
|
|
|
config.framerate, task_queue_factory);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
std::unique_ptr<FrameGeneratorCapturer> FrameGeneratorCapturer::Create(
|
|
|
|
|
Clock* clock,
|
|
|
|
|
TaskQueueFactory& task_queue_factory,
|
|
|
|
|
FrameGeneratorCapturerConfig::ImageSlides config) {
|
2019-12-05 15:59:00 +01:00
|
|
|
std::unique_ptr<FrameGeneratorInterface> slides_generator;
|
2019-07-31 17:30:03 +02:00
|
|
|
std::vector<std::string> paths = config.paths;
|
|
|
|
|
for (std::string& path : paths)
|
|
|
|
|
path = TransformFilePath(path);
|
|
|
|
|
|
|
|
|
|
if (config.crop.width || config.crop.height) {
|
|
|
|
|
TimeDelta pause_duration =
|
|
|
|
|
config.change_interval - config.crop.scroll_duration;
|
|
|
|
|
RTC_CHECK_GE(pause_duration, TimeDelta::Zero());
|
|
|
|
|
int crop_width = config.crop.width.value_or(config.width);
|
|
|
|
|
int crop_height = config.crop.height.value_or(config.height);
|
|
|
|
|
RTC_CHECK_LE(crop_width, config.width);
|
|
|
|
|
RTC_CHECK_LE(crop_height, config.height);
|
2019-12-05 15:59:00 +01:00
|
|
|
slides_generator = CreateScrollingInputFromYuvFilesFrameGenerator(
|
2019-07-31 17:30:03 +02:00
|
|
|
clock, paths, config.width, config.height, crop_width, crop_height,
|
|
|
|
|
config.crop.scroll_duration.ms(), pause_duration.ms());
|
|
|
|
|
} else {
|
2019-12-05 15:59:00 +01:00
|
|
|
slides_generator = CreateFromYuvFileFrameGenerator(
|
2019-07-31 17:30:03 +02:00
|
|
|
paths, config.width, config.height,
|
|
|
|
|
/*frame_repeat_count*/ config.change_interval.seconds<double>() *
|
|
|
|
|
config.framerate);
|
|
|
|
|
}
|
2019-09-17 17:06:18 +02:00
|
|
|
return std::make_unique<FrameGeneratorCapturer>(
|
2019-07-31 17:30:03 +02:00
|
|
|
clock, std::move(slides_generator), config.framerate, task_queue_factory);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
std::unique_ptr<FrameGeneratorCapturer> FrameGeneratorCapturer::Create(
|
|
|
|
|
Clock* clock,
|
|
|
|
|
TaskQueueFactory& task_queue_factory,
|
|
|
|
|
const FrameGeneratorCapturerConfig& config) {
|
|
|
|
|
if (config.video_file) {
|
|
|
|
|
return Create(clock, task_queue_factory, *config.video_file);
|
|
|
|
|
} else if (config.image_slides) {
|
|
|
|
|
return Create(clock, task_queue_factory, *config.image_slides);
|
|
|
|
|
} else if (config.squares_slides) {
|
|
|
|
|
return Create(clock, task_queue_factory, *config.squares_slides);
|
|
|
|
|
} else {
|
|
|
|
|
return Create(clock, task_queue_factory,
|
|
|
|
|
config.squares_video.value_or(
|
|
|
|
|
FrameGeneratorCapturerConfig::SquaresVideo()));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2016-04-19 15:01:23 +02:00
|
|
|
void FrameGeneratorCapturer::SetFakeRotation(VideoRotation rotation) {
|
2020-07-08 16:09:21 +02:00
|
|
|
MutexLock lock(&lock_);
|
2016-04-19 15:01:23 +02:00
|
|
|
fake_rotation_ = rotation;
|
|
|
|
|
}
|
|
|
|
|
|
2018-12-12 11:17:43 +01:00
|
|
|
void FrameGeneratorCapturer::SetFakeColorSpace(
|
|
|
|
|
absl::optional<ColorSpace> color_space) {
|
2020-07-08 16:09:21 +02:00
|
|
|
MutexLock lock(&lock_);
|
2018-12-12 11:17:43 +01:00
|
|
|
fake_color_space_ = color_space;
|
|
|
|
|
}
|
|
|
|
|
|
2013-05-29 13:41:03 +00:00
|
|
|
bool FrameGeneratorCapturer::Init() {
|
2013-10-16 11:05:37 +00:00
|
|
|
// This check is added because frame_generator_ might be file based and should
|
|
|
|
|
// not crash because a file moved.
|
Reland of Add framerate to VideoSinkWants and ability to signal on overuse (patchset #1 id:1 of https://codereview.webrtc.org/2783183003/ )
Reason for revert:
Seem to be a flaky test rather than an issue with this cl. Creating reland, will add code to reduce flakiness to that test.
Original issue's description:
> Revert of Add framerate to VideoSinkWants and ability to signal on overuse (patchset #8 id:410001 of https://codereview.webrtc.org/2781433002/ )
>
> Reason for revert:
> This has resulted in failure of CallPerfTest.ReceivesCpuOveruseAndUnderuse test on the Win7 build bot https://build.chromium.org/p/client.webrtc.perf/builders/Win7/builds/1780
>
> Original issue's description:
> > Reland of Add framerate to VideoSinkWants and ability to signal on overuse (patchset #1 id:1 of https://codereview.webrtc.org/2764133002/ )
> >
> > Reason for revert:
> > Found issue with test case, will add fix to reland cl.
> >
> > Original issue's description:
> > > Revert of Add framerate to VideoSinkWants and ability to signal on overuse (patchset #14 id:250001 of https://codereview.webrtc.org/2716643002/ )
> > >
> > > Reason for revert:
> > > Breaks perf tests:
> > > https://build.chromium.org/p/client.webrtc.perf/builders/Win7/builds/1679
> > > https://build.chromium.org/p/client.webrtc.perf/builders/Android32%20Tests%20%28L%20Nexus5%29/builds/2325
> > >
> > > Original issue's description:
> > > > Add framerate to VideoSinkWants and ability to signal on overuse
> > > >
> > > > In ViEEncoder, try to reduce framerate instead of resolution if the
> > > > current degradation preference is maintain-resolution rather than
> > > > balanced.
> > > >
> > > > BUG=webrtc:4172
> > > >
> > > > Review-Url: https://codereview.webrtc.org/2716643002
> > > > Cr-Commit-Position: refs/heads/master@{#17327}
> > > > Committed: https://chromium.googlesource.com/external/webrtc/+/72acf2526177bb4dbb5103cd6e165eb4361a5ae6
> > >
> > > TBR=nisse@webrtc.org,magjed@webrtc.org,kthelgason@webrtc.org,ilnik@webrtc.org,stefan@webrtc.org,sprang@webrtc.org
> > > # Skipping CQ checks because original CL landed less than 1 days ago.
> > > NOPRESUBMIT=true
> > > NOTREECHECKS=true
> > > NOTRY=true
> > > BUG=webrtc:4172
> > >
> > > Review-Url: https://codereview.webrtc.org/2764133002
> > > Cr-Commit-Position: refs/heads/master@{#17331}
> > > Committed: https://chromium.googlesource.com/external/webrtc/+/8b45b11144c968b4173215c76f78c710c9a2ed0b
> >
> > TBR=nisse@webrtc.org,magjed@webrtc.org,kthelgason@webrtc.org,ilnik@webrtc.org,stefan@webrtc.org,skvlad@webrtc.org
> > # Not skipping CQ checks because original CL landed more than 1 days ago.
> > BUG=webrtc:4172
> >
> > Review-Url: https://codereview.webrtc.org/2781433002
> > Cr-Commit-Position: refs/heads/master@{#17474}
> > Committed: https://chromium.googlesource.com/external/webrtc/+/3ea3c77e93121b1ab9d5e46641e6764f2cca0d51
>
> TBR=ilnik@webrtc.org,stefan@webrtc.org,asapersson@webrtc.org,sprang@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:4172
>
> Review-Url: https://codereview.webrtc.org/2783183003
> Cr-Commit-Position: refs/heads/master@{#17477}
> Committed: https://chromium.googlesource.com/external/webrtc/+/f9ed235c9b7248694edcb46feb1f29ce7456ab59
R=ilnik@webrtc.org,stefan@webrtc.org
BUG=webrtc:4172
Review-Url: https://codereview.webrtc.org/2789823002
Cr-Commit-Position: refs/heads/master@{#17498}
2017-04-02 23:53:04 -07:00
|
|
|
if (frame_generator_.get() == nullptr)
|
2013-10-16 11:05:37 +00:00
|
|
|
return false;
|
|
|
|
|
|
2019-07-31 17:30:03 +02:00
|
|
|
frame_task_ = RepeatingTaskHandle::DelayedStart(
|
2019-03-06 18:41:39 +01:00
|
|
|
task_queue_.Get(),
|
2020-02-10 11:16:00 +01:00
|
|
|
TimeDelta::Seconds(1) / GetCurrentConfiguredFramerate(), [this] {
|
2019-01-18 10:30:54 +01:00
|
|
|
InsertFrame();
|
2020-02-10 11:16:00 +01:00
|
|
|
return TimeDelta::Seconds(1) / GetCurrentConfiguredFramerate();
|
2019-01-18 10:30:54 +01:00
|
|
|
});
|
2013-05-29 13:41:03 +00:00
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void FrameGeneratorCapturer::InsertFrame() {
|
2020-07-08 16:09:21 +02:00
|
|
|
MutexLock lock(&lock_);
|
Reland of Add framerate to VideoSinkWants and ability to signal on overuse (patchset #1 id:1 of https://codereview.webrtc.org/2783183003/ )
Reason for revert:
Seem to be a flaky test rather than an issue with this cl. Creating reland, will add code to reduce flakiness to that test.
Original issue's description:
> Revert of Add framerate to VideoSinkWants and ability to signal on overuse (patchset #8 id:410001 of https://codereview.webrtc.org/2781433002/ )
>
> Reason for revert:
> This has resulted in failure of CallPerfTest.ReceivesCpuOveruseAndUnderuse test on the Win7 build bot https://build.chromium.org/p/client.webrtc.perf/builders/Win7/builds/1780
>
> Original issue's description:
> > Reland of Add framerate to VideoSinkWants and ability to signal on overuse (patchset #1 id:1 of https://codereview.webrtc.org/2764133002/ )
> >
> > Reason for revert:
> > Found issue with test case, will add fix to reland cl.
> >
> > Original issue's description:
> > > Revert of Add framerate to VideoSinkWants and ability to signal on overuse (patchset #14 id:250001 of https://codereview.webrtc.org/2716643002/ )
> > >
> > > Reason for revert:
> > > Breaks perf tests:
> > > https://build.chromium.org/p/client.webrtc.perf/builders/Win7/builds/1679
> > > https://build.chromium.org/p/client.webrtc.perf/builders/Android32%20Tests%20%28L%20Nexus5%29/builds/2325
> > >
> > > Original issue's description:
> > > > Add framerate to VideoSinkWants and ability to signal on overuse
> > > >
> > > > In ViEEncoder, try to reduce framerate instead of resolution if the
> > > > current degradation preference is maintain-resolution rather than
> > > > balanced.
> > > >
> > > > BUG=webrtc:4172
> > > >
> > > > Review-Url: https://codereview.webrtc.org/2716643002
> > > > Cr-Commit-Position: refs/heads/master@{#17327}
> > > > Committed: https://chromium.googlesource.com/external/webrtc/+/72acf2526177bb4dbb5103cd6e165eb4361a5ae6
> > >
> > > TBR=nisse@webrtc.org,magjed@webrtc.org,kthelgason@webrtc.org,ilnik@webrtc.org,stefan@webrtc.org,sprang@webrtc.org
> > > # Skipping CQ checks because original CL landed less than 1 days ago.
> > > NOPRESUBMIT=true
> > > NOTREECHECKS=true
> > > NOTRY=true
> > > BUG=webrtc:4172
> > >
> > > Review-Url: https://codereview.webrtc.org/2764133002
> > > Cr-Commit-Position: refs/heads/master@{#17331}
> > > Committed: https://chromium.googlesource.com/external/webrtc/+/8b45b11144c968b4173215c76f78c710c9a2ed0b
> >
> > TBR=nisse@webrtc.org,magjed@webrtc.org,kthelgason@webrtc.org,ilnik@webrtc.org,stefan@webrtc.org,skvlad@webrtc.org
> > # Not skipping CQ checks because original CL landed more than 1 days ago.
> > BUG=webrtc:4172
> >
> > Review-Url: https://codereview.webrtc.org/2781433002
> > Cr-Commit-Position: refs/heads/master@{#17474}
> > Committed: https://chromium.googlesource.com/external/webrtc/+/3ea3c77e93121b1ab9d5e46641e6764f2cca0d51
>
> TBR=ilnik@webrtc.org,stefan@webrtc.org,asapersson@webrtc.org,sprang@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:4172
>
> Review-Url: https://codereview.webrtc.org/2783183003
> Cr-Commit-Position: refs/heads/master@{#17477}
> Committed: https://chromium.googlesource.com/external/webrtc/+/f9ed235c9b7248694edcb46feb1f29ce7456ab59
R=ilnik@webrtc.org,stefan@webrtc.org
BUG=webrtc:4172
Review-Url: https://codereview.webrtc.org/2789823002
Cr-Commit-Position: refs/heads/master@{#17498}
2017-04-02 23:53:04 -07:00
|
|
|
if (sending_) {
|
2019-12-05 15:59:00 +01:00
|
|
|
FrameGeneratorInterface::VideoFrameData frame_data =
|
|
|
|
|
frame_generator_->NextFrame();
|
2018-08-30 11:19:23 +02:00
|
|
|
// TODO(srte): Use more advanced frame rate control to allow arbritrary
|
|
|
|
|
// fractions.
|
|
|
|
|
int decimation =
|
|
|
|
|
std::round(static_cast<double>(source_fps_) / target_capture_fps_);
|
|
|
|
|
for (int i = 1; i < decimation; ++i)
|
2019-12-02 10:34:12 +01:00
|
|
|
frame_data = frame_generator_->NextFrame();
|
|
|
|
|
|
|
|
|
|
VideoFrame frame = VideoFrame::Builder()
|
|
|
|
|
.set_video_frame_buffer(frame_data.buffer)
|
|
|
|
|
.set_rotation(fake_rotation_)
|
|
|
|
|
.set_timestamp_us(clock_->TimeInMicroseconds())
|
|
|
|
|
.set_ntp_time_ms(clock_->CurrentNtpInMilliseconds())
|
|
|
|
|
.set_update_rect(frame_data.update_rect)
|
|
|
|
|
.set_color_space(fake_color_space_)
|
|
|
|
|
.build();
|
Reland of Add framerate to VideoSinkWants and ability to signal on overuse (patchset #1 id:1 of https://codereview.webrtc.org/2783183003/ )
Reason for revert:
Seem to be a flaky test rather than an issue with this cl. Creating reland, will add code to reduce flakiness to that test.
Original issue's description:
> Revert of Add framerate to VideoSinkWants and ability to signal on overuse (patchset #8 id:410001 of https://codereview.webrtc.org/2781433002/ )
>
> Reason for revert:
> This has resulted in failure of CallPerfTest.ReceivesCpuOveruseAndUnderuse test on the Win7 build bot https://build.chromium.org/p/client.webrtc.perf/builders/Win7/builds/1780
>
> Original issue's description:
> > Reland of Add framerate to VideoSinkWants and ability to signal on overuse (patchset #1 id:1 of https://codereview.webrtc.org/2764133002/ )
> >
> > Reason for revert:
> > Found issue with test case, will add fix to reland cl.
> >
> > Original issue's description:
> > > Revert of Add framerate to VideoSinkWants and ability to signal on overuse (patchset #14 id:250001 of https://codereview.webrtc.org/2716643002/ )
> > >
> > > Reason for revert:
> > > Breaks perf tests:
> > > https://build.chromium.org/p/client.webrtc.perf/builders/Win7/builds/1679
> > > https://build.chromium.org/p/client.webrtc.perf/builders/Android32%20Tests%20%28L%20Nexus5%29/builds/2325
> > >
> > > Original issue's description:
> > > > Add framerate to VideoSinkWants and ability to signal on overuse
> > > >
> > > > In ViEEncoder, try to reduce framerate instead of resolution if the
> > > > current degradation preference is maintain-resolution rather than
> > > > balanced.
> > > >
> > > > BUG=webrtc:4172
> > > >
> > > > Review-Url: https://codereview.webrtc.org/2716643002
> > > > Cr-Commit-Position: refs/heads/master@{#17327}
> > > > Committed: https://chromium.googlesource.com/external/webrtc/+/72acf2526177bb4dbb5103cd6e165eb4361a5ae6
> > >
> > > TBR=nisse@webrtc.org,magjed@webrtc.org,kthelgason@webrtc.org,ilnik@webrtc.org,stefan@webrtc.org,sprang@webrtc.org
> > > # Skipping CQ checks because original CL landed less than 1 days ago.
> > > NOPRESUBMIT=true
> > > NOTREECHECKS=true
> > > NOTRY=true
> > > BUG=webrtc:4172
> > >
> > > Review-Url: https://codereview.webrtc.org/2764133002
> > > Cr-Commit-Position: refs/heads/master@{#17331}
> > > Committed: https://chromium.googlesource.com/external/webrtc/+/8b45b11144c968b4173215c76f78c710c9a2ed0b
> >
> > TBR=nisse@webrtc.org,magjed@webrtc.org,kthelgason@webrtc.org,ilnik@webrtc.org,stefan@webrtc.org,skvlad@webrtc.org
> > # Not skipping CQ checks because original CL landed more than 1 days ago.
> > BUG=webrtc:4172
> >
> > Review-Url: https://codereview.webrtc.org/2781433002
> > Cr-Commit-Position: refs/heads/master@{#17474}
> > Committed: https://chromium.googlesource.com/external/webrtc/+/3ea3c77e93121b1ab9d5e46641e6764f2cca0d51
>
> TBR=ilnik@webrtc.org,stefan@webrtc.org,asapersson@webrtc.org,sprang@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:4172
>
> Review-Url: https://codereview.webrtc.org/2783183003
> Cr-Commit-Position: refs/heads/master@{#17477}
> Committed: https://chromium.googlesource.com/external/webrtc/+/f9ed235c9b7248694edcb46feb1f29ce7456ab59
R=ilnik@webrtc.org,stefan@webrtc.org
BUG=webrtc:4172
Review-Url: https://codereview.webrtc.org/2789823002
Cr-Commit-Position: refs/heads/master@{#17498}
2017-04-02 23:53:04 -07:00
|
|
|
if (first_frame_capture_time_ == -1) {
|
2019-12-02 10:34:12 +01:00
|
|
|
first_frame_capture_time_ = frame.ntp_time_ms();
|
Reland of Add framerate to VideoSinkWants and ability to signal on overuse (patchset #1 id:1 of https://codereview.webrtc.org/2783183003/ )
Reason for revert:
Seem to be a flaky test rather than an issue with this cl. Creating reland, will add code to reduce flakiness to that test.
Original issue's description:
> Revert of Add framerate to VideoSinkWants and ability to signal on overuse (patchset #8 id:410001 of https://codereview.webrtc.org/2781433002/ )
>
> Reason for revert:
> This has resulted in failure of CallPerfTest.ReceivesCpuOveruseAndUnderuse test on the Win7 build bot https://build.chromium.org/p/client.webrtc.perf/builders/Win7/builds/1780
>
> Original issue's description:
> > Reland of Add framerate to VideoSinkWants and ability to signal on overuse (patchset #1 id:1 of https://codereview.webrtc.org/2764133002/ )
> >
> > Reason for revert:
> > Found issue with test case, will add fix to reland cl.
> >
> > Original issue's description:
> > > Revert of Add framerate to VideoSinkWants and ability to signal on overuse (patchset #14 id:250001 of https://codereview.webrtc.org/2716643002/ )
> > >
> > > Reason for revert:
> > > Breaks perf tests:
> > > https://build.chromium.org/p/client.webrtc.perf/builders/Win7/builds/1679
> > > https://build.chromium.org/p/client.webrtc.perf/builders/Android32%20Tests%20%28L%20Nexus5%29/builds/2325
> > >
> > > Original issue's description:
> > > > Add framerate to VideoSinkWants and ability to signal on overuse
> > > >
> > > > In ViEEncoder, try to reduce framerate instead of resolution if the
> > > > current degradation preference is maintain-resolution rather than
> > > > balanced.
> > > >
> > > > BUG=webrtc:4172
> > > >
> > > > Review-Url: https://codereview.webrtc.org/2716643002
> > > > Cr-Commit-Position: refs/heads/master@{#17327}
> > > > Committed: https://chromium.googlesource.com/external/webrtc/+/72acf2526177bb4dbb5103cd6e165eb4361a5ae6
> > >
> > > TBR=nisse@webrtc.org,magjed@webrtc.org,kthelgason@webrtc.org,ilnik@webrtc.org,stefan@webrtc.org,sprang@webrtc.org
> > > # Skipping CQ checks because original CL landed less than 1 days ago.
> > > NOPRESUBMIT=true
> > > NOTREECHECKS=true
> > > NOTRY=true
> > > BUG=webrtc:4172
> > >
> > > Review-Url: https://codereview.webrtc.org/2764133002
> > > Cr-Commit-Position: refs/heads/master@{#17331}
> > > Committed: https://chromium.googlesource.com/external/webrtc/+/8b45b11144c968b4173215c76f78c710c9a2ed0b
> >
> > TBR=nisse@webrtc.org,magjed@webrtc.org,kthelgason@webrtc.org,ilnik@webrtc.org,stefan@webrtc.org,skvlad@webrtc.org
> > # Not skipping CQ checks because original CL landed more than 1 days ago.
> > BUG=webrtc:4172
> >
> > Review-Url: https://codereview.webrtc.org/2781433002
> > Cr-Commit-Position: refs/heads/master@{#17474}
> > Committed: https://chromium.googlesource.com/external/webrtc/+/3ea3c77e93121b1ab9d5e46641e6764f2cca0d51
>
> TBR=ilnik@webrtc.org,stefan@webrtc.org,asapersson@webrtc.org,sprang@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:4172
>
> Review-Url: https://codereview.webrtc.org/2783183003
> Cr-Commit-Position: refs/heads/master@{#17477}
> Committed: https://chromium.googlesource.com/external/webrtc/+/f9ed235c9b7248694edcb46feb1f29ce7456ab59
R=ilnik@webrtc.org,stefan@webrtc.org
BUG=webrtc:4172
Review-Url: https://codereview.webrtc.org/2789823002
Cr-Commit-Position: refs/heads/master@{#17498}
2017-04-02 23:53:04 -07:00
|
|
|
}
|
|
|
|
|
|
2019-12-02 10:34:12 +01:00
|
|
|
TestVideoCapturer::OnFrame(frame);
|
2013-05-29 13:41:03 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void FrameGeneratorCapturer::Start() {
|
2019-07-31 17:30:03 +02:00
|
|
|
{
|
2020-07-08 16:09:21 +02:00
|
|
|
MutexLock lock(&lock_);
|
2019-07-31 17:30:03 +02:00
|
|
|
sending_ = true;
|
|
|
|
|
}
|
|
|
|
|
if (!frame_task_.Running()) {
|
|
|
|
|
frame_task_ = RepeatingTaskHandle::Start(task_queue_.Get(), [this] {
|
|
|
|
|
InsertFrame();
|
2020-02-10 11:16:00 +01:00
|
|
|
return TimeDelta::Seconds(1) / GetCurrentConfiguredFramerate();
|
2019-07-31 17:30:03 +02:00
|
|
|
});
|
|
|
|
|
}
|
2013-05-29 13:41:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void FrameGeneratorCapturer::Stop() {
|
2020-07-08 16:09:21 +02:00
|
|
|
MutexLock lock(&lock_);
|
2013-05-29 13:41:03 +00:00
|
|
|
sending_ = false;
|
|
|
|
|
}
|
2015-08-03 04:38:41 -07:00
|
|
|
|
2016-10-02 23:45:26 -07:00
|
|
|
void FrameGeneratorCapturer::ChangeResolution(size_t width, size_t height) {
|
2020-07-08 16:09:21 +02:00
|
|
|
MutexLock lock(&lock_);
|
2016-10-02 23:45:26 -07:00
|
|
|
frame_generator_->ChangeResolution(width, height);
|
|
|
|
|
}
|
|
|
|
|
|
2018-08-30 11:19:23 +02:00
|
|
|
void FrameGeneratorCapturer::ChangeFramerate(int target_framerate) {
|
2020-07-08 16:09:21 +02:00
|
|
|
MutexLock lock(&lock_);
|
2018-08-30 11:19:23 +02:00
|
|
|
RTC_CHECK(target_capture_fps_ > 0);
|
|
|
|
|
if (target_framerate > source_fps_)
|
|
|
|
|
RTC_LOG(LS_WARNING) << "Target framerate clamped from " << target_framerate
|
|
|
|
|
<< " to " << source_fps_;
|
|
|
|
|
if (source_fps_ % target_capture_fps_ != 0) {
|
|
|
|
|
int decimation =
|
|
|
|
|
std::round(static_cast<double>(source_fps_) / target_capture_fps_);
|
|
|
|
|
int effective_rate = target_capture_fps_ / decimation;
|
|
|
|
|
RTC_LOG(LS_WARNING) << "Target framerate, " << target_framerate
|
|
|
|
|
<< ", is an uneven fraction of the source rate, "
|
|
|
|
|
<< source_fps_
|
|
|
|
|
<< ". The framerate will be :" << effective_rate;
|
|
|
|
|
}
|
|
|
|
|
target_capture_fps_ = std::min(source_fps_, target_framerate);
|
|
|
|
|
}
|
|
|
|
|
|
2016-11-01 11:45:46 -07:00
|
|
|
void FrameGeneratorCapturer::SetSinkWantsObserver(SinkWantsObserver* observer) {
|
2020-07-08 16:09:21 +02:00
|
|
|
MutexLock lock(&lock_);
|
2016-11-01 11:45:46 -07:00
|
|
|
RTC_DCHECK(!sink_wants_observer_);
|
|
|
|
|
sink_wants_observer_ = observer;
|
|
|
|
|
}
|
|
|
|
|
|
2016-09-16 07:53:41 -07:00
|
|
|
void FrameGeneratorCapturer::AddOrUpdateSink(
|
|
|
|
|
rtc::VideoSinkInterface<VideoFrame>* sink,
|
|
|
|
|
const rtc::VideoSinkWants& wants) {
|
2018-12-20 13:46:06 +01:00
|
|
|
TestVideoCapturer::AddOrUpdateSink(sink, wants);
|
2020-07-08 16:09:21 +02:00
|
|
|
MutexLock lock(&lock_);
|
2018-12-20 13:46:06 +01:00
|
|
|
if (sink_wants_observer_) {
|
|
|
|
|
// Tests need to observe unmodified sink wants.
|
2016-11-01 11:45:46 -07:00
|
|
|
sink_wants_observer_->OnSinkWantsChanged(sink, wants);
|
Reland of Add framerate to VideoSinkWants and ability to signal on overuse (patchset #1 id:1 of https://codereview.webrtc.org/2783183003/ )
Reason for revert:
Seem to be a flaky test rather than an issue with this cl. Creating reland, will add code to reduce flakiness to that test.
Original issue's description:
> Revert of Add framerate to VideoSinkWants and ability to signal on overuse (patchset #8 id:410001 of https://codereview.webrtc.org/2781433002/ )
>
> Reason for revert:
> This has resulted in failure of CallPerfTest.ReceivesCpuOveruseAndUnderuse test on the Win7 build bot https://build.chromium.org/p/client.webrtc.perf/builders/Win7/builds/1780
>
> Original issue's description:
> > Reland of Add framerate to VideoSinkWants and ability to signal on overuse (patchset #1 id:1 of https://codereview.webrtc.org/2764133002/ )
> >
> > Reason for revert:
> > Found issue with test case, will add fix to reland cl.
> >
> > Original issue's description:
> > > Revert of Add framerate to VideoSinkWants and ability to signal on overuse (patchset #14 id:250001 of https://codereview.webrtc.org/2716643002/ )
> > >
> > > Reason for revert:
> > > Breaks perf tests:
> > > https://build.chromium.org/p/client.webrtc.perf/builders/Win7/builds/1679
> > > https://build.chromium.org/p/client.webrtc.perf/builders/Android32%20Tests%20%28L%20Nexus5%29/builds/2325
> > >
> > > Original issue's description:
> > > > Add framerate to VideoSinkWants and ability to signal on overuse
> > > >
> > > > In ViEEncoder, try to reduce framerate instead of resolution if the
> > > > current degradation preference is maintain-resolution rather than
> > > > balanced.
> > > >
> > > > BUG=webrtc:4172
> > > >
> > > > Review-Url: https://codereview.webrtc.org/2716643002
> > > > Cr-Commit-Position: refs/heads/master@{#17327}
> > > > Committed: https://chromium.googlesource.com/external/webrtc/+/72acf2526177bb4dbb5103cd6e165eb4361a5ae6
> > >
> > > TBR=nisse@webrtc.org,magjed@webrtc.org,kthelgason@webrtc.org,ilnik@webrtc.org,stefan@webrtc.org,sprang@webrtc.org
> > > # Skipping CQ checks because original CL landed less than 1 days ago.
> > > NOPRESUBMIT=true
> > > NOTREECHECKS=true
> > > NOTRY=true
> > > BUG=webrtc:4172
> > >
> > > Review-Url: https://codereview.webrtc.org/2764133002
> > > Cr-Commit-Position: refs/heads/master@{#17331}
> > > Committed: https://chromium.googlesource.com/external/webrtc/+/8b45b11144c968b4173215c76f78c710c9a2ed0b
> >
> > TBR=nisse@webrtc.org,magjed@webrtc.org,kthelgason@webrtc.org,ilnik@webrtc.org,stefan@webrtc.org,skvlad@webrtc.org
> > # Not skipping CQ checks because original CL landed more than 1 days ago.
> > BUG=webrtc:4172
> >
> > Review-Url: https://codereview.webrtc.org/2781433002
> > Cr-Commit-Position: refs/heads/master@{#17474}
> > Committed: https://chromium.googlesource.com/external/webrtc/+/3ea3c77e93121b1ab9d5e46641e6764f2cca0d51
>
> TBR=ilnik@webrtc.org,stefan@webrtc.org,asapersson@webrtc.org,sprang@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:4172
>
> Review-Url: https://codereview.webrtc.org/2783183003
> Cr-Commit-Position: refs/heads/master@{#17477}
> Committed: https://chromium.googlesource.com/external/webrtc/+/f9ed235c9b7248694edcb46feb1f29ce7456ab59
R=ilnik@webrtc.org,stefan@webrtc.org
BUG=webrtc:4172
Review-Url: https://codereview.webrtc.org/2789823002
Cr-Commit-Position: refs/heads/master@{#17498}
2017-04-02 23:53:04 -07:00
|
|
|
}
|
2018-12-20 13:46:06 +01:00
|
|
|
UpdateFps(GetSinkWants().max_framerate_fps);
|
2016-09-16 07:53:41 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void FrameGeneratorCapturer::RemoveSink(
|
|
|
|
|
rtc::VideoSinkInterface<VideoFrame>* sink) {
|
2018-12-20 13:46:06 +01:00
|
|
|
TestVideoCapturer::RemoveSink(sink);
|
|
|
|
|
|
2020-07-08 16:09:21 +02:00
|
|
|
MutexLock lock(&lock_);
|
2018-12-20 13:46:06 +01:00
|
|
|
UpdateFps(GetSinkWants().max_framerate_fps);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void FrameGeneratorCapturer::UpdateFps(int max_fps) {
|
|
|
|
|
if (max_fps < target_capture_fps_) {
|
|
|
|
|
wanted_fps_.emplace(max_fps);
|
|
|
|
|
} else {
|
|
|
|
|
wanted_fps_.reset();
|
|
|
|
|
}
|
2016-09-16 07:53:41 -07:00
|
|
|
}
|
|
|
|
|
|
2015-08-03 04:38:41 -07:00
|
|
|
void FrameGeneratorCapturer::ForceFrame() {
|
2017-03-17 05:55:25 -07:00
|
|
|
// One-time non-repeating task,
|
2018-09-10 14:07:45 +02:00
|
|
|
task_queue_.PostTask([this] { InsertFrame(); });
|
2015-08-03 04:38:41 -07:00
|
|
|
}
|
2017-03-17 05:55:25 -07:00
|
|
|
|
Reland of Add framerate to VideoSinkWants and ability to signal on overuse (patchset #1 id:1 of https://codereview.webrtc.org/2783183003/ )
Reason for revert:
Seem to be a flaky test rather than an issue with this cl. Creating reland, will add code to reduce flakiness to that test.
Original issue's description:
> Revert of Add framerate to VideoSinkWants and ability to signal on overuse (patchset #8 id:410001 of https://codereview.webrtc.org/2781433002/ )
>
> Reason for revert:
> This has resulted in failure of CallPerfTest.ReceivesCpuOveruseAndUnderuse test on the Win7 build bot https://build.chromium.org/p/client.webrtc.perf/builders/Win7/builds/1780
>
> Original issue's description:
> > Reland of Add framerate to VideoSinkWants and ability to signal on overuse (patchset #1 id:1 of https://codereview.webrtc.org/2764133002/ )
> >
> > Reason for revert:
> > Found issue with test case, will add fix to reland cl.
> >
> > Original issue's description:
> > > Revert of Add framerate to VideoSinkWants and ability to signal on overuse (patchset #14 id:250001 of https://codereview.webrtc.org/2716643002/ )
> > >
> > > Reason for revert:
> > > Breaks perf tests:
> > > https://build.chromium.org/p/client.webrtc.perf/builders/Win7/builds/1679
> > > https://build.chromium.org/p/client.webrtc.perf/builders/Android32%20Tests%20%28L%20Nexus5%29/builds/2325
> > >
> > > Original issue's description:
> > > > Add framerate to VideoSinkWants and ability to signal on overuse
> > > >
> > > > In ViEEncoder, try to reduce framerate instead of resolution if the
> > > > current degradation preference is maintain-resolution rather than
> > > > balanced.
> > > >
> > > > BUG=webrtc:4172
> > > >
> > > > Review-Url: https://codereview.webrtc.org/2716643002
> > > > Cr-Commit-Position: refs/heads/master@{#17327}
> > > > Committed: https://chromium.googlesource.com/external/webrtc/+/72acf2526177bb4dbb5103cd6e165eb4361a5ae6
> > >
> > > TBR=nisse@webrtc.org,magjed@webrtc.org,kthelgason@webrtc.org,ilnik@webrtc.org,stefan@webrtc.org,sprang@webrtc.org
> > > # Skipping CQ checks because original CL landed less than 1 days ago.
> > > NOPRESUBMIT=true
> > > NOTREECHECKS=true
> > > NOTRY=true
> > > BUG=webrtc:4172
> > >
> > > Review-Url: https://codereview.webrtc.org/2764133002
> > > Cr-Commit-Position: refs/heads/master@{#17331}
> > > Committed: https://chromium.googlesource.com/external/webrtc/+/8b45b11144c968b4173215c76f78c710c9a2ed0b
> >
> > TBR=nisse@webrtc.org,magjed@webrtc.org,kthelgason@webrtc.org,ilnik@webrtc.org,stefan@webrtc.org,skvlad@webrtc.org
> > # Not skipping CQ checks because original CL landed more than 1 days ago.
> > BUG=webrtc:4172
> >
> > Review-Url: https://codereview.webrtc.org/2781433002
> > Cr-Commit-Position: refs/heads/master@{#17474}
> > Committed: https://chromium.googlesource.com/external/webrtc/+/3ea3c77e93121b1ab9d5e46641e6764f2cca0d51
>
> TBR=ilnik@webrtc.org,stefan@webrtc.org,asapersson@webrtc.org,sprang@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:4172
>
> Review-Url: https://codereview.webrtc.org/2783183003
> Cr-Commit-Position: refs/heads/master@{#17477}
> Committed: https://chromium.googlesource.com/external/webrtc/+/f9ed235c9b7248694edcb46feb1f29ce7456ab59
R=ilnik@webrtc.org,stefan@webrtc.org
BUG=webrtc:4172
Review-Url: https://codereview.webrtc.org/2789823002
Cr-Commit-Position: refs/heads/master@{#17498}
2017-04-02 23:53:04 -07:00
|
|
|
int FrameGeneratorCapturer::GetCurrentConfiguredFramerate() {
|
2020-07-08 16:09:21 +02:00
|
|
|
MutexLock lock(&lock_);
|
2018-08-30 11:19:23 +02:00
|
|
|
if (wanted_fps_ && *wanted_fps_ < target_capture_fps_)
|
Reland of Add framerate to VideoSinkWants and ability to signal on overuse (patchset #1 id:1 of https://codereview.webrtc.org/2783183003/ )
Reason for revert:
Seem to be a flaky test rather than an issue with this cl. Creating reland, will add code to reduce flakiness to that test.
Original issue's description:
> Revert of Add framerate to VideoSinkWants and ability to signal on overuse (patchset #8 id:410001 of https://codereview.webrtc.org/2781433002/ )
>
> Reason for revert:
> This has resulted in failure of CallPerfTest.ReceivesCpuOveruseAndUnderuse test on the Win7 build bot https://build.chromium.org/p/client.webrtc.perf/builders/Win7/builds/1780
>
> Original issue's description:
> > Reland of Add framerate to VideoSinkWants and ability to signal on overuse (patchset #1 id:1 of https://codereview.webrtc.org/2764133002/ )
> >
> > Reason for revert:
> > Found issue with test case, will add fix to reland cl.
> >
> > Original issue's description:
> > > Revert of Add framerate to VideoSinkWants and ability to signal on overuse (patchset #14 id:250001 of https://codereview.webrtc.org/2716643002/ )
> > >
> > > Reason for revert:
> > > Breaks perf tests:
> > > https://build.chromium.org/p/client.webrtc.perf/builders/Win7/builds/1679
> > > https://build.chromium.org/p/client.webrtc.perf/builders/Android32%20Tests%20%28L%20Nexus5%29/builds/2325
> > >
> > > Original issue's description:
> > > > Add framerate to VideoSinkWants and ability to signal on overuse
> > > >
> > > > In ViEEncoder, try to reduce framerate instead of resolution if the
> > > > current degradation preference is maintain-resolution rather than
> > > > balanced.
> > > >
> > > > BUG=webrtc:4172
> > > >
> > > > Review-Url: https://codereview.webrtc.org/2716643002
> > > > Cr-Commit-Position: refs/heads/master@{#17327}
> > > > Committed: https://chromium.googlesource.com/external/webrtc/+/72acf2526177bb4dbb5103cd6e165eb4361a5ae6
> > >
> > > TBR=nisse@webrtc.org,magjed@webrtc.org,kthelgason@webrtc.org,ilnik@webrtc.org,stefan@webrtc.org,sprang@webrtc.org
> > > # Skipping CQ checks because original CL landed less than 1 days ago.
> > > NOPRESUBMIT=true
> > > NOTREECHECKS=true
> > > NOTRY=true
> > > BUG=webrtc:4172
> > >
> > > Review-Url: https://codereview.webrtc.org/2764133002
> > > Cr-Commit-Position: refs/heads/master@{#17331}
> > > Committed: https://chromium.googlesource.com/external/webrtc/+/8b45b11144c968b4173215c76f78c710c9a2ed0b
> >
> > TBR=nisse@webrtc.org,magjed@webrtc.org,kthelgason@webrtc.org,ilnik@webrtc.org,stefan@webrtc.org,skvlad@webrtc.org
> > # Not skipping CQ checks because original CL landed more than 1 days ago.
> > BUG=webrtc:4172
> >
> > Review-Url: https://codereview.webrtc.org/2781433002
> > Cr-Commit-Position: refs/heads/master@{#17474}
> > Committed: https://chromium.googlesource.com/external/webrtc/+/3ea3c77e93121b1ab9d5e46641e6764f2cca0d51
>
> TBR=ilnik@webrtc.org,stefan@webrtc.org,asapersson@webrtc.org,sprang@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:4172
>
> Review-Url: https://codereview.webrtc.org/2783183003
> Cr-Commit-Position: refs/heads/master@{#17477}
> Committed: https://chromium.googlesource.com/external/webrtc/+/f9ed235c9b7248694edcb46feb1f29ce7456ab59
R=ilnik@webrtc.org,stefan@webrtc.org
BUG=webrtc:4172
Review-Url: https://codereview.webrtc.org/2789823002
Cr-Commit-Position: refs/heads/master@{#17498}
2017-04-02 23:53:04 -07:00
|
|
|
return *wanted_fps_;
|
2018-08-30 11:19:23 +02:00
|
|
|
return target_capture_fps_;
|
Reland of Add framerate to VideoSinkWants and ability to signal on overuse (patchset #1 id:1 of https://codereview.webrtc.org/2783183003/ )
Reason for revert:
Seem to be a flaky test rather than an issue with this cl. Creating reland, will add code to reduce flakiness to that test.
Original issue's description:
> Revert of Add framerate to VideoSinkWants and ability to signal on overuse (patchset #8 id:410001 of https://codereview.webrtc.org/2781433002/ )
>
> Reason for revert:
> This has resulted in failure of CallPerfTest.ReceivesCpuOveruseAndUnderuse test on the Win7 build bot https://build.chromium.org/p/client.webrtc.perf/builders/Win7/builds/1780
>
> Original issue's description:
> > Reland of Add framerate to VideoSinkWants and ability to signal on overuse (patchset #1 id:1 of https://codereview.webrtc.org/2764133002/ )
> >
> > Reason for revert:
> > Found issue with test case, will add fix to reland cl.
> >
> > Original issue's description:
> > > Revert of Add framerate to VideoSinkWants and ability to signal on overuse (patchset #14 id:250001 of https://codereview.webrtc.org/2716643002/ )
> > >
> > > Reason for revert:
> > > Breaks perf tests:
> > > https://build.chromium.org/p/client.webrtc.perf/builders/Win7/builds/1679
> > > https://build.chromium.org/p/client.webrtc.perf/builders/Android32%20Tests%20%28L%20Nexus5%29/builds/2325
> > >
> > > Original issue's description:
> > > > Add framerate to VideoSinkWants and ability to signal on overuse
> > > >
> > > > In ViEEncoder, try to reduce framerate instead of resolution if the
> > > > current degradation preference is maintain-resolution rather than
> > > > balanced.
> > > >
> > > > BUG=webrtc:4172
> > > >
> > > > Review-Url: https://codereview.webrtc.org/2716643002
> > > > Cr-Commit-Position: refs/heads/master@{#17327}
> > > > Committed: https://chromium.googlesource.com/external/webrtc/+/72acf2526177bb4dbb5103cd6e165eb4361a5ae6
> > >
> > > TBR=nisse@webrtc.org,magjed@webrtc.org,kthelgason@webrtc.org,ilnik@webrtc.org,stefan@webrtc.org,sprang@webrtc.org
> > > # Skipping CQ checks because original CL landed less than 1 days ago.
> > > NOPRESUBMIT=true
> > > NOTREECHECKS=true
> > > NOTRY=true
> > > BUG=webrtc:4172
> > >
> > > Review-Url: https://codereview.webrtc.org/2764133002
> > > Cr-Commit-Position: refs/heads/master@{#17331}
> > > Committed: https://chromium.googlesource.com/external/webrtc/+/8b45b11144c968b4173215c76f78c710c9a2ed0b
> >
> > TBR=nisse@webrtc.org,magjed@webrtc.org,kthelgason@webrtc.org,ilnik@webrtc.org,stefan@webrtc.org,skvlad@webrtc.org
> > # Not skipping CQ checks because original CL landed more than 1 days ago.
> > BUG=webrtc:4172
> >
> > Review-Url: https://codereview.webrtc.org/2781433002
> > Cr-Commit-Position: refs/heads/master@{#17474}
> > Committed: https://chromium.googlesource.com/external/webrtc/+/3ea3c77e93121b1ab9d5e46641e6764f2cca0d51
>
> TBR=ilnik@webrtc.org,stefan@webrtc.org,asapersson@webrtc.org,sprang@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:4172
>
> Review-Url: https://codereview.webrtc.org/2783183003
> Cr-Commit-Position: refs/heads/master@{#17477}
> Committed: https://chromium.googlesource.com/external/webrtc/+/f9ed235c9b7248694edcb46feb1f29ce7456ab59
R=ilnik@webrtc.org,stefan@webrtc.org
BUG=webrtc:4172
Review-Url: https://codereview.webrtc.org/2789823002
Cr-Commit-Position: refs/heads/master@{#17498}
2017-04-02 23:53:04 -07:00
|
|
|
}
|
|
|
|
|
|
2017-03-17 05:55:25 -07:00
|
|
|
} // namespace test
|
|
|
|
|
} // namespace webrtc
|