| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef MEDIA_VIDEO_CAPTURE_FILE_VIDEO_CAPTURE_DEVICE_H_ | 5 #ifndef MEDIA_VIDEO_CAPTURE_FILE_VIDEO_CAPTURE_DEVICE_H_ |
| 6 #define MEDIA_VIDEO_CAPTURE_FILE_VIDEO_CAPTURE_DEVICE_H_ | 6 #define MEDIA_VIDEO_CAPTURE_FILE_VIDEO_CAPTURE_DEVICE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 // implementation file. | 24 // implementation file. |
| 25 // Example videos can be found in http://media.xiph.org/video/derf. | 25 // Example videos can be found in http://media.xiph.org/video/derf. |
| 26 class MEDIA_EXPORT FileVideoCaptureDevice : public VideoCaptureDevice { | 26 class MEDIA_EXPORT FileVideoCaptureDevice : public VideoCaptureDevice { |
| 27 public: | 27 public: |
| 28 // VideoCaptureDevice implementation, static methods. Create() returns a | 28 // VideoCaptureDevice implementation, static methods. Create() returns a |
| 29 // pointer to the object, fully owned by the caller. | 29 // pointer to the object, fully owned by the caller. |
| 30 // TODO(mcasas): Create() should return a scoped_ptr<> http://crbug.com/321613 | 30 // TODO(mcasas): Create() should return a scoped_ptr<> http://crbug.com/321613 |
| 31 static VideoCaptureDevice* Create(const Name& device_name); | 31 static VideoCaptureDevice* Create(const Name& device_name); |
| 32 static void GetDeviceNames(Names* device_names); | 32 static void GetDeviceNames(Names* device_names); |
| 33 static void GetDeviceSupportedFormats(const Name& device, | 33 static void GetDeviceSupportedFormats(const Name& device, |
| 34 VideoCaptureCapabilities* formats); | 34 VideoCaptureFormats* supported_formats); |
| 35 | 35 |
| 36 // VideoCaptureDevice implementation, class methods. | 36 // VideoCaptureDevice implementation, class methods. |
| 37 virtual ~FileVideoCaptureDevice(); | 37 virtual ~FileVideoCaptureDevice(); |
| 38 virtual void AllocateAndStart( | 38 virtual void AllocateAndStart( |
| 39 const VideoCaptureParams& params, | 39 const VideoCaptureParams& params, |
| 40 scoped_ptr<VideoCaptureDevice::Client> client) OVERRIDE; | 40 scoped_ptr<VideoCaptureDevice::Client> client) OVERRIDE; |
| 41 virtual void StopAndDeAllocate() OVERRIDE; | 41 virtual void StopAndDeAllocate() OVERRIDE; |
| 42 | 42 |
| 43 private: | 43 private: |
| 44 // Constructor of the class, with a fully qualified file path as input, which | 44 // Constructor of the class, with a fully qualified file path as input, which |
| (...skipping 25 matching lines...) Expand all Loading... |
| 70 int frame_size_; | 70 int frame_size_; |
| 71 int64 current_byte_index_; | 71 int64 current_byte_index_; |
| 72 int64 first_frame_byte_index_; | 72 int64 first_frame_byte_index_; |
| 73 | 73 |
| 74 DISALLOW_COPY_AND_ASSIGN(FileVideoCaptureDevice); | 74 DISALLOW_COPY_AND_ASSIGN(FileVideoCaptureDevice); |
| 75 }; | 75 }; |
| 76 | 76 |
| 77 } // namespace media | 77 } // namespace media |
| 78 | 78 |
| 79 #endif // MEDIA_VIDEO_CAPTURE_FILE_VIDEO_CAPTURE_DEVICE_H_ | 79 #endif // MEDIA_VIDEO_CAPTURE_FILE_VIDEO_CAPTURE_DEVICE_H_ |
| OLD | NEW |