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

Unified Diff: webrtc/modules/video_capture/video_capture.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
Index: webrtc/modules/video_capture/video_capture.h
diff --git a/webrtc/modules/video_capture/video_capture.h b/webrtc/modules/video_capture/video_capture.h
index 08d02211c709409b9f859fe2b8018eb906c419a5..dc22e6aeb50f62aace43f22ae0d329c131e3c074 100644
--- a/webrtc/modules/video_capture/video_capture.h
+++ b/webrtc/modules/video_capture/video_capture.h
@@ -12,12 +12,13 @@
#define WEBRTC_MODULES_VIDEO_CAPTURE_VIDEO_CAPTURE_H_
#include "webrtc/common_video/rotation.h"
+#include "webrtc/media/base/videosinkinterface.h"
#include "webrtc/modules/include/module.h"
#include "webrtc/modules/video_capture/video_capture_defines.h"
namespace webrtc {
-class VideoCaptureModule: public RefCountedModule {
+class VideoCaptureModule: public rtc::RefCountInterface {
public:
// Interface for receiving information about available camera devices.
class DeviceInfo {
@@ -75,40 +76,13 @@ class VideoCaptureModule: public RefCountedModule {
virtual ~DeviceInfo() {}
};
- class VideoCaptureEncodeInterface {
- public:
- virtual int32_t ConfigureEncoder(const VideoCodec& codec,
- uint32_t maxPayloadSize) = 0;
- // Inform the encoder about the new target bit rate.
- // - newBitRate : New target bit rate in Kbit/s.
- // - frameRate : The target frame rate.
- virtual int32_t SetRates(int32_t newBitRate, int32_t frameRate) = 0;
- // Inform the encoder about the packet loss and the round-trip time.
- // - packetLoss : Fraction lost
- // (loss rate in percent = 100 * packetLoss / 255).
- // - rtt : Round-trip time in milliseconds.
- virtual int32_t SetChannelParameters(uint32_t packetLoss, int64_t rtt) = 0;
-
- // Encode the next frame as key frame.
- virtual int32_t EncodeFrameType(const FrameType type) = 0;
- protected:
- virtual ~VideoCaptureEncodeInterface() {
- }
- };
-
// Register capture data callback
virtual void RegisterCaptureDataCallback(
- VideoCaptureDataCallback& dataCallback) = 0;
+ rtc::VideoSinkInterface<VideoFrame> *dataCallback) = 0;
// Remove capture data callback
virtual void DeRegisterCaptureDataCallback() = 0;
- // Register capture callback.
- virtual void RegisterCaptureCallback(VideoCaptureFeedBack& callBack) = 0;
-
- // Remove capture callback.
- virtual void DeRegisterCaptureCallback() = 0;
-
// Start capture device
virtual int32_t StartCapture(
const VideoCaptureCapability& capability) = 0;
@@ -124,11 +98,6 @@ class VideoCaptureModule: public RefCountedModule {
// Gets the current configuration.
virtual int32_t CaptureSettings(VideoCaptureCapability& settings) = 0;
- virtual void SetCaptureDelay(int32_t delayMS) = 0;
-
- // Returns the current CaptureDelay. Only valid when the camera is running.
- virtual int32_t CaptureDelay() = 0;
-
// Set the rotation of the captured frames.
// If the rotation is set to the same as returned by
// DeviceInfo::GetOrientation the captured frames are
@@ -144,14 +113,6 @@ class VideoCaptureModule: public RefCountedModule {
// Return whether the rotation is applied or left pending.
virtual bool GetApplyRotation() = 0;
- // Gets a pointer to an encode interface if the capture device supports the
- // requested type and size. NULL otherwise.
- virtual VideoCaptureEncodeInterface* GetEncodeInterface(
- const VideoCodec& codec) = 0;
-
- virtual void EnableFrameRateCallback(const bool enable) = 0;
- virtual void EnableNoPictureAlarm(const bool enable) = 0;
-
protected:
virtual ~VideoCaptureModule() {};
};
« no previous file with comments | « webrtc/modules/video_capture/test/video_capture_unittest.cc ('k') | webrtc/modules/video_capture/video_capture_defines.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698