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

Unified Diff: media/capture/video/file_video_capture_device_factory.cc

Issue 1291933002: File video capture device supports MJPEG format (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix windows compile error Created 5 years, 4 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/capture/video/file_video_capture_device.cc ('k') | media/filters/jpeg_parser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/capture/video/file_video_capture_device_factory.cc
diff --git a/media/capture/video/file_video_capture_device_factory.cc b/media/capture/video/file_video_capture_device_factory.cc
index 1d7ae1264300dae28b89711e4b52f6ffcc25f3cd..ea36c4d70bcbb5b0f21d4dae00933790284c5ebb 100644
--- a/media/capture/video/file_video_capture_device_factory.cc
+++ b/media/capture/video/file_video_capture_device_factory.cc
@@ -63,13 +63,13 @@ void FileVideoCaptureDeviceFactory::GetDeviceSupportedFormats(
const VideoCaptureDevice::Name& device,
VideoCaptureFormats* supported_formats) {
DCHECK(thread_checker_.CalledOnValidThread());
- base::File file =
- FileVideoCaptureDevice::OpenFileForRead(GetFilePathFromCommandLine());
- if (!file.IsValid())
- return;
+
VideoCaptureFormat capture_format;
- FileVideoCaptureDevice::ParseFileAndExtractVideoFormat(&file,
- &capture_format);
+ if (!FileVideoCaptureDevice::GetVideoCaptureFormat(
+ GetFilePathFromCommandLine(), &capture_format)) {
+ return;
+ }
+
supported_formats->push_back(capture_format);
}
« no previous file with comments | « media/capture/video/file_video_capture_device.cc ('k') | media/filters/jpeg_parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698