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

Unified Diff: services/video_capture/mojo_media_conversions.cc

Issue 2379253003: Video Capture Service: typemap video_capture's and media's VideoCaptureFormat (Closed)
Patch Set: more traits methods inlining 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
Index: services/video_capture/mojo_media_conversions.cc
diff --git a/services/video_capture/mojo_media_conversions.cc b/services/video_capture/mojo_media_conversions.cc
index 276baf5aac2e4621eed976b69cdd2ca4418ec96a..0cddcf1eba7efe728ee5df0dd4bd435b34ef16e0 100644
--- a/services/video_capture/mojo_media_conversions.cc
+++ b/services/video_capture/mojo_media_conversions.cc
@@ -6,37 +6,6 @@
namespace video_capture {
-media::VideoCaptureFormat ConvertFromMojoToMedia(
- mojom::VideoCaptureFormatPtr format) {
- media::VideoCaptureFormat result;
- result.pixel_format = ConvertFromMojoToMedia(format->pixel_format);
- result.pixel_storage = ConvertFromMojoToMedia(format->pixel_storage);
- result.frame_size.SetSize(format->frame_size.width(),
- format->frame_size.height());
- result.frame_rate = format->frame_rate;
- return result;
-}
-
-media::VideoPixelFormat ConvertFromMojoToMedia(
- media::mojom::VideoFormat format) {
- // 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.
- return static_cast<media::VideoPixelFormat>(format);
-}
-
-media::VideoPixelStorage ConvertFromMojoToMedia(
- mojom::VideoPixelStorage storage) {
- switch (storage) {
- case mojom::VideoPixelStorage::CPU:
- return media::PIXEL_STORAGE_CPU;
- case mojom::VideoPixelStorage::GPUMEMORYBUFFER:
- return media::PIXEL_STORAGE_GPUMEMORYBUFFER;
- }
- NOTREACHED();
- return media::PIXEL_STORAGE_CPU;
-}
-
media::ResolutionChangePolicy ConvertFromMojoToMedia(
mojom::ResolutionChangePolicy policy) {
switch (policy) {
« no previous file with comments | « services/video_capture/mojo_media_conversions.h ('k') | services/video_capture/public/interfaces/typemaps.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698