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

Unified Diff: webrtc/test/vcm_capturer.cc

Issue 2344923002: Revert of Replace interface VideoCapturerInput with VideoSinkInterface. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/test/vcm_capturer.h ('k') | webrtc/test/video_capturer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/test/vcm_capturer.cc
diff --git a/webrtc/test/vcm_capturer.cc b/webrtc/test/vcm_capturer.cc
index 49d97101e9459318bf284c5f667ad23adec91a2f..792b97ff0883f7157a9f11f9cff622a9885b23b3 100644
--- a/webrtc/test/vcm_capturer.cc
+++ b/webrtc/test/vcm_capturer.cc
@@ -16,7 +16,9 @@
namespace webrtc {
namespace test {
-VcmCapturer::VcmCapturer() : started_(false), sink_(nullptr), vcm_(NULL) {}
+VcmCapturer::VcmCapturer(webrtc::VideoCaptureInput* input)
+ : VideoCapturer(input), started_(false), vcm_(NULL) {
+}
bool VcmCapturer::Init(size_t width, size_t height, size_t target_fps) {
VideoCaptureModule::DeviceInfo* device_info =
@@ -52,10 +54,11 @@
return true;
}
-VcmCapturer* VcmCapturer::Create(size_t width,
+VcmCapturer* VcmCapturer::Create(VideoCaptureInput* input,
+ size_t width,
size_t height,
size_t target_fps) {
- VcmCapturer* vcm_capturer = new VcmCapturer();
+ VcmCapturer* vcm_capturer = new VcmCapturer(input);
if (!vcm_capturer->Init(width, height, target_fps)) {
// TODO(pbos): Log a warning that this failed.
delete vcm_capturer;
@@ -75,19 +78,6 @@
started_ = false;
}
-void VcmCapturer::AddOrUpdateSink(rtc::VideoSinkInterface<VideoFrame>* sink,
- const rtc::VideoSinkWants& wants) {
- rtc::CritScope lock(&crit_);
- RTC_CHECK(!sink_);
- sink_ = sink;
-}
-
-void VcmCapturer::RemoveSink(rtc::VideoSinkInterface<VideoFrame>* sink) {
- rtc::CritScope lock(&crit_);
- RTC_CHECK(sink_ == sink);
- sink_ = nullptr;
-}
-
void VcmCapturer::Destroy() {
if (!vcm_)
return;
@@ -103,8 +93,8 @@
void VcmCapturer::OnIncomingCapturedFrame(const int32_t id,
const VideoFrame& frame) {
rtc::CritScope lock(&crit_);
- if (started_ && sink_)
- sink_->OnFrame(frame);
+ if (started_)
+ input_->IncomingCapturedFrame(frame);
}
void VcmCapturer::OnCaptureDelayChanged(const int32_t id, const int32_t delay) {
« no previous file with comments | « webrtc/test/vcm_capturer.h ('k') | webrtc/test/video_capturer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698