Renames test::VideoCapturer to TestVideoCapturer.
Bug: webrtc:9620 Change-Id: Ia9afbc2d4f0448f9479516baa741d925a0aca5ac Reviewed-on: https://webrtc-review.googlesource.com/93760 Reviewed-by: Erik Språng <sprang@webrtc.org> Commit-Queue: Sebastian Jansson <srte@webrtc.org> Cr-Commit-Position: refs/heads/master@{#24346}
This commit is contained in:

committed by
Commit Bot

parent
4e199e9f08
commit
f1f363fae7
@ -44,10 +44,10 @@ rtc_source_set("video_test_common") {
|
||||
"frame_generator_capturer.h",
|
||||
"frame_utils.cc",
|
||||
"frame_utils.h",
|
||||
"test_video_capturer.cc",
|
||||
"test_video_capturer.h",
|
||||
"vcm_capturer.cc",
|
||||
"vcm_capturer.h",
|
||||
"video_capturer.cc",
|
||||
"video_capturer.h",
|
||||
"video_codec_settings.h",
|
||||
]
|
||||
|
||||
|
@ -190,7 +190,7 @@ class CallTest : public ::testing::Test {
|
||||
|
||||
test::FrameGeneratorCapturer* frame_generator_capturer_;
|
||||
std::vector<rtc::VideoSourceInterface<VideoFrame>*> video_sources_;
|
||||
std::vector<std::unique_ptr<VideoCapturer>> video_capturers_;
|
||||
std::vector<std::unique_ptr<TestVideoCapturer>> video_capturers_;
|
||||
DegradationPreference degradation_preference_ =
|
||||
DegradationPreference::MAINTAIN_FRAMERATE;
|
||||
|
||||
|
@ -227,7 +227,7 @@ void FrameGeneratorCapturer::AddOrUpdateSink(
|
||||
// adaptation.
|
||||
rtc::VideoSinkWants resolution_wants = wants;
|
||||
resolution_wants.max_framerate_fps = std::numeric_limits<int>::max();
|
||||
VideoCapturer::AddOrUpdateSink(sink, resolution_wants);
|
||||
TestVideoCapturer::AddOrUpdateSink(sink, resolution_wants);
|
||||
|
||||
// Ignore any requests for framerate higher than initially configured.
|
||||
if (wants.max_framerate_fps < target_fps_) {
|
||||
|
@ -17,7 +17,7 @@
|
||||
#include "rtc_base/criticalsection.h"
|
||||
#include "rtc_base/task_queue.h"
|
||||
#include "test/frame_generator.h"
|
||||
#include "test/video_capturer.h"
|
||||
#include "test/test_video_capturer.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
@ -25,7 +25,7 @@ namespace test {
|
||||
|
||||
class FrameGenerator;
|
||||
|
||||
class FrameGeneratorCapturer : public VideoCapturer {
|
||||
class FrameGeneratorCapturer : public TestVideoCapturer {
|
||||
public:
|
||||
class SinkWantsObserver {
|
||||
public:
|
||||
|
@ -8,16 +8,18 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include "test/video_capturer.h"
|
||||
#include "test/test_video_capturer.h"
|
||||
|
||||
#include "rtc_base/constructormagic.h"
|
||||
|
||||
namespace webrtc {
|
||||
namespace test {
|
||||
VideoCapturer::VideoCapturer() : video_adapter_(new cricket::VideoAdapter()) {}
|
||||
VideoCapturer::~VideoCapturer() {}
|
||||
TestVideoCapturer::TestVideoCapturer()
|
||||
: video_adapter_(new cricket::VideoAdapter()) {}
|
||||
TestVideoCapturer::~TestVideoCapturer() {}
|
||||
|
||||
absl::optional<VideoFrame> VideoCapturer::AdaptFrame(const VideoFrame& frame) {
|
||||
absl::optional<VideoFrame> TestVideoCapturer::AdaptFrame(
|
||||
const VideoFrame& frame) {
|
||||
int cropped_width = 0;
|
||||
int cropped_height = 0;
|
||||
int out_width = 0;
|
||||
@ -47,8 +49,9 @@ absl::optional<VideoFrame> VideoCapturer::AdaptFrame(const VideoFrame& frame) {
|
||||
return out_frame;
|
||||
}
|
||||
|
||||
void VideoCapturer::AddOrUpdateSink(rtc::VideoSinkInterface<VideoFrame>* sink,
|
||||
const rtc::VideoSinkWants& wants) {
|
||||
void TestVideoCapturer::AddOrUpdateSink(
|
||||
rtc::VideoSinkInterface<VideoFrame>* sink,
|
||||
const rtc::VideoSinkWants& wants) {
|
||||
video_adapter_->OnResolutionFramerateRequest(
|
||||
wants.target_pixel_count, wants.max_pixel_count, wants.max_framerate_fps);
|
||||
}
|
@ -7,8 +7,8 @@
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
#ifndef TEST_VIDEO_CAPTURER_H_
|
||||
#define TEST_VIDEO_CAPTURER_H_
|
||||
#ifndef TEST_TEST_VIDEO_CAPTURER_H_
|
||||
#define TEST_TEST_VIDEO_CAPTURER_H_
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
@ -29,10 +29,10 @@ namespace webrtc {
|
||||
class Clock;
|
||||
namespace test {
|
||||
|
||||
class VideoCapturer : public rtc::VideoSourceInterface<VideoFrame> {
|
||||
class TestVideoCapturer : public rtc::VideoSourceInterface<VideoFrame> {
|
||||
public:
|
||||
VideoCapturer();
|
||||
virtual ~VideoCapturer();
|
||||
TestVideoCapturer();
|
||||
virtual ~TestVideoCapturer();
|
||||
|
||||
virtual void Start() = 0;
|
||||
virtual void Stop() = 0;
|
||||
@ -50,4 +50,4 @@ class VideoCapturer : public rtc::VideoSourceInterface<VideoFrame> {
|
||||
} // namespace test
|
||||
} // namespace webrtc
|
||||
|
||||
#endif // TEST_VIDEO_CAPTURER_H_
|
||||
#endif // TEST_TEST_VIDEO_CAPTURER_H_
|
@ -83,7 +83,7 @@ void VcmCapturer::AddOrUpdateSink(rtc::VideoSinkInterface<VideoFrame>* sink,
|
||||
rtc::CritScope lock(&crit_);
|
||||
RTC_CHECK(!sink_ || sink_ == sink);
|
||||
sink_ = sink;
|
||||
VideoCapturer::AddOrUpdateSink(sink, wants);
|
||||
TestVideoCapturer::AddOrUpdateSink(sink, wants);
|
||||
}
|
||||
|
||||
void VcmCapturer::RemoveSink(rtc::VideoSinkInterface<VideoFrame>* sink) {
|
||||
|
@ -17,12 +17,12 @@
|
||||
#include "modules/video_capture/video_capture.h"
|
||||
#include "rtc_base/criticalsection.h"
|
||||
#include "rtc_base/scoped_ref_ptr.h"
|
||||
#include "test/video_capturer.h"
|
||||
#include "test/test_video_capturer.h"
|
||||
|
||||
namespace webrtc {
|
||||
namespace test {
|
||||
|
||||
class VcmCapturer : public VideoCapturer,
|
||||
class VcmCapturer : public TestVideoCapturer,
|
||||
public rtc::VideoSinkInterface<VideoFrame> {
|
||||
public:
|
||||
static VcmCapturer* Create(size_t width,
|
||||
|
Reference in New Issue
Block a user