forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move Mojo structs and enums to media/capture/mojo.
There are several structs and enums whose native C++ representation lives in media/capture, but whose correpsonding Mojo types and typemaps live in either content/common or services/video_capture. This CL moves the Mojo types and typemaps to media/capture/mojo, so that Mojo types and corresponding native types live together. This CL is part of the Mojo Video Capture work. For the bigger picture, see [1] CL1.7.2 BUG=584797 TEST=video_capture_unittests, content_unittests, capture_unittests [1] https://docs.google.com/a/chromium.org/document/d/1Qw7rw1AJy0QHXjha36jZNiEuxsxWslJ_X-zpOhijvI8/edit?usp=sharing Review-Url: https://codereview.chromium.org/2405423002 Cr-Commit-Position: refs/heads/master@{#428186}
- Loading branch information
chfremer
authored and
Commit bot
committed
Oct 27, 2016
1 parent
7839ed7
commit b689c2a
Showing
31 changed files
with
356 additions
and
402 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# 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. | ||
|
||
import("//mojo/public/tools/bindings/mojom.gni") | ||
|
||
mojom("capture_types") { | ||
sources = [ | ||
"video_capture_types.mojom", | ||
] | ||
|
||
public_deps = [ | ||
"//media/mojo/interfaces", | ||
"//ui/gfx/geometry/mojo", | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
per-file *.mojom=set noparent | ||
per-file *.mojom=file://ipc/SECURITY_OWNERS | ||
per-file *_struct_traits*.*=set noparent | ||
per-file *_struct_traits*.*=file://ipc/SECURITY_OWNERS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# 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. | ||
|
||
typemaps = [ "//media/capture/mojo/video_capture_types.typemap" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
// 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. | ||
|
||
module media.mojom; | ||
|
||
import "media/mojo/interfaces/media_types.mojom"; | ||
import "ui/gfx/geometry/mojo/geometry.mojom"; | ||
|
||
enum ResolutionChangePolicy { | ||
FIXED_RESOLUTION, | ||
FIXED_ASPECT_RATIO, | ||
ANY_WITHIN_LIMIT, | ||
}; | ||
|
||
enum PowerLineFrequency { | ||
DEFAULT, | ||
HZ_50, | ||
HZ_60 | ||
}; | ||
|
||
enum VideoPixelStorage { | ||
CPU, | ||
GPUMEMORYBUFFER | ||
}; | ||
|
||
enum VideoCaptureApi { | ||
LINUX_V4L2_SINGLE_PLANE, | ||
WIN_MEDIA_FOUNDATION, | ||
WIN_DIRECT_SHOW, | ||
MACOSX_AVFOUNDATION, | ||
MACOSX_DECKLINK, | ||
ANDROID_API1, | ||
ANDROID_API2_LEGACY, | ||
ANDROID_API2_FULL, | ||
ANDROID_API2_LIMITED, | ||
ANDROID_TANGO, | ||
UNKNOWN | ||
}; | ||
|
||
enum VideoCaptureTransportType { | ||
// For MACOSX_AVFOUNDATION Api, identifies devices that are built-in or USB. | ||
MACOSX_USB_OR_BUILT_IN, | ||
OTHER_TRANSPORT | ||
}; | ||
|
||
struct VideoCaptureFormat { | ||
gfx.mojom.Size frame_size; | ||
float frame_rate; | ||
VideoPixelFormat pixel_format; | ||
VideoPixelStorage pixel_storage; | ||
}; | ||
|
||
struct VideoCaptureParams { | ||
VideoCaptureFormat requested_format; | ||
ResolutionChangePolicy resolution_change_policy; | ||
PowerLineFrequency power_line_frequency; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# 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. | ||
|
||
mojom = "//media/capture/mojo/video_capture_types.mojom" | ||
|
||
public_headers = [ "//media/capture/video_capture_types.h" ] | ||
|
||
traits_headers = [ | ||
"//media/capture/ipc/capture_param_traits_macros.h", | ||
"//media/capture/ipc/capture_param_traits.h", | ||
"//media/capture/mojo/video_capture_types_typemap_traits.h", | ||
] | ||
|
||
sources = [ | ||
"//media/capture/mojo/video_capture_types_typemap_traits.cc", | ||
] | ||
|
||
deps = [ | ||
"//media", | ||
"//media/capture/ipc", | ||
] | ||
|
||
type_mappings = [ | ||
"media.mojom.ResolutionChangePolicy=media::ResolutionChangePolicy", | ||
"media.mojom.PowerLineFrequency=media::PowerLineFrequency", | ||
"media.mojom.VideoCaptureFormat=media::VideoCaptureFormat", | ||
"media.mojom.VideoPixelStorage=media::VideoPixelStorage", | ||
"media.mojom.VideoCaptureParams=media::VideoCaptureParams", | ||
] |
Oops, something went wrong.