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

Unified Diff: services/video_capture/public/interfaces/video_capture_format_traits.cc

Issue 2405423002: [Video Capture Service] Move Mojo structs and enums to media/capture/mojo (Closed)
Patch Set: Revert Mojo enum VideoPixelFormat to native Created 4 years, 2 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 | « services/video_capture/public/interfaces/video_capture_format_traits.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/video_capture/public/interfaces/video_capture_format_traits.cc
diff --git a/services/video_capture/public/interfaces/video_capture_format_traits.cc b/services/video_capture/public/interfaces/video_capture_format_traits.cc
deleted file mode 100644
index f24ca5703847dc9dd3ec411b5846b8afac01e444..0000000000000000000000000000000000000000
--- a/services/video_capture/public/interfaces/video_capture_format_traits.cc
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "services/video_capture/public/interfaces/video_capture_format_traits.h"
-
-#include "ui/gfx/geometry/mojo/geometry.mojom.h"
-#include "ui/gfx/geometry/mojo/geometry_struct_traits.h"
-
-namespace mojo {
-
-// static
-bool StructTraits<video_capture::mojom::VideoCaptureFormatDataView,
- media::VideoCaptureFormat>::
- Read(video_capture::mojom::VideoCaptureFormatDataView data,
- media::VideoCaptureFormat* out) {
- if (!data.ReadFrameSize(&out->frame_size))
- return false;
- out->frame_rate = data.frame_rate();
-
- // Since there are static_asserts in place in
- // media/mojo/common/media_type_converters.cc to guarantee equality of the
- // underlying representations, we can simply static_cast to convert.
- // TODO(mcasas): Use EnumTraits for VideoPixelFormat, https://crbug.com/651897
- out->pixel_format =
- static_cast<media::VideoPixelFormat>(data.pixel_format());
- if (!data.ReadPixelStorage(&out->pixel_storage))
- return false;
- return true;
-}
-
-// static
-video_capture::mojom::VideoPixelStorage
-EnumTraits<video_capture::mojom::VideoPixelStorage, media::VideoPixelStorage>::
- ToMojom(media::VideoPixelStorage video_pixel_storage) {
- DCHECK_EQ(media::PIXEL_STORAGE_CPU, video_pixel_storage);
- return video_capture::mojom::VideoPixelStorage::CPU;
-}
-
-// static
-bool EnumTraits<video_capture::mojom::VideoPixelStorage,
- media::VideoPixelStorage>::
- FromMojom(video_capture::mojom::VideoPixelStorage input,
- media::VideoPixelStorage* out) {
- DCHECK_EQ(video_capture::mojom::VideoPixelStorage::CPU, input);
- *out = media::PIXEL_STORAGE_CPU;
- return true;
-}
-
-} // namespace mojo
« no previous file with comments | « services/video_capture/public/interfaces/video_capture_format_traits.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698