Commit bdc7dcde authored by Ken Rockot's avatar Ken Rockot Committed by Commit Bot

Convert media capture and fuchsia typemaps to GN

Bug: 1059389
Change-Id: I09e70640a74fcfd3c10f278e8a777fe73ee87305
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2304540
Commit-Queue: Ken Rockot <rockot@google.com>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Reviewed-by: default avatarDale Curtis <dalecurtis@chromium.org>
Reviewed-by: default avatarRobert Sesek <rsesek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#790613}
parent 14c696ec
...@@ -22,6 +22,60 @@ mojom("video_capture") { ...@@ -22,6 +22,60 @@ mojom("video_capture") {
export_class_attribute_blink = "BLINK_PLATFORM_EXPORT" export_class_attribute_blink = "BLINK_PLATFORM_EXPORT"
export_define_blink = "BLINK_PLATFORM_IMPLEMENTATION=1" export_define_blink = "BLINK_PLATFORM_IMPLEMENTATION=1"
export_header_blink = "third_party/blink/public/platform/web_common.h" export_header_blink = "third_party/blink/public/platform/web_common.h"
shared_video_capture_cpp_typemap = {
types = [
{
mojom = "media.mojom.ResolutionChangePolicy"
cpp = "::media::ResolutionChangePolicy"
},
{
mojom = "media.mojom.PowerLineFrequency"
cpp = "::media::PowerLineFrequency"
},
{
mojom = "media.mojom.VideoCapturePixelFormat"
cpp = "::media::VideoPixelFormat"
},
{
mojom = "media.mojom.VideoCaptureBufferType"
cpp = "::media::VideoCaptureBufferType"
},
{
mojom = "media.mojom.VideoCaptureError"
cpp = "::media::VideoCaptureError"
},
{
mojom = "media.mojom.VideoCaptureFrameDropReason"
cpp = "::media::VideoCaptureFrameDropReason"
},
{
mojom = "media.mojom.VideoCaptureFormat"
cpp = "::media::VideoCaptureFormat"
},
{
mojom = "media.mojom.VideoCaptureParams"
cpp = "::media::VideoCaptureParams"
},
{
mojom = "media.mojom.VideoCaptureDeviceDescriptor"
cpp = "::media::VideoCaptureDeviceDescriptor"
},
{
mojom = "media.mojom.VideoCaptureDeviceInfo"
cpp = "::media::VideoCaptureDeviceInfo"
},
{
mojom = "media.mojom.VideoFacingMode"
cpp = "::media::VideoFacingMode"
},
]
traits_headers = [ "video_capture_types_mojom_traits.h" ]
traits_public_deps = [ ":video_capture_mojom_support" ]
}
cpp_typemaps = [ shared_video_capture_cpp_typemap ]
blink_cpp_typemaps = [ shared_video_capture_cpp_typemap ]
} }
component("video_capture_mojom_support") { component("video_capture_mojom_support") {
......
...@@ -2,5 +2,3 @@ per-file *.mojom=set noparent ...@@ -2,5 +2,3 @@ per-file *.mojom=set noparent
per-file *.mojom=file://ipc/SECURITY_OWNERS per-file *.mojom=file://ipc/SECURITY_OWNERS
per-file *_mojom_traits*.*=set noparent per-file *_mojom_traits*.*=set noparent
per-file *_mojom_traits*.*=file://ipc/SECURITY_OWNERS per-file *_mojom_traits*.*=file://ipc/SECURITY_OWNERS
per-file *.typemap=set noparent
per-file *.typemap=file://ipc/SECURITY_OWNERS
# 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/mojom/video_capture_types.typemap" ]
# 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/mojom/video_capture_types.mojom"
public_headers = [
"//media/capture/video_capture_types.h",
"//media/capture/video/video_capture_device_descriptor.h",
"//media/capture/video/video_capture_device_info.h",
]
traits_headers = [ "//media/capture/mojom/video_capture_types_mojom_traits.h" ]
public_deps = [ "//media/capture/mojom:video_capture_mojom_support" ]
type_mappings = [
"media.mojom.ResolutionChangePolicy=::media::ResolutionChangePolicy",
"media.mojom.PowerLineFrequency=::media::PowerLineFrequency",
"media.mojom.VideoCapturePixelFormat=::media::VideoPixelFormat",
"media.mojom.VideoCaptureBufferType=::media::VideoCaptureBufferType",
"media.mojom.VideoCaptureError=::media::VideoCaptureError",
"media.mojom.VideoCaptureFrameDropReason=::media::VideoCaptureFrameDropReason",
"media.mojom.VideoCaptureFormat=::media::VideoCaptureFormat",
"media.mojom.VideoCaptureParams=::media::VideoCaptureParams",
"media.mojom.VideoCaptureDeviceDescriptor=::media::VideoCaptureDeviceDescriptor",
"media.mojom.VideoCaptureDeviceInfo=::media::VideoCaptureDeviceInfo",
"media.mojom.VideoFacingMode=::media::VideoFacingMode",
]
...@@ -6,4 +6,32 @@ import("//mojo/public/tools/bindings/mojom.gni") ...@@ -6,4 +6,32 @@ import("//mojo/public/tools/bindings/mojom.gni")
mojom("mojom") { mojom("mojom") {
sources = [ "fuchsia_media_resource_provider.mojom" ] sources = [ "fuchsia_media_resource_provider.mojom" ]
cpp_typemaps = [
{
types = [
{
mojom = "media.mojom.CdmRequest"
cpp = "::fidl::InterfaceRequest<::fuchsia::media::drm::ContentDecryptionModule>"
move_only = true
},
{
mojom = "media.mojom.AudioConsumerRequest"
cpp = "::fidl::InterfaceRequest<::fuchsia::media::AudioConsumer>"
move_only = true
},
{
mojom = "media.mojom.AudioCapturerRequest"
cpp = "::fidl::InterfaceRequest<::fuchsia::media::AudioCapturer>"
move_only = true
},
]
traits_headers = [ "fuchsia_media_resource_provider_mojom_traits.h" ]
traits_public_deps = [
"//fuchsia/mojom:traits",
"//third_party/fuchsia-sdk/sdk/fidl/fuchsia.media",
"//third_party/fuchsia-sdk/sdk/fidl/fuchsia.media.drm",
]
},
]
} }
...@@ -2,5 +2,3 @@ per-file *.mojom=set noparent ...@@ -2,5 +2,3 @@ per-file *.mojom=set noparent
per-file *.mojom=file://ipc/SECURITY_OWNERS per-file *.mojom=file://ipc/SECURITY_OWNERS
per-file *_mojom_traits*.*=set noparent per-file *_mojom_traits*.*=set noparent
per-file *_mojom_traits*.*=file://ipc/SECURITY_OWNERS per-file *_mojom_traits*.*=file://ipc/SECURITY_OWNERS
per-file *.typemap=set noparent
per-file *.typemap=file://ipc/SECURITY_OWNERS
# Copyright 2020 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/fuchsia/mojom/fuchsia_media_resource_provider.mojom"
os_whitelist = [ "fuchsia" ]
public_headers = [
"fuchsia/media/cpp/fidl.h",
"fuchsia/media/drm/cpp/fidl.h",
]
traits_headers =
[ "//media/fuchsia/mojom/fuchsia_media_resource_provider_mojom_traits.h" ]
sources =
[ "//media/fuchsia/mojom/fuchsia_media_resource_provider_mojom_traits.h" ]
public_deps = [
"//fuchsia/mojom:traits",
"//third_party/fuchsia-sdk/sdk/fidl/fuchsia.media",
"//third_party/fuchsia-sdk/sdk/fidl/fuchsia.media.drm",
]
type_mappings = [
"media.mojom.CdmRequest=::fidl::InterfaceRequest<::fuchsia::media::drm::ContentDecryptionModule>[move_only]",
"media.mojom.AudioConsumerRequest=::fidl::InterfaceRequest<::fuchsia::media::AudioConsumer>[move_only]",
"media.mojom.AudioCapturerRequest=::fidl::InterfaceRequest<::fuchsia::media::AudioCapturer>[move_only]",
]
# Copyright 2019 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/fuchsia/mojom/fuchsia_media_resource_provider.typemap" ]
...@@ -21,8 +21,6 @@ _typemap_imports = [ ...@@ -21,8 +21,6 @@ _typemap_imports = [
"//components/typemaps.gni", "//components/typemaps.gni",
"//content/browser/typemaps.gni", "//content/browser/typemaps.gni",
"//content/public/common/typemaps.gni", "//content/public/common/typemaps.gni",
"//media/capture/mojom/typemaps.gni",
"//media/fuchsia/mojom/typemaps.gni",
"//media/mojo/mojom/typemaps.gni", "//media/mojo/mojom/typemaps.gni",
"//sandbox/mac/mojom/typemaps.gni", "//sandbox/mac/mojom/typemaps.gni",
"//services/media_session/public/cpp/typemaps.gni", "//services/media_session/public/cpp/typemaps.gni",
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
# found in the LICENSE file. # found in the LICENSE file.
typemaps = [ typemaps = [
"//media/capture/mojom/video_capture_types.typemap",
"//media/mojo/mojom/audio_parameters.typemap", "//media/mojo/mojom/audio_parameters.typemap",
"//third_party/blink/common/feature_policy/feature_policy.typemap", "//third_party/blink/common/feature_policy/feature_policy.typemap",
"//third_party/blink/common/frame/frame_policy.typemap", "//third_party/blink/common/frame/frame_policy.typemap",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment