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_ |