1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
   33
   34
   35
   36
   37
   38
   39
   40
   41
   42
   43
   44
   45
   46
   47
   48
   49
   50
   51
   52
   53
   54
   55
   56
   57
   58
   59
   60
   61
   62
   63
   64
   65
   66
   67
   68
   69
   70
   71
   72
   73
   74
   75
   76
   77
   78
   79
   80
   81
   82
   83
   84
   85
   86
   87
   88
   89
   90
   91
   92
   93
   94
   95
   96
   97
   98
   99
  100
  101
  102
  103
  104
  105
  106
  107
  108
  109
  110
  111
  112
  113
  114
  115
  116
  117
  118
  119
  120
  121
  122
  123
  124
  125
  126
  127
  128
  129
  130
  131
  132
  133
  134
  135
  136
  137
  138
  139
  140
  141
  142
  143
  144
  145
  146
  147
  148
  149
  150
  151
  152
  153
  154
  155
  156
  157
  158
  159
  160
  161
  162
  163
  164

media / capture / mojom / BUILD.gn [blame]

# Copyright 2016 The Chromium Authors
# 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("video_capture") {
  generate_java = true
  sources = [ "video_capture.mojom" ]

  public_deps = [
    ":video_capture_buffer",
    ":video_capture_types",
    "//mojo/public/mojom/base",
    "//ui/gfx/geometry/mojom",
  ]

  export_class_attribute_blink = "BLINK_PLATFORM_EXPORT"
  export_define_blink = "BLINK_PLATFORM_IMPLEMENTATION=1"
  export_header_blink = "third_party/blink/public/platform/web_common.h"
}

mojom("video_capture_buffer") {
  generate_java = true
  sources = [ "video_capture_buffer.mojom" ]

  public_deps = [
    ":video_capture_types",
    "//gpu/ipc/common:interfaces",
    "//media//mojo/mojom:mojom",
    "//mojo/public/mojom/base",
    "//services/viz/public/mojom:shared_image_format",
    "//ui/gfx/geometry/mojom",
    "//ui/gfx/mojom",
  ]

  export_class_attribute_blink = "BLINK_PLATFORM_EXPORT"
  export_define_blink = "BLINK_PLATFORM_IMPLEMENTATION=1"
  export_header_blink = "third_party/blink/public/platform/web_common.h"
}

mojom("video_capture_types") {
  generate_java = true
  sources = [ "video_capture_types.mojom" ]

  public_deps = [
    "//mojo/public/mojom/base",
    "//ui/gfx/geometry/mojom",
  ]

  export_class_attribute_blink = "BLINK_PLATFORM_EXPORT"
  export_define_blink = "BLINK_PLATFORM_IMPLEMENTATION=1"
  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.VideoCaptureControlSupport"
        cpp = "::media::VideoCaptureControlSupport"
      },
      {
        mojom = "media.mojom.VideoCaptureError"
        cpp = "::media::VideoCaptureError"
      },
      {
        mojom = "media.mojom.VideoCaptureFeedback"
        cpp = "::media::VideoCaptureFeedback"
      },
      {
        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 ]
}

mojom("video_effects_manager") {
  sources = [ "video_effects_manager.mojom" ]

  public_deps = [
    "//mojo/public/mojom/base",
    "//ui/gfx/geometry/mojom",
  ]
}

component("video_capture_mojom_support") {
  sources = [
    "video_capture_types_mojom_traits.cc",
    "video_capture_types_mojom_traits.h",
  ]
  public_deps = [
    ":video_capture_shared_cpp_sources",
    "//media/capture:capture_base",
  ]
  deps = [
    "//media/base:video_facing",
    "//ui/gfx/geometry/mojom",
  ]
  defines = [ "IS_MEDIA_CAPTURE_MOJOM_TRAITS_IMPL" ]
}

mojom("image_capture") {
  sources = [ "image_capture.mojom" ]

  # ImageCapture Mojom interfaces are exposed publicly to layout tests which use
  # prepackaged redistributable JS bindings. It is therefore not desirable to
  # scramble these messages.
  scramble_message_ids = false
  webui_module_path = "/media/capture/mojom"

  # Since these are exposed to layout tests, they need legacy bindings as
  # well.
  generate_legacy_js_bindings = true
}

source_set("image_capture_types") {
  sources = [
    "image_capture_types.cc",
    "image_capture_types.h",
  ]

  deps = [ ":image_capture" ]
}