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

Unified Diff: services/video_capture/device_factory_media_to_mojo_adapter.cc

Issue 2813343002: [Mojo Video Capture] Switch to using Mojo structs in media/capture/mojo (Closed)
Patch Set: Removed extraneous AtLeast Created 3 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: services/video_capture/device_factory_media_to_mojo_adapter.cc
diff --git a/services/video_capture/device_factory_media_to_mojo_adapter.cc b/services/video_capture/device_factory_media_to_mojo_adapter.cc
index 6e6b92d332c98f09877d7e1dc00654549f54eb96..07f6db53a083b031d6328c789efc2a6160952d78 100644
--- a/services/video_capture/device_factory_media_to_mojo_adapter.cc
+++ b/services/video_capture/device_factory_media_to_mojo_adapter.cc
@@ -11,9 +11,9 @@
#include "base/stl_util.h"
#include "base/strings/stringprintf.h"
#include "media/capture/video/fake_video_capture_device.h"
+#include "media/capture/video/video_capture_device_info.h"
#include "mojo/public/cpp/bindings/strong_binding.h"
#include "services/video_capture/device_media_to_mojo_adapter.h"
-#include "services/video_capture/public/cpp/capture_settings.h"
namespace video_capture {
@@ -39,37 +39,9 @@ DeviceFactoryMediaToMojoAdapter::DeviceFactoryMediaToMojoAdapter(
DeviceFactoryMediaToMojoAdapter::~DeviceFactoryMediaToMojoAdapter() = default;
-void DeviceFactoryMediaToMojoAdapter::EnumerateDeviceDescriptors(
- const EnumerateDeviceDescriptorsCallback& callback) {
- media::VideoCaptureDeviceDescriptors descriptors;
- device_factory_->GetDeviceDescriptors(&descriptors);
- callback.Run(std::move(descriptors));
-}
-
-void DeviceFactoryMediaToMojoAdapter::GetSupportedFormats(
- const std::string& device_id,
- const GetSupportedFormatsCallback& callback) {
- media::VideoCaptureDeviceDescriptor descriptor;
- media::VideoCaptureFormats media_formats;
- if (LookupDescriptorFromId(device_id, &descriptor))
- device_factory_->GetSupportedFormats(descriptor, &media_formats);
- std::vector<I420CaptureFormat> result;
- for (const auto& media_format : media_formats) {
- // The Video Capture Service requires devices to deliver frames either in
- // I420 or MJPEG formats.
- // TODO(chfremer): Add support for Y16 format. See crbug.com/624436.
- if (media_format.pixel_format != media::PIXEL_FORMAT_I420 &&
- media_format.pixel_format != media::PIXEL_FORMAT_MJPEG) {
- continue;
- }
- I420CaptureFormat format;
- format.frame_size = media_format.frame_size;
- format.frame_rate = media_format.frame_rate;
- if (base::ContainsValue(result, format))
- continue; // Result already contains this format
- result.push_back(format);
- }
- callback.Run(std::move(result));
+void DeviceFactoryMediaToMojoAdapter::GetDeviceInfos(
+ const GetDeviceInfosCallback& callback) {
+ NOTIMPLEMENTED();
}
void DeviceFactoryMediaToMojoAdapter::CreateDevice(
« no previous file with comments | « services/video_capture/device_factory_media_to_mojo_adapter.h ('k') | services/video_capture/device_media_to_mojo_adapter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698