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

Unified Diff: webrtc/media/engine/fakewebrtcvideocapturemodule.h

Issue 2534553002: Replace VideoCaptureDataCallback by VideoSinkInterface. (Closed)
Patch Set: Break overlong lines. Created 4 years 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/media/engine/fakewebrtcvcmfactory.h ('k') | webrtc/media/engine/webrtcvideocapturer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/engine/fakewebrtcvideocapturemodule.h
diff --git a/webrtc/media/engine/fakewebrtcvideocapturemodule.h b/webrtc/media/engine/fakewebrtcvideocapturemodule.h
index d81597858b9873c5d53c8ed4534a17585f42ff02..e6f0ecc11414787eb29fbbad2dae2c9aff8e444d 100644
--- a/webrtc/media/engine/fakewebrtcvideocapturemodule.h
+++ b/webrtc/media/engine/fakewebrtcvideocapturemodule.h
@@ -21,36 +21,17 @@ class FakeWebRtcVcmFactory;
// Fake class for mocking out webrtc::VideoCaptureModule.
class FakeWebRtcVideoCaptureModule : public webrtc::VideoCaptureModule {
public:
- FakeWebRtcVideoCaptureModule(FakeWebRtcVcmFactory* factory, int32_t id)
+ FakeWebRtcVideoCaptureModule(FakeWebRtcVcmFactory* factory)
: factory_(factory),
- id_(id),
callback_(NULL),
- running_(false),
- delay_(0) {
+ running_(false) {
}
~FakeWebRtcVideoCaptureModule();
- int64_t TimeUntilNextProcess() override { return 0; }
- void Process() override {}
void RegisterCaptureDataCallback(
- webrtc::VideoCaptureDataCallback& callback) override {
- callback_ = &callback;
+ rtc::VideoSinkInterface<webrtc::VideoFrame>* callback) override {
+ callback_ = callback;
}
void DeRegisterCaptureDataCallback() override { callback_ = NULL; }
- void RegisterCaptureCallback(
- webrtc::VideoCaptureFeedBack& callback) override {
- // Not implemented.
- }
- void DeRegisterCaptureCallback() override {
- // Not implemented.
- }
- void SetCaptureDelay(int32_t delay) override { delay_ = delay; }
- int32_t CaptureDelay() override { return delay_; }
- void EnableFrameRateCallback(const bool enable) override {
- // not implemented
- }
- void EnableNoPictureAlarm(const bool enable) override {
- // not implemented
- }
int32_t StartCapture(const webrtc::VideoCaptureCapability& cap) override {
if (running_) return -1;
cap_ = cap;
@@ -80,11 +61,6 @@ class FakeWebRtcVideoCaptureModule : public webrtc::VideoCaptureModule {
bool GetApplyRotation() override {
return true; // Rotation compensation is turned on.
}
- VideoCaptureEncodeInterface* GetEncodeInterface(
- const webrtc::VideoCodec& codec) override {
- return NULL; // not implemented
- }
-
void SendFrame(int w, int h) {
if (!running_) return;
@@ -94,8 +70,7 @@ class FakeWebRtcVideoCaptureModule : public webrtc::VideoCaptureModule {
// https://bugs.chromium.org/p/libyuv/issues/detail?id=377
buffer->InitializeData();
if (callback_) {
- callback_->OnIncomingCapturedFrame(
- id_,
+ callback_->OnFrame(
webrtc::VideoFrame(buffer, 0, 0, webrtc::kVideoRotation_0));
}
}
@@ -106,11 +81,9 @@ class FakeWebRtcVideoCaptureModule : public webrtc::VideoCaptureModule {
private:
FakeWebRtcVcmFactory* factory_;
- int id_;
- webrtc::VideoCaptureDataCallback* callback_;
+ rtc::VideoSinkInterface<webrtc::VideoFrame>* callback_;
bool running_;
webrtc::VideoCaptureCapability cap_;
- int delay_;
};
#endif // WEBRTC_MEDIA_ENGINE_FAKEWEBRTCVIDEOCAPTUREMODULE_H_
« no previous file with comments | « webrtc/media/engine/fakewebrtcvcmfactory.h ('k') | webrtc/media/engine/webrtcvideocapturer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698