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

Unified Diff: media/video/capture/video_capture_device.h

Issue 921683004: Revert: Issue 545053002: Add still image capture interface for VideoCaptureDevice. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased (media/video/capture/video_capture_types.* went to media/base) Created 5 years, 10 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 | « media/base/video_capture_types.cc ('k') | media/video/capture/video_capture_device.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/video/capture/video_capture_device.h
diff --git a/media/video/capture/video_capture_device.h b/media/video/capture/video_capture_device.h
index 6a36e7eea13beaaa24944d05ddc51fb41b0e482e..87de975ed39ef18355ce1fafba236ba11153031f 100644
--- a/media/video/capture/video_capture_device.h
+++ b/media/video/capture/video_capture_device.h
@@ -229,41 +229,6 @@ class MEDIA_EXPORT VideoCaptureDevice {
// VideoCaptureDevice requests the |message| to be logged.
virtual void OnLog(const std::string& message) {}
-
- // The video stream has been muted. After this callback, no more
- // OnIncomingCapturedData() will be called. This may happen when
- // CaptureImage() has called. After the still image captured, the client
- // will get notified by OnUnmute() and the video stream will be resumed.
- virtual void OnMute() {}
-
- // The video stream has resumed.
- virtual void OnUnmute() {}
- };
-
- // Interface for clients that use VideoCaptureDevice for taking still images.
- class MEDIA_EXPORT ImageClient {
- public:
- virtual ~ImageClient() {}
-
- // Callback function to notify the client a captured image is available.
- //
- // The captured still image is stored at address |data| and is of |length|
- // bytes. The format of the frame is described by |format|, and is assumed
- // to be tightly packed. The still image should be rotated |rotation|
- // degrees clockwise for viewing.
- //
- // Note that the content in |data| will not be valid after this callback
- // returns. Copy the content to use it later.
- virtual void OnIncomingCapturedData(const uint8* data,
- size_t length,
- const ImageCaptureFormat& format,
- int rotation,
- base::TimeTicks timestamp) = 0;
-
- // Callback function to notify the client about a failure of the image
- // capture. The VideoCaptureDevice must be StopAndDeAllocate()-ed.
- // |reason| contains a text description of the error.
- virtual void OnError(const std::string& reason) = 0;
};
virtual ~VideoCaptureDevice();
@@ -291,32 +256,6 @@ class MEDIA_EXPORT VideoCaptureDevice {
// defined, otherwise returns 0.
int GetPowerLineFrequencyForLocation() const;
- // Initializes the device for still image capture for the given image format.
- // This call is synchronous and returns true iff the initialization is
- // successful.
- //
- // This function must be called between AllocateAndStart() and
- // StopAndDeAllocate().
- virtual bool InitializeImageCapture(const ImageCaptureFormat& image_format,
- scoped_ptr<ImageClient> client);
-
- // Releases resources for image capture.
- //
- // The ImageClient passed from InitializeImageCapture will be freed. This
- // method must be called between InitializeImageCapture() and
- // StopAndDeAllocate().
- virtual void ReleaseImageCapture() {}
-
- // Requests one image from the device.
- //
- // The image will be returned via the ImageClient::OnIncomingCapturedData()
- // callback. If the video stream has to be stopped to capture the still image,
- // the Client::OnMute() and Client::OnUnmute() will be called.
- //
- // This function must be called between InitializeImageCapture() and
- // ReleaseImageCapture().
- virtual void CaptureImage() {}
-
protected:
static const int kPowerLine50Hz = 50;
static const int kPowerLine60Hz = 60;
« no previous file with comments | « media/base/video_capture_types.cc ('k') | media/video/capture/video_capture_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698