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

Issue 2031073002: Make media/capture gn and gyps produce components (Closed)

Created:
4 years, 6 months ago by mcasas
Modified:
4 years, 6 months ago
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, jam, feature-media-reviews_chromium.org, darin-cc_chromium.org, mcasas+watch+vc_chromium.org, mkwst+moarreviews-renderer_chromium.org, miu+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

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 Committed: https://crrev.com/f4683c359791bb0264cddddeca6b8bcae0e61817 Cr-Commit-Position: refs/heads/master@{#399024}

Patch Set 1 : #

Total comments: 12

Patch Set 2 : xhwang@ and miu@ comments #

Patch Set 3 : Made media/base/win a component and sorted out win dependencies. Also, rebase that only affects content/ files #

Patch Set 4 : gyp and TODO about media/capture export/import #

Patch Set 5 : Android missed dep #

Total comments: 4

Patch Set 6 : xhwang@ comments: Added mf_initializer_export.h, and TODOs for capture_unittests #

Total comments: 3

Patch Set 7 : Added again 'Android missed dep' PS5 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+442 lines, -281 lines) Patch
M content/browser/BUILD.gn View 1 2 3 4 5 6 2 chunks +2 lines, -0 lines 0 comments Download
M content/common/BUILD.gn View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M content/content_browser.gypi View 1 2 5 1 chunk +1 line, -1 line 0 comments Download
M content/content_common.gypi View 1 2 5 1 chunk +1 line, -0 lines 0 comments Download
M content/content_tests.gypi View 1 2 5 2 chunks +2 lines, -0 lines 0 comments Download
M content/renderer/BUILD.gn View 1 2 5 1 chunk +1 line, -0 lines 0 comments Download
M content/test/BUILD.gn View 1 2 5 3 chunks +3 lines, -0 lines 0 comments Download
M media/BUILD.gn View 1 2 3 4 5 4 chunks +2 lines, -9 lines 0 comments Download
M media/base/BUILD.gn View 1 2 3 4 5 1 chunk +8 lines, -0 lines 0 comments Download
M media/base/win/BUILD.gn View 1 2 3 4 5 1 chunk +13 lines, -5 lines 0 comments Download
M media/base/win/mf_initializer.h View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
A media/base/win/mf_initializer_export.h View 1 2 3 4 5 1 chunk +29 lines, -0 lines 0 comments Download
M media/capture/BUILD.gn View 1 2 3 4 5 7 chunks +20 lines, -10 lines 0 comments Download
A media/capture/capture.gyp View 1 2 3 1 chunk +223 lines, -0 lines 0 comments Download
D media/capture/capture.gypi View 1 chunk +0 lines, -106 lines 0 comments Download
A media/capture/capture_export.h View 1 2 3 1 chunk +29 lines, -0 lines 0 comments Download
M media/capture/content/animated_content_sampler.h View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M media/capture/content/capture_resolution_chooser.h View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M media/capture/content/feedback_signal_accumulator.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M media/capture/content/screen_capture_device_core.h View 1 2 3 3 chunks +3 lines, -3 lines 0 comments Download
M media/capture/content/smooth_event_sampler.h View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M media/capture/content/thread_safe_capture_oracle.h View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M media/capture/content/video_capture_oracle.h View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M media/capture/device_monitor_mac.h View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M media/capture/device_monitor_udev.h View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M media/capture/system_message_window_win.h View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M media/capture/video/android/BUILD.gn View 1 chunk +4 lines, -0 lines 0 comments Download
M media/capture/video/android/capture_jni_registrar.h View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M media/capture/video/android/video_capture_device_android.h View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M media/capture/video/android/video_capture_device_factory_android.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M media/capture/video/fake_video_capture_device.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M media/capture/video/fake_video_capture_device_factory.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M media/capture/video/file_video_capture_device.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M media/capture/video/file_video_capture_device_factory.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M media/capture/video/linux/video_capture_device_factory_linux.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M media/capture/video/mac/video_capture_device_decklink_mac.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M media/capture/video/mac/video_capture_device_factory_mac.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M media/capture/video/mac/video_capture_device_mac.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M media/capture/video/video_capture_device.h View 1 2 3 4 chunks +5 lines, -5 lines 0 comments Download
M media/capture/video/video_capture_device_factory.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M media/capture/video/video_capture_device_info.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M media/capture/video/win/video_capture_device_factory_win.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M media/capture/video/win/video_capture_device_mf_win.h View 1 2 3 2 chunks +3 lines, -3 lines 0 comments Download
M media/gpu/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M media/media.gyp View 1 2 3 4 5 16 chunks +55 lines, -104 lines 0 comments Download
M media/media_gpu.gypi View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 50 (33 generated)
mcasas
xhwang@, miu@, PTAL (please ignore Win bot failure, seems like I'm double linking mf_initializer, will ...
4 years, 6 months ago (2016-06-07 19:02:33 UTC) #22
xhwang
I like this approach in general! I have some comments though. https://codereview.chromium.org/2031073002/diff/360001/media/BUILD.gn File media/BUILD.gn (right): ...
4 years, 6 months ago (2016-06-07 19:47:15 UTC) #23
miu
xhwang@ seems to have covered my concerns. Here are two other things: https://codereview.chromium.org/2031073002/diff/360001/media/capture/capture.gyp File media/capture/capture.gyp ...
4 years, 6 months ago (2016-06-07 21:13:19 UTC) #24
mcasas
Comments addressed, PTAL (except Win build troubles, that I'll address tomorrow) https://codereview.chromium.org/2031073002/diff/360001/media/BUILD.gn File media/BUILD.gn (right): ...
4 years, 6 months ago (2016-06-07 23:19:29 UTC) #27
mcasas
Got windows building, PTAL.
4 years, 6 months ago (2016-06-08 19:03:08 UTC) #28
xhwang
https://chromiumcodereview.appspot.com/2031073002/diff/520001/media/base/BUILD.gn File media/base/BUILD.gn (right): https://chromiumcodereview.appspot.com/2031073002/diff/520001/media/base/BUILD.gn#newcode409 media/base/BUILD.gn:409: ] Now media/capture is a separate target, we probably ...
4 years, 6 months ago (2016-06-09 06:30:46 UTC) #33
mcasas
guys PTAL https://codereview.chromium.org/2031073002/diff/520001/media/base/BUILD.gn File media/base/BUILD.gn (right): https://codereview.chromium.org/2031073002/diff/520001/media/base/BUILD.gn#newcode409 media/base/BUILD.gn:409: ] On 2016/06/09 06:30:46, xhwang wrote: > ...
4 years, 6 months ago (2016-06-09 16:07:55 UTC) #34
xhwang
LGTM % one last comment https://codereview.chromium.org/2031073002/diff/540001/media/base/win/BUILD.gn File media/base/win/BUILD.gn (right): https://codereview.chromium.org/2031073002/diff/540001/media/base/win/BUILD.gn#newcode7 media/base/win/BUILD.gn:7: component("win") { Just in ...
4 years, 6 months ago (2016-06-09 16:11:58 UTC) #35
mcasas
avi@ Owners RS for the content/ build files please. https://codereview.chromium.org/2031073002/diff/540001/media/base/win/BUILD.gn File media/base/win/BUILD.gn (right): https://codereview.chromium.org/2031073002/diff/540001/media/base/win/BUILD.gn#newcode7 media/base/win/BUILD.gn:7: ...
4 years, 6 months ago (2016-06-09 16:45:23 UTC) #37
xhwang
https://codereview.chromium.org/2031073002/diff/540001/media/base/win/BUILD.gn File media/base/win/BUILD.gn (right): https://codereview.chromium.org/2031073002/diff/540001/media/base/win/BUILD.gn#newcode7 media/base/win/BUILD.gn:7: component("win") { On 2016/06/09 16:45:23, mcasas wrote: > On ...
4 years, 6 months ago (2016-06-09 17:28:57 UTC) #39
Avi (use Gerrit)
content GN files LGTM
4 years, 6 months ago (2016-06-09 18:00:06 UTC) #40
miu
lgtm. Confirmed my last round of comments were just my own misunderstanding about the organization ...
4 years, 6 months ago (2016-06-09 19:13:23 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2031073002/580001
4 years, 6 months ago (2016-06-09 19:21:47 UTC) #44
commit-bot: I haz the power
Committed patchset #7 (id:580001)
4 years, 6 months ago (2016-06-09 21:35:27 UTC) #46
commit-bot: I haz the power
CQ bit was unchecked
4 years, 6 months ago (2016-06-09 21:35:51 UTC) #47
commit-bot: I haz the power
Patchset 7 (id:??) landed as https://crrev.com/f4683c359791bb0264cddddeca6b8bcae0e61817 Cr-Commit-Position: refs/heads/master@{#399024}
4 years, 6 months ago (2016-06-09 21:38:29 UTC) #49
mcasas
4 years, 6 months ago (2016-06-09 21:52:29 UTC) #50
Message was sent while issue was closed.
A revert of this CL (patchset #7 id:580001) has been created in
https://codereview.chromium.org/2059493002/ by mcasas@chromium.org.

The reason for reverting is: Broke (at least)
https://build.chromium.org/p/chromium.webkit/builders/WebKit%20Mac%20Builder%...:

FAILED: libmedia.dylib libmedia.dylib.TOC 
if [ ! -e "./libmedia.dylib" -o ! -e "./libmedia.dylib.TOC" ] || otool -l
"./libmedia.dylib" | grep -q LC_REEXPORT_DYLIB ; then
../../build/toolchain/mac/linker_driver.py /b/build/slave/cache/cipd/goma/gomacc
../../third_party/llvm-build/Release+Asserts/bin/clang++ -shared 
-Wl,-install_name,@rpath/"libmedia.dylib" -stdlib=libc++ -arch x86_64 -isysroot
/Applications/Xcode7.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk
-mmacosx-version-min=10.7 -Wl,-rpath,@loader_path/.
-Wl,-rpath,@loader_path/../../.. -o "./libmedia.dylib"
-Wl,-filelist,"./libmedia.dylib.rsp" -framework CoreVideo -framework
AVFoundation -framework AudioToolbox -framework AudioUnit -framework CoreAudio
./libshared_memory_support.dylib ./libffmpeg.dylib ./libbase.dylib
./libbase_i18n.dylib ./libcrcrypto.dylib ./libskia.dylib ./libevents_base.dylib
./libgfx.dylib ./libgeometry.dylib ./libgl_wrapper.dylib ./liburl.dylib
./libgpu.dylib ./libgles2_utils.dylib ./libicui18n.dylib ./libicuuc.dylib
./librange.dylib ./libui_base.dylib ./libplatform.dylib ./libgl_init.dylib
./libipc.dylib ./libboringssl.dylib && { otool -l "./libmedia.dylib" | grep
LC_ID_DYLIB -A 5; nm -gP "./libmedia.dylib" | cut -f1-2 -d' ' | grep -v U$$;
true; } > "./libmedia.dylib.TOC"; else
../../build/toolchain/mac/linker_driver.py /b/build/slave/cache/cipd/goma/gomacc
../../third_party/llvm-build/Release+Asserts/bin/clang++ -shared 
-Wl,-install_name,@rpath/"libmedia.dylib" -stdlib=libc++ -arch x86_64 -isysroot
/Applications/Xcode7.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk
-mmacosx-version-min=10.7 -Wl,-rpath,@loader_path/.
-Wl,-rpath,@loader_path/../../.. -o "./libmedia.dylib"
-Wl,-filelist,"./libmedia.dylib.rsp" -framework CoreVideo -framework
AVFoundation -framework AudioToolbox -framework AudioUnit -framework CoreAudio
./libshared_memory_support.dylib ./libffmpeg.dylib ./libbase.dylib
./libbase_i18n.dylib ./libcrcrypto.dylib ./libskia.dylib ./libevents_base.dylib
./libgfx.dylib ./libgeometry.dylib ./libgl_wrapper.dylib ./liburl.dylib
./libgpu.dylib ./libgles2_utils.dylib ./libicui18n.dylib ./libicuuc.dylib
./librange.dylib ./libui_base.dylib ./libplatform.dylib ./libgl_init.dylib
./libipc.dylib ./libboringssl.dylib && { otool -l "./libmedia.dylib" | grep
LC_ID_DYLIB -A 5; nm -gP "./libmedia.dylib" | cut -f1-2 -d' ' | grep -v U$$;
true; } > "./libmedia.dylib.tmp" && if ! cmp -s "./libmedia.dylib.tmp"
"./libmedia.dylib.TOC"; then mv "./libmedia.dylib.tmp" "./libmedia.dylib.TOC" ;
fi; fi
Undefined symbols for architecture x86_64:
  "_CFArrayCreate", referenced from:
      media::video_toolbox::ArrayWithIntegers(int const*, unsigned long) in
videotoolbox_helpers.o
      media::video_toolbox::ArrayWithIntegerAndFloat(int, float) in
videotoolbox_helpers.o
  "_CFDictionaryCreate", referenced from:
      media::video_toolbox::DictionaryWithKeysAndValues(void const**, void
const**, unsigned long) in videotoolbox_helpers.o
  "_CFGetTypeID", referenced from:
      media::VideoFrame::WrapCVPixelBuffer(__CVBuffer*, base::TimeDelta) in
video_frame.o
  "_CFNumberCreate", referenced from:
      media::video_toolbox::ArrayWithIntegers(int const*, unsigned long) in
videotoolbox_helpers.o
      media::video_toolbox::ArrayWithIntegerAndFloat(int, float) in
videotoolbox_helpers.o
      media::video_toolbox::SessionPropertySetter::Set(__CFString const*, int)
in videotoolbox_helpers.o
  "_CFRelease", referenced from:
      base::internal::ScopedCFTypeRefTraits<__CVBuffer*>::Release(__CVBuffer*)
in video_frame_mac.o
      media::video_toolbox::ArrayWithIntegers(int const*, unsigned long) in
videotoolbox_helpers.o
      media::video_toolbox::ArrayWithIntegerAndFloat(int, float) in
videotoolbox_helpers.o
      base::internal::ScopedCFTypeRefTraits<__CFArray const*>::Release(__CFArray
const*) in videotoolbox_helpers.o
     
base::internal::ScopedCFTypeRefTraits<OpaqueCMBlockBuffer*>::Release(OpaqueCMBlockBuffer*)
in videotoolbox_helpers.o
     
base::internal::ScopedCFTypeRefTraits<OpaqueVTCompressionSession*>::Release(OpaqueVTCompressionSession*)
in videotoolbox_helpers.o
      base::internal::ScopedCFTypeRefTraits<__CFNumber
const*>::Release(__CFNumber const*) in videotoolbox_helpers.o
      ...
  "_CFRetain", referenced from:
      base::internal::ScopedCFTypeRefTraits<__CVBuffer*>::Retain(__CVBuffer*) in
video_frame_mac.o
      base::internal::ScopedCFTypeRefTraits<__CFDictionary
const*>::Retain(__CFDictionary const*) in videotoolbox_helpers.o
      base::internal::ScopedCFTypeRefTraits<__CFArray const*>::Retain(__CFArray
const*) in videotoolbox_helpers.o
     
base::internal::ScopedCFTypeRefTraits<OpaqueCMBlockBuffer*>::Retain(OpaqueCMBlockBuffer*)
in videotoolbox_helpers.o
     
base::internal::ScopedCFTypeRefTraits<OpaqueVTCompressionSession*>::Retain(OpaqueVTCompressionSession*)
in videotoolbox_helpers.o
      base::internal::ScopedCFTypeRefTraits<__CFNumber
const*>::Retain(__CFNumber const*) in videotoolbox_helpers.o
      base::internal::ScopedCFTypeRefTraits<__CFString
const*>::Retain(__CFString const*) in audio_manager_mac.o
      ...
  "_CGEventSourceCounterForEventType", referenced from:
      media::(anonymous namespace)::UserInputMonitorMac::GetKeyPressCount()
const in user_input_monitor_mac.o
  "_OBJC_CLASS_$_NSBundle", referenced from:
      objc-class-ref in coremedia_glue.o
      objc-class-ref in videotoolbox_glue.o
      objc-class-ref in avfoundation_glue.o
  "_OBJC_CLASS_$_NSObject", referenced from:
      _OBJC_CLASS_$_AVCaptureDeviceGlue in avfoundation_glue.o
      _OBJC_CLASS_$_AVCaptureDeviceInputGlue in avfoundation_glue.o
  "_OBJC_CLASS_$_NSThread", referenced from:
      objc-class-ref in avfoundation_glue.o
  "_OBJC_METACLASS_$_NSObject", referenced from:
      _OBJC_METACLASS_$_AVCaptureDeviceGlue in avfoundation_glue.o
      _OBJC_METACLASS_$_AVCaptureDeviceInputGlue in avfoundation_glue.o
  "___CFConstantStringClassReference", referenced from:
      CFString in coremedia_glue.o
      CFString in videotoolbox_glue.o
      CFString in avfoundation_glue.o
      CFString in avfoundation_glue.o
      CFString in avfoundation_glue.o
      CFString in avfoundation_glue.o
      CFString in avfoundation_glue.o
      ...
  "__objc_empty_cache", referenced from:
      _OBJC_METACLASS_$_AVCaptureDeviceGlue in avfoundation_glue.o
      _OBJC_CLASS_$_AVCaptureDeviceGlue in avfoundation_glue.o
      _OBJC_METACLASS_$_AVCaptureDeviceInputGlue in avfoundation_glue.o
      _OBJC_CLASS_$_AVCaptureDeviceInputGlue in avfoundation_glue.o
  "__objc_empty_vtable", referenced from:
      _OBJC_METACLASS_$_AVCaptureDeviceGlue in avfoundation_glue.o
      _OBJC_CLASS_$_AVCaptureDeviceGlue in avfoundation_glue.o
      _OBJC_METACLASS_$_AVCaptureDeviceInputGlue in avfoundation_glue.o
      _OBJC_CLASS_$_AVCaptureDeviceInputGlue in avfoundation_glue.o
  "_kCFAllocatorDefault", referenced from:
      media::WrapVideoFrameInCVPixelBuffer(media::VideoFrame const&) in
video_frame_mac.o
      media::video_toolbox::DictionaryWithKeysAndValues(void const**, void
const**, unsigned long) in videotoolbox_helpers.o
      media::video_toolbox::ArrayWithIntegers(int const*, unsigned long) in
videotoolbox_helpers.o
      media::video_toolbox::ArrayWithIntegerAndFloat(int, float) in
videotoolbox_helpers.o
     
media::video_toolbox::CopySampleBufferToAnnexBBuffer(OpaqueCMSampleBuffer*,
media::video_toolbox::AnnexBBuffer*, bool) in videotoolbox_helpers.o
  "_kCFBooleanFalse", referenced from:
      media::video_toolbox::SessionPropertySetter::Set(__CFString const*, bool)
in videotoolbox_helpers.o
  "_kCFBooleanTrue", referenced from:
      media::video_toolbox::SessionPropertySetter::Set(__CFString const*, bool)
in videotoolbox_helpers.o
  "_kCFRunLoopCommonModes", referenced from:
      media::PCMQueueInAudioInputStream::Open() in audio_input_mac.o
  "_kCFTypeArrayCallBacks", referenced from:
      media::video_toolbox::ArrayWithIntegers(int const*, unsigned long) in
videotoolbox_helpers.o
      media::video_toolbox::ArrayWithIntegerAndFloat(int, float) in
videotoolbox_helpers.o
  "_kCFTypeDictionaryKeyCallBacks", referenced from:
      media::video_toolbox::DictionaryWithKeysAndValues(void const**, void
const**, unsigned long) in videotoolbox_helpers.o
  "_kCFTypeDictionaryValueCallBacks", referenced from:
      media::video_toolbox::DictionaryWithKeysAndValues(void const**, void
const**, unsigned long) in videotoolbox_helpers.o
  "_objc_msgSend", referenced from:
      (anonymous
namespace)::CoreMediaLibraryInternal::CoreMediaLibraryInternal() in
coremedia_glue.o
      VideoToolboxGlue::Loader::Loader() in videotoolbox_glue.o
      AVFoundationGlue::InitializeAVFoundation() in avfoundation_glue.o
      (anonymous namespace)::LoadAVFoundationInternal() in avfoundation_glue.o
      AVFoundationGlue::AVCaptureSessionClass() in avfoundation_glue.o
      AVFoundationGlue::AVCaptureVideoDataOutputClass() in avfoundation_glue.o
      +[AVCaptureDeviceGlue devices] in avfoundation_glue.o
      ...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Traceback (most recent call last):
  File "../../build/toolchain/mac/linker_driver.py", line 186, in <module>
    Main(sys.argv)
  File "../../build/toolchain/mac/linker_driver.py", line 68, in Main
    subprocess.check_call(compiler_driver_args)
  File
"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py",
line 540, in check_call
    raise CalledProcessError(retcode, cmd)
.

Powered by Google App Engine
This is Rietveld 408576698