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

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

Issue 235353002: Extract VideoCaptureDeviceFactory out of VideoCaptureDevice and use for File and FakeVCD. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: perkj@s comments Created 6 years, 8 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
Index: media/video/capture/file_video_capture_device.h
diff --git a/media/video/capture/file_video_capture_device.h b/media/video/capture/file_video_capture_device.h
index e5b65cecfef1eac9f0472d054e2b264e3002ac7b..e2e066b3b25558ae82e40ea767342879e71e76a6 100644
--- a/media/video/capture/file_video_capture_device.h
+++ b/media/video/capture/file_video_capture_device.h
@@ -25,13 +25,14 @@ namespace media {
// Example videos can be found in http://media.xiph.org/video/derf.
class MEDIA_EXPORT FileVideoCaptureDevice : public VideoCaptureDevice {
public:
- // VideoCaptureDevice implementation, static methods. Create() returns a
- // pointer to the object, fully owned by the caller.
- // TODO(mcasas): Create() should return a scoped_ptr<> http://crbug.com/321613
- static VideoCaptureDevice* Create(const Name& device_name);
- static void GetDeviceNames(Names* device_names);
- static void GetDeviceSupportedFormats(const Name& device,
- VideoCaptureFormats* supported_formats);
+ static int64 ParseFileAndExtractVideoFormat(
+ base::File* file,
+ media::VideoCaptureFormat* video_format);
+ static base::File OpenFileForRead(const base::FilePath& file_path);
+
+ // Constructor of the class, with a fully qualified file path as input, which
+ // represents the Y4M video file to stream repeatedly.
+ explicit FileVideoCaptureDevice(const base::FilePath& file_path);
// VideoCaptureDevice implementation, class methods.
virtual ~FileVideoCaptureDevice();
@@ -41,9 +42,6 @@ class MEDIA_EXPORT FileVideoCaptureDevice : public VideoCaptureDevice {
virtual void StopAndDeAllocate() OVERRIDE;
private:
- // Constructor of the class, with a fully qualified file path as input, which
- // represents the Y4M video file to stream repeatedly.
- explicit FileVideoCaptureDevice(const base::FilePath& file_path);
// Returns size in bytes of an I420 frame, not including possible paddings,
// defined by |capture_format_|.
int CalculateFrameSize();

Powered by Google App Engine
This is Rietveld 408576698