| Index: media/video/capture/linux/video_capture_device_linux.h
|
| diff --git a/media/video/capture/linux/video_capture_device_linux.h b/media/video/capture/linux/video_capture_device_linux.h
|
| index e06804f90c644f800126c0172bffc6d1a7729d84..f019af15fcccefcdf7bed7b2db6e003b2913e461 100644
|
| --- a/media/video/capture/linux/video_capture_device_linux.h
|
| +++ b/media/video/capture/linux/video_capture_device_linux.h
|
| @@ -18,23 +18,20 @@
|
|
|
| namespace media {
|
|
|
| -class VideoCaptureDeviceLinux : public VideoCaptureDevice1 {
|
| +class VideoCaptureDeviceLinux : public VideoCaptureDevice {
|
| public:
|
| explicit VideoCaptureDeviceLinux(const Name& device_name);
|
| virtual ~VideoCaptureDeviceLinux();
|
|
|
| // VideoCaptureDevice implementation.
|
| - virtual void Allocate(const VideoCaptureCapability& capture_format,
|
| - VideoCaptureDevice::Client* client) OVERRIDE;
|
| - virtual void Start() OVERRIDE;
|
| - virtual void Stop() OVERRIDE;
|
| - virtual void DeAllocate() OVERRIDE;
|
| - virtual const Name& device_name() OVERRIDE;
|
| + virtual void AllocateAndStart(const VideoCaptureCapability& capture_format,
|
| + scoped_ptr<Client> client) OVERRIDE;
|
| +
|
| + virtual void StopAndDeAllocate() OVERRIDE;
|
|
|
| private:
|
| enum InternalState {
|
| kIdle, // The device driver is opened but camera is not in use.
|
| - kAllocated, // The camera has been allocated and can be started.
|
| kCapturing, // Video is being captured.
|
| kError // Error accessing HW functions.
|
| // User needs to recover by destroying the object.
|
| @@ -48,13 +45,11 @@ class VideoCaptureDeviceLinux : public VideoCaptureDevice1 {
|
| };
|
|
|
| // Called on the v4l2_thread_.
|
| - void OnAllocate(int width,
|
| - int height,
|
| - int frame_rate,
|
| - VideoCaptureDevice::Client* client);
|
| - void OnStart();
|
| - void OnStop();
|
| - void OnDeAllocate();
|
| + void OnAllocateAndStart(int width,
|
| + int height,
|
| + int frame_rate,
|
| + scoped_ptr<Client> client);
|
| + void OnStopAndDeAllocate();
|
| void OnCaptureTask();
|
|
|
| bool AllocateVideoBuffers();
|
| @@ -62,7 +57,7 @@ class VideoCaptureDeviceLinux : public VideoCaptureDevice1 {
|
| void SetErrorState(const std::string& reason);
|
|
|
| InternalState state_;
|
| - VideoCaptureDevice::Client* client_;
|
| + scoped_ptr<VideoCaptureDevice::Client> client_;
|
| Name device_name_;
|
| int device_fd_; // File descriptor for the opened camera device.
|
| base::Thread v4l2_thread_; // Thread used for reading data from the device.
|
|
|