Commit a0f0c4ba authored by mcasas's avatar mcasas Committed by Commit bot

Re-Reland: Make media/capture gn and gyps produce components

The CL is ready but causes a Warning C4267 (implicit size_t to int
conversion) in some Windows Waterfall bots (not in CQ).
After some land-archaeology, it seems that capture.gyp did not
have the warning explicitly disable, I believe it was lost in some
rebase. So, re-enabling it and relanding.

Original re-reland description -----------------------------------------
Re-reland: Make media/capture gn and gyps produce components

Reland got reverted due to a WinX64 typical issue:
warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data

This CL adds explicitly some buid/config/compiler/no_size_t_to_int_warning
causing C4267 in
https://build.chromium.org/p/chromium/builders/Win%20x64/builds/1472/steps/compile/logs/stdio

Original reland description -------------------------------------------
Reland: Make media/capture gn and gyps produce components

Which got reverted due to a Mac build breakage (see
https://codereview.chromium.org/2059493002/) and
a Win one  (https://crbug.com/618854).

Original description ---------------------------------------------------
Make media/capture gn and gyps produce components
This CL separates media/capture into a component,
to allow, in a subsequent CL, linking with mojo for using
ImageCapture types.

This basically reproduces the media/cast and media/midi
structure.

Windows import/export issues made necessary to add
capture_export and associated CAPTURE_EXPORT macro,
again, replicating media/midi.

gn gen ... --check uncovered some transitive dependencies
during the "analyze" phase of the bots and I had to make
them explicit (e.g. media:gpu).

BUG=518807
-----------------------------------------------------------------------
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel,mac_blink_rel,win_blink_rel

TBR=avi@chromium.org, xhwang@chromium.org, miu@chromium.org
rationale:
reland: since the PS2/3 are trivial, just making explicit libs that are
already elsewhere in media/ build files- I wonder why it didn't fail in
the bots :( .
re-reland: I'm just adding a MSVS-warning disable that was lost in a
rebase :)

Review-Url: https://codereview.chromium.org/2068763002
Cr-Commit-Position: refs/heads/master@{#400708}
parent 8e81c750
......@@ -66,6 +66,7 @@ source_set("browser") {
"//gpu/command_buffer/client:gles2_interface",
"//ipc/mojo",
"//media",
"//media/capture",
"//media/gpu/ipc/client",
"//media/midi",
"//media/mojo/interfaces:image_capture",
......@@ -350,6 +351,7 @@ source_set("browser") {
deps += [
"//content/public/android:jni",
"//media",
"//media/capture/video/android",
"//media/mojo/interfaces",
"//mojo/android:libsystem_java",
"//ui/android",
......
......@@ -61,6 +61,7 @@ source_set("common") {
"//media",
"//media:shared_memory_support",
"//media/base/ipc",
"//media/capture",
"//media/gpu/ipc/client",
"//media/gpu/ipc/common",
"//media/midi",
......
......@@ -2009,7 +2009,7 @@
['use_udev == 1', {
'dependencies': [
'../device/udev_linux/udev.gyp:udev_linux',
'../media/media.gyp:media',
'../media/capture/capture.gyp:capture',
],
}, {
'sources!': [
......
......@@ -17,6 +17,7 @@
'../ipc/ipc.gyp:ipc',
'../ipc/mojo/ipc_mojo.gyp:ipc_mojo',
'../media/base/ipc/media_base_ipc.gyp:media_base_ipc',
'../media/capture/capture.gyp:capture',
'../media/media.gyp:media',
'../media/media.gyp:media_gpu',
'../media/media.gyp:shared_memory_support',
......
......@@ -853,6 +853,7 @@
'../gpu/gpu.gyp:gpu_ipc_service_test_support',
'../ipc/mojo/ipc_mojo.gyp:ipc_mojo',
'../media/blink/media_blink.gyp:media_blink',
'../media/capture/capture.gyp:capture',
'../media/media.gyp:media',
'../media/midi/midi.gyp:midi',
'../mojo/mojo_edk.gyp:mojo_common_test_support',
......@@ -1835,6 +1836,7 @@
'../base/base.gyp:base_javatests',
'../base/base.gyp:base_java_test_support',
'../device/battery/battery.gyp:device_battery_javatests',
'../media/capture/capture.gyp:capture_java',
'../media/media.gyp:media_java',
'../media/media.gyp:media_test_support',
'../mojo/mojo_public.gyp:mojo_public_test_interfaces',
......
......@@ -60,6 +60,7 @@ source_set("renderer") {
"//jingle:jingle_glue",
"//media",
"//media/blink",
"//media/capture",
"//media/gpu",
"//media/gpu/ipc/client",
"//media/gpu/ipc/common",
......
......@@ -74,6 +74,7 @@ static_library("test_support") {
"//ipc:test_support",
"//ipc/mojo",
"//media",
"//media/capture",
"//mojo/edk/system",
"//mojo/edk/test:test_support",
"//net:test_support",
......@@ -185,6 +186,7 @@ static_library("test_support") {
if (is_android) {
deps += [
"//media/capture/video/android:android",
"//ui/android",
"//ui/shell_dialogs",
]
......@@ -669,6 +671,7 @@ test("content_unittests") {
"//media:test_support",
"//media/audio:test_support",
"//media/base:test_support",
"//media/capture",
"//media/midi:midi",
"//mojo/edk/test:test_support",
"//mojo/public/cpp/bindings",
......
......@@ -337,8 +337,6 @@ component("media") {
deps += [
"//media/base/android",
"//media/base/android:media_jni_headers",
"//media/capture/video/android:capture_java",
"//media/capture/video/android:capture_jni_headers",
]
# Only 64 bit builds are using android-21 NDK library, check common.gypi
......@@ -362,6 +360,11 @@ component("media") {
if (is_mac) {
public_deps += [ "//media/base/mac" ]
libs += [
"CoreFoundation.framework",
"CoreGraphics.framework",
"Foundation.framework",
]
}
if (is_ios) {
......@@ -370,12 +373,6 @@ component("media") {
if (is_win) {
deps += [ "//media/base/win" ]
libs += [
"mf.lib",
"mfplat.lib",
"mfreadwrite.lib",
"mfuuid.lib",
]
}
if (proprietary_codecs) {
......@@ -462,7 +459,6 @@ component("media") {
":shared_memory_support",
"//media/audio",
"//media/base",
"//media/capture",
"//third_party/opus",
]
......@@ -597,6 +593,8 @@ test("media_unittests") {
"//media/audio:unittests",
"//media/base:test_support",
"//media/base:unittests",
# TODO(mcasas): Remove the capture sources after https://crbug.com/618718.
"//media/capture:unittests",
"//media/test:pipeline_integration_tests",
"//skia", # Direct dependency required to inherit config.
......
......@@ -401,6 +401,14 @@ source_set("test_support") {
"//testing/gmock",
"//ui/gfx:test_support",
]
if (is_android) {
deps += [
# Needed to register capture Java/Jni objects. TODO(mcasas): Remove when
# the dependency to capture is not needed, see https://crbug.com/618718.
"//media/capture",
"//media/capture/video/android",
]
}
}
source_set("unittests") {
......
......@@ -4,19 +4,32 @@
assert(is_win)
source_set("win") {
component("win") {
defines = [ "MF_INITIALIZER_IMPLEMENTATION" ]
set_sources_assignment_filter([])
sources = [
"mf_initializer.cc",
"mf_initializer.h",
"mf_initializer_export.h",
]
set_sources_assignment_filter(sources_assignment_filter)
configs += [
# TODO(jschuh): https://crbug.com/167187 fix size_t to int truncations.
"//build/config/compiler:no_size_t_to_int_warning",
"//media:media_config",
"//media:media_implementation",
]
deps = [
"//base",
"//media:shared_memory_support",
]
libs = [
"mf.lib",
"mfplat.lib",
"mfreadwrite.lib",
]
ldflags = [
"/DELAYLOAD:mf.dll",
"/DELAYLOAD:mfplat.dll",
"/DELAYLOAD:mfreadwrite.dll",
]
}
......@@ -5,13 +5,13 @@
#ifndef MEDIA_BASE_WIN_MF_INITIALIZER_H_
#define MEDIA_BASE_WIN_MF_INITIALIZER_H_
#include "media/base/media_export.h"
#include "media/base/win/mf_initializer_export.h"
namespace media {
// Makes sure MFStartup() is called exactly once, and that this call is paired
// by a call to MFShutdown().
MEDIA_EXPORT void InitializeMediaFoundation();
MF_INITIALIZER_EXPORT void InitializeMediaFoundation();
} // namespace media
......
// 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.
#ifndef MEDIA_BASE_WIN_MF_INITIALIZER_EXPORT_H_
#define MEDIA_BASE_WIN_MF_INITIALIZER_EXPORT_H_
#if defined(COMPONENT_BUILD)
#if defined(WIN32)
#if defined(MF_INITIALIZER_IMPLEMENTATION)
#define MF_INITIALIZER_EXPORT __declspec(dllexport)
#else
#define MF_INITIALIZER_EXPORT __declspec(dllimport)
#endif // defined(MF_INITIALIZER_IMPLEMENTATION)
#else // defined(WIN32)
#if defined(MF_INITIALIZER_IMPLEMENTATION)
#define MF_INITIALIZER_EXPORT __attribute__((visibility("default")))
#else
#define MF_INITIALIZER_EXPORT
#endif
#endif
#else // defined(COMPONENT_BUILD)
#define MF_INITIALIZER_EXPORT
#endif
#endif // MEDIA_BASE_WIN_MF_INITIALIZER_EXPORT_H_
......@@ -6,8 +6,10 @@ import("//build/config/features.gni")
import("//media/media_options.gni")
import("//testing/test.gni")
source_set("capture") {
component("capture") {
defines = [ "CAPTURE_IMPLEMENTATION" ]
sources = [
"capture_export.h",
"content/animated_content_sampler.cc",
"content/animated_content_sampler.h",
"content/capture_resolution_chooser.cc",
......@@ -25,12 +27,6 @@ source_set("capture") {
"device_monitor_mac.mm",
"system_message_window_win.cc",
"system_message_window_win.h",
"video/android/photo_capabilities.cc",
"video/android/photo_capabilities.h",
"video/android/video_capture_device_android.cc",
"video/android/video_capture_device_android.h",
"video/android/video_capture_device_factory_android.cc",
"video/android/video_capture_device_factory_android.h",
"video/fake_video_capture_device.cc",
"video/fake_video_capture_device.h",
"video/fake_video_capture_device_factory.cc",
......@@ -83,20 +79,26 @@ source_set("capture") {
public_deps = []
deps = [
"//base",
"//media/base",
"//base:i18n",
"//media",
"//skia",
"//ui/display",
"//ui/gfx",
]
configs += [
# TODO(mcasas): media/base should be a component and not a source_set, but
# it depends on parts of media/filters, media/ffmpeg etc. Until then, we
# pretend to be inside media.dll and duplicate the few symbols needed, see
# https://crbug.com/590017.
"//media:media_implementation",
# TODO(mcasas): Fix size_t to int truncation warning-treated-as-errors.
"//build/config/compiler:no_size_t_to_int_warning",
]
if (is_android) {
public_deps += [ "video/android" ]
public_deps += [
"video/android",
"video/android:capture_java",
]
deps += [ "video/android:capture_jni_headers" ]
}
......@@ -105,6 +107,7 @@ source_set("capture") {
libs = [
"CoreFoundation.framework",
"CoreGraphics.framework",
"CoreVideo.framework",
"Foundation.framework",
]
}
......@@ -118,22 +121,28 @@ source_set("capture") {
}
if (is_win) {
public_deps += [ "//media/base/win" ]
deps += [
"//media/base", # For media_switches.
"//media/base/win",
]
libs = [
"mf.lib",
"mfplat.lib",
"mfreadwrite.lib",
"mfuuid.lib",
]
ldflags = [
"/DELAYLOAD:mf.dll",
"/DELAYLOAD:mfplat.dll",
"/DELAYLOAD:mfreadwrite.dll",
]
# TODO(jschuh): https://crbug.com/167187 fix size_t to int truncations.
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
}
}
# TODO(mcasas): Make this a test target, https://crbug.com/618718.
source_set("unittests") {
testonly = true
......@@ -150,11 +159,13 @@ source_set("unittests") {
]
deps = [
"//media/base:unittests",
":capture",
"//testing/gmock",
"//testing/gtest",
]
# TODO(mcasas): Fix size_t to int truncation warning-treated-as-errors.
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
if (is_win) {
# TODO(jschuh): https://crbug.com/167187 fix size_t to int truncations.
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
}
}
# 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.
{
'variables': {
'chromium_code': 1,
'capture_sources': [
'capture_export.h',
'content/animated_content_sampler.cc',
'content/animated_content_sampler.h',
'content/capture_resolution_chooser.cc',
'content/capture_resolution_chooser.h',
'content/feedback_signal_accumulator.h',
'content/screen_capture_device_core.cc',
'content/screen_capture_device_core.h',
'content/smooth_event_sampler.cc',
'content/smooth_event_sampler.h',
'content/thread_safe_capture_oracle.cc',
'content/thread_safe_capture_oracle.h',
'content/video_capture_oracle.cc',
'content/video_capture_oracle.h',
'device_monitor_mac.h',
'device_monitor_mac.mm',
'system_message_window_win.cc',
'system_message_window_win.h',
'video/android/video_capture_device_android.cc',
'video/android/video_capture_device_android.h',
'video/android/video_capture_device_factory_android.cc',
'video/android/video_capture_device_factory_android.h',
'video/fake_video_capture_device.cc',
'video/fake_video_capture_device.h',
'video/fake_video_capture_device_factory.cc',
'video/fake_video_capture_device_factory.h',
'video/file_video_capture_device.cc',
'video/file_video_capture_device.h',
'video/file_video_capture_device_factory.cc',
'video/file_video_capture_device_factory.h',
'video/linux/v4l2_capture_delegate.cc',
'video/linux/v4l2_capture_delegate.h',
'video/linux/video_capture_device_chromeos.cc',
'video/linux/video_capture_device_chromeos.h',
'video/linux/video_capture_device_factory_linux.cc',
'video/linux/video_capture_device_factory_linux.h',
'video/linux/video_capture_device_linux.cc',
'video/linux/video_capture_device_linux.h',
'video/mac/video_capture_device_avfoundation_mac.h',
'video/mac/video_capture_device_avfoundation_mac.mm',
'video/mac/video_capture_device_decklink_mac.h',
'video/mac/video_capture_device_decklink_mac.mm',
'video/mac/video_capture_device_factory_mac.h',
'video/mac/video_capture_device_factory_mac.mm',
'video/mac/video_capture_device_mac.h',
'video/mac/video_capture_device_mac.mm',
'video/scoped_result_callback.h',
'video/video_capture_device.cc',
'video/video_capture_device.h',
'video/video_capture_device_factory.cc',
'video/video_capture_device_factory.h',
'video/video_capture_device_info.cc',
'video/video_capture_device_info.h',
'video/win/capability_list_win.cc',
'video/win/capability_list_win.h',
'video/win/filter_base_win.cc',
'video/win/filter_base_win.h',
'video/win/pin_base_win.cc',
'video/win/pin_base_win.h',
'video/win/sink_filter_observer_win.h',
'video/win/sink_filter_win.cc',
'video/win/sink_filter_win.h',
'video/win/sink_input_pin_win.cc',
'video/win/sink_input_pin_win.h',
'video/win/video_capture_device_factory_win.cc',
'video/win/video_capture_device_factory_win.h',
'video/win/video_capture_device_mf_win.cc',
'video/win/video_capture_device_mf_win.h',
'video/win/video_capture_device_win.cc',
'video/win/video_capture_device_win.h'
],
'capture_unittests_sources': [
'content/animated_content_sampler_unittest.cc',
'content/capture_resolution_chooser_unittest.cc',
'content/feedback_signal_accumulator_unittest.cc',
'content/smooth_event_sampler_unittest.cc',
'content/video_capture_oracle_unittest.cc',
'system_message_window_win_unittest.cc',
'video/fake_video_capture_device_unittest.cc',
'video/mac/video_capture_device_factory_mac_unittest.mm',
'video/video_capture_device_unittest.cc'
],
# The following files lack appropriate platform suffixes.
'conditions': [
['OS=="linux" and use_udev==1', {
'capture_sources': [
'device_monitor_udev.cc',
'device_monitor_udev.h',
],
}],
],
},
'targets': [
{
# GN version: //media/capture
'target_name': 'capture',
'type': '<(component)',
'hard_dependency': 1,
'dependencies': [
'<(DEPTH)/base/base.gyp:base',
'<(DEPTH)/base/base.gyp:base_i18n',
'<(DEPTH)/media/media.gyp:media',
'<(DEPTH)/media/media.gyp:shared_memory_support', # For audio support.
'<(DEPTH)/skia/skia.gyp:skia',
'<(DEPTH)/ui/gfx/gfx.gyp:gfx',
'<(DEPTH)/ui/gfx/gfx.gyp:gfx_geometry',
],
'defines': [
'CAPTURE_IMPLEMENTATION',
],
'include_dirs': [
'<(DEPTH)/',
],
'sources': [
'<@(capture_sources)'
],
'conditions': [
['OS=="android"', {
'dependencies': [
'capture_java',
],
}],
['OS=="mac"', {
'dependencies': [
'<(DEPTH)/third_party/decklink/decklink.gyp:decklink',
],
}],
['chromeos==1', {
'dependencies': [
'<(DEPTH)/ui/display/display.gyp:display',
],
}],
['OS=="linux" and use_udev==1', {
'dependencies': [
'<(DEPTH)/device/udev_linux/udev.gyp:udev_linux',
],
}],
['OS=="win"', {
'dependencies': [
'<(DEPTH)/media/media.gyp:mf_initializer',
],
# TODO(jschuh): http://crbug.com/167187 fix size_t to int truncations.
'msvs_disabled_warnings': [ 4267, ],
}],
],
},
{
# GN version: //media/capture:unittests source_set
'target_name': 'unittests',
'type': 'none',
'dependencies': [
'capture',
],
'direct_dependent_settings': {
'sources': [
'<@(capture_unittests_sources)'
],
},
},
],
'conditions': [
['OS=="android"', {
'targets': [
{
'target_name': 'capture_java',
'type': 'none',
'dependencies': [
'/base/base.gyp:base',
'media_android_captureapitype',
'media_android_imageformat',
'video_capture_android_jni_headers',
],
'export_dependent_settings': [
'../base/base.gyp:base',
],
'variables': {
'java_in_dir': 'video/android/java',
},
'includes': ['../../build/java.gypi'],
},
{
'target_name': 'media_android_captureapitype',
'type': 'none',
'variables': {
'source_file': 'video/video_capture_device.h',
},
'includes': [ '../../build/android/java_cpp_enum.gypi' ],
},
{
'target_name': 'media_android_imageformat',
'type': 'none',
'variables': {
'source_file': 'video/android/video_capture_device_android.h',
},
'includes': [ '../../build/android/java_cpp_enum.gypi' ],
},
{
'target_name': 'video_capture_android_jni_headers',
'type': 'none',
'sources': [
'video/android/java/src/org/chromium/media/VideoCapture.java',
'video/android/java/src/org/chromium/media/VideoCaptureFactory.java',
],
'variables': {
'jni_gen_package': 'media',
},
'includes': ['../../build/jni_generator.gypi'],
},
],
}],
],
}
# 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.
{
'defines': [
'MEDIA_IMPLEMENTATION',
],
'variables': {
# GN version: //media/capture:capture
'capture_sources': [
'capture/content/animated_content_sampler.cc',
'capture/content/animated_content_sampler.h',
'capture/content/capture_resolution_chooser.cc',
'capture/content/capture_resolution_chooser.h',
'capture/content/feedback_signal_accumulator.h',
'capture/content/screen_capture_device_core.cc',
'capture/content/screen_capture_device_core.h',
'capture/content/smooth_event_sampler.cc',
'capture/content/smooth_event_sampler.h',
'capture/content/thread_safe_capture_oracle.cc',
'capture/content/thread_safe_capture_oracle.h',
'capture/content/video_capture_oracle.cc',
'capture/content/video_capture_oracle.h',
'capture/device_monitor_mac.h',
'capture/device_monitor_mac.mm',
'capture/system_message_window_win.cc',
'capture/system_message_window_win.h',
'capture/video/android/video_capture_device_android.cc',
'capture/video/android/video_capture_device_android.h',
'capture/video/android/video_capture_device_factory_android.cc',
'capture/video/android/video_capture_device_factory_android.h',
'capture/video/fake_video_capture_device.cc',
'capture/video/fake_video_capture_device.h',
'capture/video/fake_video_capture_device_factory.cc',
'capture/video/fake_video_capture_device_factory.h',
'capture/video/file_video_capture_device.cc',
'capture/video/file_video_capture_device.h',
'capture/video/file_video_capture_device_factory.cc',
'capture/video/file_video_capture_device_factory.h',
'capture/video/linux/v4l2_capture_delegate.cc',
'capture/video/linux/v4l2_capture_delegate.h',
'capture/video/linux/video_capture_device_chromeos.cc',
'capture/video/linux/video_capture_device_chromeos.h',
'capture/video/linux/video_capture_device_factory_linux.cc',
'capture/video/linux/video_capture_device_factory_linux.h',
'capture/video/linux/video_capture_device_linux.cc',
'capture/video/linux/video_capture_device_linux.h',
'capture/video/mac/video_capture_device_avfoundation_mac.h',
'capture/video/mac/video_capture_device_avfoundation_mac.mm',
'capture/video/mac/video_capture_device_decklink_mac.h',
'capture/video/mac/video_capture_device_decklink_mac.mm',
'capture/video/mac/video_capture_device_factory_mac.h',
'capture/video/mac/video_capture_device_factory_mac.mm',
'capture/video/mac/video_capture_device_mac.h',
'capture/video/mac/video_capture_device_mac.mm',
'capture/video/scoped_result_callback.h',
'capture/video/video_capture_device.cc',
'capture/video/video_capture_device.h',
'capture/video/video_capture_device_factory.cc',
'capture/video/video_capture_device_factory.h',
'capture/video/video_capture_device_info.cc',
'capture/video/video_capture_device_info.h',
'capture/video/win/capability_list_win.cc',
'capture/video/win/capability_list_win.h',
'capture/video/win/filter_base_win.cc',
'capture/video/win/filter_base_win.h',
'capture/video/win/pin_base_win.cc',
'capture/video/win/pin_base_win.h',
'capture/video/win/sink_filter_observer_win.h',
'capture/video/win/sink_filter_win.cc',
'capture/video/win/sink_filter_win.h',
'capture/video/win/sink_input_pin_win.cc',
'capture/video/win/sink_input_pin_win.h',
'capture/video/win/video_capture_device_factory_win.cc',
'capture/video/win/video_capture_device_factory_win.h',
'capture/video/win/video_capture_device_mf_win.cc',
'capture/video/win/video_capture_device_mf_win.h',
'capture/video/win/video_capture_device_win.cc',
'capture/video/win/video_capture_device_win.h'
],
# GN version: //media/capture:unittests
'capture_unittests_sources': [
'capture/content/animated_content_sampler_unittest.cc',
'capture/content/capture_resolution_chooser_unittest.cc',
'capture/content/feedback_signal_accumulator_unittest.cc',
'capture/content/smooth_event_sampler_unittest.cc',
'capture/content/video_capture_oracle_unittest.cc',
'capture/system_message_window_win_unittest.cc',
'capture/video/fake_video_capture_device_unittest.cc',
'capture/video/mac/video_capture_device_factory_mac_unittest.mm',
'capture/video/video_capture_device_unittest.cc'
],
# The following files lack appropriate platform suffixes.
'conditions': [
['OS=="linux" and use_udev==1', {
'capture_sources': [
'capture/device_monitor_udev.cc',
'capture/device_monitor_udev.h',
],
}],
],
},
}
// 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.
#ifndef MEDIA_CAPTURE_CAPTURE_EXPORT_H_
#define MEDIA_CAPTURE_CAPTURE_EXPORT_H_
#if defined(COMPONENT_BUILD)
#if defined(WIN32)
#if defined(CAPTURE_IMPLEMENTATION)
#define CAPTURE_EXPORT __declspec(dllexport)
#else
#define CAPTURE_EXPORT __declspec(dllimport)
#endif // defined(CAPTURE_IMPLEMENTATION)
#else // defined(WIN32)
#if defined(CAPTURE_IMPLEMENTATION)
#define CAPTURE_EXPORT __attribute__((visibility("default")))
#else
#define CAPTURE_EXPORT
#endif
#endif
#else // defined(COMPONENT_BUILD)
#define CAPTURE_EXPORT
#endif
#endif // MEDIA_CAPTURE_CAPTURE_EXPORT_H_
......@@ -8,7 +8,7 @@
#include <deque>
#include "base/time/time.h"
#include "media/base/media_export.h"
#include "media/capture/capture_export.h"
#include "ui/gfx/geometry/rect.h"
namespace media {
......@@ -22,7 +22,7 @@ namespace media {
// In addition, AnimatedContentSampler will provide rewritten frame timestamps,
// for downstream consumers, that are "truer" to the source content than to the
// local presentation hardware.
class MEDIA_EXPORT AnimatedContentSampler {
class CAPTURE_EXPORT AnimatedContentSampler {
public:
explicit AnimatedContentSampler(base::TimeDelta min_capture_period);
~AnimatedContentSampler();
......
......@@ -7,8 +7,8 @@
#include <vector>
#include "media/base/media_export.h"
#include "media/base/video_capture_types.h"
#include "media/capture/capture_export.h"
#include "ui/gfx/geometry/size.h"
namespace media {
......@@ -31,7 +31,7 @@ namespace media {
// possibile snapped frame sizes are computed relative to the resolution of the
// source content: They are the same or smaller in size, and are of the same
// aspect ratio.
class MEDIA_EXPORT CaptureResolutionChooser {
class CAPTURE_EXPORT CaptureResolutionChooser {
public:
// media::ResolutionChangePolicy determines whether the variable frame
// resolutions being computed must adhere to a fixed aspect ratio or not, or
......
......@@ -6,7 +6,7 @@
#define MEDIA_CAPTURE_CONTENT_FEEDBACK_SIGNAL_ACCUMULATOR_H_
#include "base/time/time.h"
#include "media/base/media_export.h"
#include "media/capture/capture_export.h"
namespace media {
......
......@@ -11,7 +11,7 @@
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "base/threading/thread_checker.h"
#include "media/base/media_export.h"
#include "media/capture/capture_export.h"
#include "media/capture/content/thread_safe_capture_oracle.h"
#include "media/capture/video/video_capture_device.h"
......@@ -26,7 +26,7 @@ struct VideoCaptureParams;
class ThreadSafeCaptureOracle;
// Keeps track of the video capture source frames and executes copying.
class MEDIA_EXPORT VideoCaptureMachine {
class CAPTURE_EXPORT VideoCaptureMachine {
public:
VideoCaptureMachine();
virtual ~VideoCaptureMachine();
......@@ -72,7 +72,7 @@ class MEDIA_EXPORT VideoCaptureMachine {
// (see notes at top of this file). It times the start of successive captures
// and facilitates the processing of each through the stages of the
// pipeline.
class MEDIA_EXPORT ScreenCaptureDeviceCore
class CAPTURE_EXPORT ScreenCaptureDeviceCore
: public base::SupportsWeakPtr<ScreenCaptureDeviceCore> {
public:
ScreenCaptureDeviceCore(std::unique_ptr<VideoCaptureMachine> capture_machine);
......
......@@ -7,12 +7,12 @@
#include "base/macros.h"
#include "base/time/time.h"
#include "media/base/media_export.h"
#include "media/capture/capture_export.h"
namespace media {
// Filters a sequence of events to achieve a target frequency.
class MEDIA_EXPORT SmoothEventSampler {
class CAPTURE_EXPORT SmoothEventSampler {
public:
explicit SmoothEventSampler(base::TimeDelta min_capture_period);
......
......@@ -85,8 +85,8 @@ bool ThreadSafeCaptureOracle::ObserveEventAndDecideCapture(
// TODO(miu): Clients should request exact padding, instead of this
// memory-wasting hack to make frames that are compatible with all HW
// encoders. http://crbug.com/555911
coded_size.SetSize(base::bits::Align(visible_size.width(), 16),
base::bits::Align(visible_size.height(), 16));
coded_size.SetSize(base::bits::Align(visible_size.width(), 16u),
base::bits::Align(visible_size.height(), 16u));
if (event == VideoCaptureOracle::kPassiveRefreshRequest) {
output_buffer = client_->ResurrectLastOutputBuffer(
......
......@@ -9,8 +9,8 @@
#include <string>
#include "base/memory/ref_counted.h"
#include "media/base/media_export.h"
#include "media/base/video_frame.h"
#include "media/capture/capture_export.h"
#include "media/capture/content/video_capture_oracle.h"
#include "media/capture/video/video_capture_device.h"
......@@ -27,7 +27,7 @@ class VideoFrame;
// the VideoCaptureOracle, which decides which frames to capture, and a
// VideoCaptureDevice::Client, which allocates and receives the captured
// frames, in a lock to synchronize state between the two.
class MEDIA_EXPORT ThreadSafeCaptureOracle
class CAPTURE_EXPORT ThreadSafeCaptureOracle
: public base::RefCountedThreadSafe<ThreadSafeCaptureOracle> {
public:
ThreadSafeCaptureOracle(std::unique_ptr<VideoCaptureDevice::Client> client,
......
......@@ -7,7 +7,7 @@
#include "base/callback_forward.h"
#include "base/time/time.h"
#include "media/base/media_export.h"
#include "media/capture/capture_export.h"
#include "media/capture/content/animated_content_sampler.h"
#include "media/capture/content/capture_resolution_chooser.h"
#include "media/capture/content/feedback_signal_accumulator.h"
......@@ -20,7 +20,7 @@ namespace media {
// from a video capture device. It is informed of every update by the device;
// this empowers it to look into the future and decide if a particular frame
// ought to be captured in order to achieve its target frame rate.
class MEDIA_EXPORT VideoCaptureOracle {
class CAPTURE_EXPORT VideoCaptureOracle {
public:
enum Event {
kCompositorUpdate,
......
......@@ -10,7 +10,7 @@
#include "base/macros.h"
#include "base/system_monitor/system_monitor.h"
#include "base/threading/thread_checker.h"
#include "media/base/media_export.h"
#include "media/capture/capture_export.h"
namespace {
class DeviceMonitorMacImpl;
......@@ -21,7 +21,7 @@ namespace media {
// Class to track audio/video devices removal or addition via callback to
// base::SystemMonitor ProcessDevicesChanged(). A single object of this class
// is created from the browser main process and lives as long as this one.
class MEDIA_EXPORT DeviceMonitorMac {
class CAPTURE_EXPORT DeviceMonitorMac {
public:
DeviceMonitorMac();
~DeviceMonitorMac();
......
......@@ -14,7 +14,7 @@
#include "base/memory/ref_counted.h"
#include "base/message_loop/message_loop.h"
#include "base/single_thread_task_runner.h"
#include "media/base/media_export.h"
#include "media/capture/capture_export.h"
extern "C" {
struct udev_device;
......@@ -26,7 +26,7 @@ class UdevLinux;
namespace media {
class MEDIA_EXPORT DeviceMonitorLinux
class CAPTURE_EXPORT DeviceMonitorLinux
: public base::MessageLoop::DestructionObserver {
public:
explicit DeviceMonitorLinux(
......
......@@ -10,11 +10,11 @@
#include <memory>
#include "base/macros.h"
#include "media/base/media_export.h"
#include "media/capture/capture_export.h"
namespace media {
class MEDIA_EXPORT SystemMessageWindowWin {
class CAPTURE_EXPORT SystemMessageWindowWin {
public:
SystemMessageWindowWin();
......
......@@ -14,6 +14,12 @@ source_set("android") {
sources = [
"capture_jni_registrar.cc",
"capture_jni_registrar.h",
"photo_capabilities.cc",
"photo_capabilities.h",
"video_capture_device_android.cc",
"video_capture_device_android.h",
"video_capture_device_factory_android.cc",
"video_capture_device_factory_android.h",
]
configs += [
"//media:media_config",
......
......@@ -7,12 +7,12 @@
#include <jni.h>
#include "media/base/media_export.h"
#include "media/capture/capture_export.h"
namespace media {
// Register all JNI bindings necessary for capture.
MEDIA_EXPORT bool RegisterCaptureJni(JNIEnv* env);
CAPTURE_EXPORT bool RegisterCaptureJni(JNIEnv* env);
} // namespace media
......
......@@ -13,7 +13,7 @@
#include "base/synchronization/lock.h"
#include "base/threading/thread.h"
#include "base/time/time.h"
#include "media/base/media_export.h"
#include "media/capture/capture_export.h"
#include "media/capture/video/video_capture_device.h"
namespace tracked_objects {
......@@ -26,7 +26,7 @@ namespace media {
// by VideoCaptureManager on its own thread, while OnFrameAvailable is called
// on JAVA thread (i.e., UI thread). Both will access |state_| and |client_|,
// but only VideoCaptureManager would change their value.
class MEDIA_EXPORT VideoCaptureDeviceAndroid : public VideoCaptureDevice {
class CAPTURE_EXPORT VideoCaptureDeviceAndroid : public VideoCaptureDevice {
public:
// Automatically generated enum to interface with Java world.
//
......
......@@ -17,7 +17,7 @@ namespace media {
// VideoCaptureDeviceFactory on Android. This class implements the static
// VideoCapture methods and the factory of VideoCaptureAndroid.
class MEDIA_EXPORT VideoCaptureDeviceFactoryAndroid
class CAPTURE_EXPORT VideoCaptureDeviceFactoryAndroid
: public VideoCaptureDeviceFactory {
public:
static bool RegisterVideoCaptureDeviceFactory(JNIEnv* env);
......
......@@ -187,9 +187,9 @@ void FakeVideoCaptureDevice::CaptureUsingOwnBuffers(
base::TimeTicks now = base::TimeTicks::Now();
if (first_ref_time_.is_null())
first_ref_time_ = now;
client_->OnIncomingCapturedData(fake_frame_.get(), frame_size,
capture_format_, 0 /* rotation */, now,
now - first_ref_time_);
client_->OnIncomingCapturedData(
fake_frame_.get(), static_cast<int>(frame_size), capture_format_,
0u /* rotation */, now, now - first_ref_time_);
BeepAndScheduleNextCapture(
expected_execution_time,
base::Bind(&FakeVideoCaptureDevice::CaptureUsingOwnBuffers,
......@@ -222,7 +222,8 @@ void FakeVideoCaptureDevice::CaptureUsingClientBuffers(
VideoFrame::PlaneSize(PIXEL_FORMAT_I420, i,
capture_format_.frame_size)
.GetArea();
memcpy(capture_buffer->data(i), fake_frame_.get() + offset, plane_size);
memcpy(capture_buffer->data(i), fake_frame_.get() + offset,
static_cast<int>(plane_size));
offset += plane_size;
}
} else {
......
......@@ -22,7 +22,7 @@
namespace media {
class MEDIA_EXPORT FakeVideoCaptureDevice : public VideoCaptureDevice {
class CAPTURE_EXPORT FakeVideoCaptureDevice : public VideoCaptureDevice {
public:
enum class BufferOwnership {
OWN_BUFFERS,
......
......@@ -14,7 +14,7 @@ namespace media {
// Extension of VideoCaptureDeviceFactory to create and manipulate fake devices,
// not including file-based ones.
class MEDIA_EXPORT FakeVideoCaptureDeviceFactory
class CAPTURE_EXPORT FakeVideoCaptureDeviceFactory
: public VideoCaptureDeviceFactory {
public:
FakeVideoCaptureDeviceFactory();
......
......@@ -179,14 +179,14 @@ bool Y4mFileParser::Initialize(media::VideoCaptureFormat* capture_format) {
}
std::string header(kY4MHeaderMaxSize, '\0');
file_->Read(0, &header[0], header.size());
file_->Read(0, &header[0], static_cast<int>(header.size()));
const size_t header_end = header.find(kY4MSimpleFrameDelimiter);
CHECK_NE(header_end, header.npos);
ParseY4MTags(header, capture_format);
first_frame_byte_index_ = header_end + kY4MSimpleFrameDelimiterSize;
current_byte_index_ = first_frame_byte_index_;
frame_size_ = capture_format->ImageAllocationSize();
frame_size_ = static_cast<int>(capture_format->ImageAllocationSize());
return true;
}
......@@ -230,7 +230,7 @@ bool MjpegFileParser::Initialize(media::VideoCaptureFormat* capture_format) {
if (!ParseJpegStream(mapped_file_->data(), mapped_file_->length(), &result))
return false;
frame_size_ = result.image_size;
frame_size_ = static_cast<int>(result.image_size);
if (frame_size_ > static_cast<int>(mapped_file_->length())) {
LOG(ERROR) << "File is incomplete";
return false;
......@@ -255,7 +255,7 @@ const uint8_t* MjpegFileParser::GetNextFrame(int* frame_size) {
&result)) {
return nullptr;
}
*frame_size = frame_size_ = result.image_size;
*frame_size = frame_size_ = static_cast<int>(result.image_size);
current_byte_index_ += frame_size_;
// Reset the pointer to play repeatedly.
if (current_byte_index_ >= mapped_file_->length())
......
......@@ -32,7 +32,7 @@ class VideoFileParser;
// Example MJPEG videos can be found in media/data/test/bear.mjpeg.
// Restrictions: Y4M videos should have .y4m file extension and MJPEG videos
// should have .mjpeg file extension.
class MEDIA_EXPORT FileVideoCaptureDevice : public VideoCaptureDevice {
class CAPTURE_EXPORT FileVideoCaptureDevice : public VideoCaptureDevice {
public:
// Reads and parses the header of a |file_path|, returning the collected
// pixel format in |video_format|. Returns true on file parsed successfully,
......
......@@ -12,7 +12,7 @@ namespace media {
// Extension of VideoCaptureDeviceFactory to create and manipulate file-backed
// fake devices. These devices play back video-only files as video capture
// input.
class MEDIA_EXPORT FileVideoCaptureDeviceFactory
class CAPTURE_EXPORT FileVideoCaptureDeviceFactory
: public VideoCaptureDeviceFactory {
public:
FileVideoCaptureDeviceFactory() {}
......
......@@ -16,7 +16,7 @@ namespace media {
// Extension of VideoCaptureDeviceFactory to create and manipulate Linux
// devices.
class MEDIA_EXPORT VideoCaptureDeviceFactoryLinux
class CAPTURE_EXPORT VideoCaptureDeviceFactoryLinux
: public VideoCaptureDeviceFactory {
public:
explicit VideoCaptureDeviceFactoryLinux(
......
......@@ -32,7 +32,7 @@ namespace media {
// Creates a reference counted |decklink_capture_delegate_| that does all the
// DeckLink SDK configuration and capture work while holding a weak reference to
// us for sending back frames, logs and error messages.
class MEDIA_EXPORT VideoCaptureDeviceDeckLinkMac : public VideoCaptureDevice {
class CAPTURE_EXPORT VideoCaptureDeviceDeckLinkMac : public VideoCaptureDevice {
public:
// Gets the names of all DeckLink video capture devices connected to this
// computer, as enumerated by the DeckLink SDK. To allow the user to choose
......
......@@ -13,7 +13,7 @@
namespace media {
// Extension of VideoCaptureDeviceFactory to create and manipulate Mac devices.
class MEDIA_EXPORT VideoCaptureDeviceFactoryMac
class CAPTURE_EXPORT VideoCaptureDeviceFactoryMac
: public VideoCaptureDeviceFactory {
public:
VideoCaptureDeviceFactoryMac();
......
......@@ -33,7 +33,7 @@ class Location;
} // namespace tracked_objects
// Small class to bundle device name and connection type into a dictionary.
MEDIA_EXPORT
CAPTURE_EXPORT
@interface DeviceNameAndTransportType : NSObject {
@private
base::scoped_nsobject<NSString> deviceName_;
......
......@@ -26,9 +26,9 @@
#include "base/single_thread_task_runner.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "media/base/media_export.h"
#include "media/base/video_capture_types.h"
#include "media/base/video_frame.h"
#include "media/capture/capture_export.h"
#include "media/capture/video/scoped_result_callback.h"
#include "mojo/public/cpp/bindings/array.h"
#include "ui/gfx/gpu_memory_buffer.h"
......@@ -39,7 +39,7 @@ class Location;
namespace media {
class MEDIA_EXPORT VideoCaptureDevice {
class CAPTURE_EXPORT VideoCaptureDevice {
public:
// Represents a capture device name and ID.
// You should not create an instance of this class directly by e.g. setting
......@@ -49,7 +49,7 @@ class MEDIA_EXPORT VideoCaptureDevice {
// The reason for this is that a device name might contain platform specific
// settings that are relevant only to the platform specific implementation of
// VideoCaptureDevice::Create.
class MEDIA_EXPORT Name {
class CAPTURE_EXPORT Name {
public:
Name();
Name(const std::string& name, const std::string& id);
......@@ -179,10 +179,10 @@ class MEDIA_EXPORT VideoCaptureDevice {
// is actually two-in-one: clients may implement OnIncomingCapturedData() or
// ReserveOutputBuffer() + OnIncomingCapturedVideoFrame(), or all of them.
// All clients must implement OnError().
class MEDIA_EXPORT Client {
class CAPTURE_EXPORT Client {
public:
// Memory buffer returned by Client::ReserveOutputBuffer().
class MEDIA_EXPORT Buffer {
class CAPTURE_EXPORT Buffer {
public:
virtual ~Buffer() = 0;
virtual int id() const = 0;
......
......@@ -15,7 +15,7 @@ namespace media {
// devices in the different platforms. VCDFs are created by MediaStreamManager
// on IO thread and plugged into VideoCaptureManager, who owns and operates them
// in Device Thread (a.k.a. Audio Thread).
class MEDIA_EXPORT VideoCaptureDeviceFactory {
class CAPTURE_EXPORT VideoCaptureDeviceFactory {
public:
static std::unique_ptr<VideoCaptureDeviceFactory> CreateFactory(
scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner);
......
......@@ -11,7 +11,7 @@
namespace media {
// A convenience wrap of a device's name and associated supported formats.
struct MEDIA_EXPORT VideoCaptureDeviceInfo {
struct CAPTURE_EXPORT VideoCaptureDeviceInfo {
VideoCaptureDeviceInfo();
VideoCaptureDeviceInfo(const VideoCaptureDevice::Name& name,
const VideoCaptureFormats& supported_formats);
......
......@@ -38,7 +38,8 @@ class PinEnumerator final : public IEnumPins,
STDMETHOD(Next)(ULONG count, IPin** pins, ULONG* fetched) override {
ULONG pins_fetched = 0;
while (pins_fetched < count && filter_->NoOfPins() > index_) {
IPin* pin = filter_->GetPin(index_++);
index_++;
IPin* pin = filter_->GetPin(static_cast<int>(index_));
pin->AddRef();
pins[pins_fetched++] = pin;
}
......
......@@ -114,7 +114,8 @@ static bool IsDeviceBlackListed(const std::string& name) {
if (base::StartsWith(name, kBlacklistedCameraNames[i],
base::CompareCase::INSENSITIVE_ASCII)) {
DVLOG(1) << "Enumerated blacklisted device: " << name;
UMA_HISTOGRAM_ENUMERATION("Media.VideoCapture.BlacklistedDevice", i,
UMA_HISTOGRAM_ENUMERATION("Media.VideoCapture.BlacklistedDevice",
static_cast<int32_t>(i),
BLACKLISTED_CAMERA_MAX + 1);
return true;
}
......
......@@ -14,7 +14,7 @@ namespace media {
// Extension of VideoCaptureDeviceFactory to create and manipulate Windows
// devices, via either DirectShow or MediaFoundation APIs.
class MEDIA_EXPORT VideoCaptureDeviceFactoryWin
class CAPTURE_EXPORT VideoCaptureDeviceFactoryWin
: public VideoCaptureDeviceFactory {
public:
static bool PlatformSupportsMediaFoundation();
......
......@@ -19,7 +19,7 @@
#include "base/synchronization/lock.h"
#include "base/threading/non_thread_safe.h"
#include "base/win/scoped_comptr.h"
#include "media/base/media_export.h"
#include "media/capture/capture_export.h"
#include "media/capture/video/video_capture_device.h"
interface IMFSourceReader;
......@@ -35,8 +35,8 @@ class MFReaderCallback;
const DWORD kFirstVideoStream =
static_cast<DWORD>(MF_SOURCE_READER_FIRST_VIDEO_STREAM);
class MEDIA_EXPORT VideoCaptureDeviceMFWin : public base::NonThreadSafe,
public VideoCaptureDevice {
class CAPTURE_EXPORT VideoCaptureDeviceMFWin : public base::NonThreadSafe,
public VideoCaptureDevice {
public:
static bool FormatFromGuid(const GUID& guid, VideoPixelFormat* format);
......
......@@ -131,6 +131,9 @@
'<(DEPTH)/third_party/libvpx/libvpx.gyp:libvpx',
],
}], # OS=="ios"
['OS=="win"', {
'dependencies': [ '<(DEPTH)/media/media.gyp:mf_initializer' ],
}],
], # conditions
},
{
......
......@@ -331,9 +331,11 @@ component("gpu") {
"dxva_video_decode_accelerator_win.h",
]
configs += [
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
"//build/config/compiler:no_size_t_to_int_warning",
"//third_party/khronos:khronos_headers",
]
public_deps += [ "//media/base/win" ]
deps += [ "//third_party/angle:includes" ]
libs += [
"d3d9.lib",
......
......@@ -49,7 +49,6 @@
],
},
'includes': [
'capture/capture.gypi',
'media_cdm.gypi',
'media_variables.gypi',
],
......@@ -102,11 +101,7 @@
'include_dirs': [
'..',
],
'includes': [
'capture/capture.gypi',
],
'sources': [
'<@(capture_sources)',
'audio/agc_audio_stream.h',
'audio/alsa/alsa_input.cc',
'audio/alsa/alsa_input.h',
......@@ -475,8 +470,6 @@
'base/video_util.h',
'base/wall_clock_time_source.cc',
'base/wall_clock_time_source.h',
'base/win/mf_initializer.cc',
'base/win/mf_initializer.h',
'base/yuv_convert.cc',
'base/yuv_convert.h',
'cdm/aes_decryptor.cc',
......@@ -713,11 +706,9 @@
}],
['OS=="android"', {
'dependencies': [
'capture_java',
'media_android_jni_headers',
'media_java',
'player_android',
'video_capture_android_jni_headers',
],
'sources!': [
'base/audio_video_metadata_extractor.cc',
......@@ -820,12 +811,6 @@
'audio/cras/cras_unified.h',
],
}],
['use_udev==1', {
'dependencies': [
'<(DEPTH)/device/udev_linux/udev.gyp:udev_linux',
],
}],
],
}],
['OS!="linux"', {
......@@ -923,10 +908,6 @@
],
}],
['OS=="mac"', {
'dependencies': [
'<(DEPTH)/third_party/decklink/decklink.gyp:decklink',
],
'link_settings': {
'libraries': [
'$(SDKROOT)/System/Library/Frameworks/AudioToolbox.framework',
......@@ -939,39 +920,6 @@
},
}],
['OS=="win"', {
'link_settings': {
'libraries': [
'-ldxguid.lib',
'-lmf.lib',
'-lmfplat.lib',
'-lmfreadwrite.lib',
'-lmfuuid.lib',
'-lsetupapi.lib',
'-lwinmm.lib',
],
},
# Specify delayload for media.dll.
'msvs_settings': {
'VCLinkerTool': {
'DelayLoadDLLs': [
'mf.dll',
'mfplat.dll',
'mfreadwrite.dll',
],
},
},
# Specify delayload for components that link with media.lib.
'all_dependent_settings': {
'msvs_settings': {
'VCLinkerTool': {
'DelayLoadDLLs': [
'mf.dll',
'mfplat.dll',
'mfreadwrite.dll',
],
},
},
},
# TODO(wolenetz): Fix size_t to int truncations in win64. See
# http://crbug.com/171009
'conditions': [
......@@ -1127,6 +1075,8 @@
'type': '<(gtest_target_type)',
'dependencies': [
'audio_test_config',
# TODO(mcasas): Remove this entry after https://crbug.com/618718.
'capture/capture.gyp:unittests',
'cdm_paths',
'media',
'media_features',
......@@ -1149,7 +1099,6 @@
'../url/url.gyp:url_lib',
],
'sources': [
'<@(capture_unittests_sources)',
'base/android/access_unit_queue_unittest.cc',
'base/android/media_codec_decoder_unittest.cc',
'base/android/media_drm_bridge_unittest.cc',
......@@ -1545,12 +1494,14 @@
},
{
# GN version: //media:audio_unittests
# For running the subset of media_unittests that might require audio
# For running the subset of tests that might require audio
# hardware separately on GPU bots. media_unittests includes these too.
'target_name': 'audio_unittests',
'type': '<(gtest_target_type)',
'dependencies': [
'audio_test_config',
# TODO(mcasas): Remove this entry after https://crbug.com/618718.
'capture/capture.gyp:unittests',
'media_test_support',
'../base/base.gyp:test_support_base',
'../testing/gmock.gyp:gmock',
......@@ -1748,6 +1699,56 @@
},
], # targets
}],
['OS=="win"', {
'targets': [
{
# GN version: //media/base/win
'target_name': 'mf_initializer',
'type': '<(component)',
'include_dirs': [ '..', ],
'defines': [ 'MF_INITIALIZER_IMPLEMENTATION', ],
'sources': [
'base/win/mf_initializer_export.h',
'base/win/mf_initializer.cc',
'base/win/mf_initializer.h',
],
'dependencies': [
'../base/base.gyp:base',
],
'link_settings': {
'libraries': [
'-ldxguid.lib',
'-lmf.lib',
'-lmfplat.lib',
'-lmfreadwrite.lib',
'-lmfuuid.lib',
'-lsetupapi.lib',
'-lwinmm.lib',
],
},
'msvs_settings': {
'VCLinkerTool': {
'DelayLoadDLLs': [
'mf.dll',
'mfplat.dll',
'mfreadwrite.dll',
],
},
},
'all_dependent_settings': {
'msvs_settings': {
'VCLinkerTool': {
'DelayLoadDLLs': [
'mf.dll',
'mfplat.dll',
'mfreadwrite.dll',
],
},
},
},
},
],
}],
['OS=="android"', {
'targets': [
{
......@@ -1755,7 +1756,6 @@
'target_name': 'media_unittests_apk',
'type': 'none',
'dependencies': [
'capture_java',
'media_java',
'media_unittests',
],
......@@ -1770,7 +1770,6 @@
'target_name': 'media_perftests_apk',
'type': 'none',
'dependencies': [
'capture_java',
'media_java',
'media_perftests',
],
......@@ -1798,19 +1797,6 @@
},
'includes': ['../build/jni_generator.gypi'],
},
{
# GN: //media/capture/video/android:capture_jni_headers
'target_name': 'video_capture_android_jni_headers',
'type': 'none',
'sources': [
'capture/video/android/java/src/org/chromium/media/VideoCapture.java',
'capture/video/android/java/src/org/chromium/media/VideoCaptureFactory.java',
],
'variables': {
'jni_gen_package': 'media',
},
'includes': ['../build/jni_generator.gypi'],
},
{
# GN: //media/base/android:android
'target_name': 'player_android',
......@@ -1900,23 +1886,6 @@
'MEDIA_IMPLEMENTATION',
],
},
{
# GN: //media/capture/video/android:capture_java
'target_name': 'capture_java',
'type': 'none',
'dependencies': [
'../base/base.gyp:base',
'media_android_captureapitype',
'media_android_imageformat',
],
'export_dependent_settings': [
'../base/base.gyp:base',
],
'variables': {
'java_in_dir': 'capture/video/android/java',
},
'includes': ['../build/java.gypi'],
},
{
# GN: //media/base/android:media_java
'target_name': 'media_java',
......@@ -1932,24 +1901,6 @@
},
'includes': ['../build/java.gypi'],
},
{
# GN: //media/base/android:media_android_captureapitype
'target_name': 'media_android_captureapitype',
'type': 'none',
'variables': {
'source_file': 'capture/video/video_capture_device.h',
},
'includes': [ '../build/android/java_cpp_enum.gypi' ],
},
{
# GN: //media/base/android:media_android_imageformat
'target_name': 'media_android_imageformat',
'type': 'none',
'variables': {
'source_file': 'capture/video/android/video_capture_device_android.h',
},
'includes': [ '../build/android/java_cpp_enum.gypi' ],
},
],
'conditions': [
['test_isolation_mode != "noop"',
......
......@@ -323,6 +323,7 @@
['OS=="win"', {
'dependencies': [
'../media/media.gyp:media',
'../media/media.gyp:mf_initializer',
'../ui/gl/gl.gyp:gl',
'../ui/gl/init/gl_init.gyp:gl_init',
],
......
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