New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 626125 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner:
Closed: May 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Feature

Blocked on:
issue 584797



Sign in to add a comment

Move //media/capture into //services/video_capture

Project Member Reported by mcasas@chromium.org, Jul 6 2016

Issue description

media/capture is a fully enclosed library and unittests that 
manages the lifetime of video capture providers, be that 
simple ones (webcams, digitizers, software webcams) or 
otherwise (tab and screen capture). This module is fully
layered on top of media/, of which it uses only whatever is 
in media/base (video_frame.h, video_types.h etc).

Since:
a) capture/ is in the process of being mojified 
 (https://crbug.com/584797),  and device/ is friendlier 
 towards having one mojo-app per folder, and
b) the functionality of capture/ is essentially different 
 from the rest of media/, 

this issue proposes to move capture/ into device/. Thoughts?
 
Ping folks, any opinions?

Comment 2 by perkj@chromium.org, Jul 11 2016

I don't have a strong opinion and both make sence. But I think audio input devices and video input devices should be in the same structure.
Labels: -Type-Bug Type-Feature
Status: Assigned (was: Untriaged)
[triage]

Comment 4 by mcasas@chromium.org, Jul 11 2016

On #2: audio and video are in separate folders of media
right now, and they are compiled/linked in separate
.so (/.dll/.dylib/etc). They also have separate unit tests 
(capture_unittests versus media_unittests and audio_unittests). 
Moreover, with the blocked-on bug https://crbug.com/584797,
video/content capture will become a mojo "app" of sorts so,
effectively, audio and video capture are very separate 
entities. FTR I have proposed and encouraged to bring audio
capture together with the content/video capture code, with
not much success so far :)

Comment 5 by mcasas@chromium.org, Jul 13 2016

Status: Started (was: Assigned)
Ping guys.

Started working on it on https://codereview.chromium.org/2143903003

Comment 6 by tommi@chromium.org, Jul 13 2016

Cc: dalecur...@chromium.org
+Dale

For audio, the capture and rendering code has things in common.  Is the intention to move the audio rendering code to device as well?

Comment 7 by mcasas@chromium.org, Jul 13 2016

#6: in due time, and if it makes sense with the audio
capture Owners, I'd be totally in favour of it. Also,
I understand there is an effort underway to mojify 
audio capture [1], so it all would make sense to me. 

This particular issue deals with media/capture --> 
device/capture, and that encompasses on ToT video 
capture from devices and content (screen, apps and tabs).

[1] https://bugs.chromium.org/p/chromium/issues/detail?id=606707
If //device is the new home for things interacting with OS level hardware, I don't have anything against relocation. //device feels a bit nebulous, but if that ship has already sailed, I digress.
This is happening in https://codereview.chromium.org/2214533002/
Re. #10, I had a conversation with other TLDs and reillyg@ and, essentially,
the latter explained that //device/ should aim for wrapping _only_ OS/hardware 
functionality, and since capture/ uses e.g. libyuv and other media/ functions, 
that seems too large for its scope. 

In parallel, chfremer@ had been querying around and it seems like his effort
for turning video_capture into a mojo service (implementation) guided him to
//services/image_capture, so for the time being, I'll put the CL linked in 
#10 in ice, let chfremer@ work on, and when there's enough critical mojo-mass
in //services/video_capture, move //media/capture code into it. SG?
Cc: jam@chromium.org chfremer@chromium.org
Project Member

Comment 13 by bugdroid1@chromium.org, Aug 10 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c41614771c0e7efac7971738c81d05118cc31709

commit c41614771c0e7efac7971738c81d05118cc31709
Author: mcasas <mcasas@chromium.org>
Date: Wed Aug 10 23:29:08 2016

Move device monitors out of //media/capture into //media/device_monitors

This is (another) preparation CL for the linked bug. Device monitors are
in capture/ for unknown reasons but they don't belong there, since they
effectively monitor all audio and video devices in the system. Folders
are cheap, so I moved them out, further clearing the way for moving
//media/capture around, and paves the way to reusing functionality that
is now in //device.

BUG= 626125 

NOPRESUBMIT=true (this CL has the necessary LGTMs but
it hits an incorrect git cl format media presubmit check).

Review-Url: https://codereview.chromium.org/2224643002
Cr-Commit-Position: refs/heads/master@{#411181}

[modify] https://crrev.com/c41614771c0e7efac7971738c81d05118cc31709/content/browser/browser_main_loop.cc
[modify] https://crrev.com/c41614771c0e7efac7971738c81d05118cc31709/content/browser/renderer_host/media/media_stream_manager.cc
[modify] https://crrev.com/c41614771c0e7efac7971738c81d05118cc31709/media/BUILD.gn
[modify] https://crrev.com/c41614771c0e7efac7971738c81d05118cc31709/media/capture/BUILD.gn
[rename] https://crrev.com/c41614771c0e7efac7971738c81d05118cc31709/media/device_monitors/device_monitor_mac.h
[rename] https://crrev.com/c41614771c0e7efac7971738c81d05118cc31709/media/device_monitors/device_monitor_mac.mm
[rename] https://crrev.com/c41614771c0e7efac7971738c81d05118cc31709/media/device_monitors/device_monitor_udev.cc
[rename] https://crrev.com/c41614771c0e7efac7971738c81d05118cc31709/media/device_monitors/device_monitor_udev.h
[rename] https://crrev.com/c41614771c0e7efac7971738c81d05118cc31709/media/device_monitors/system_message_window_win.cc
[rename] https://crrev.com/c41614771c0e7efac7971738c81d05118cc31709/media/device_monitors/system_message_window_win.h
[rename] https://crrev.com/c41614771c0e7efac7971738c81d05118cc31709/media/device_monitors/system_message_window_win_unittest.cc

Summary: Move //media/capture into //services/video_capture (was: Move media/capture into device/capture)
Cc: mcasas@chromium.org
Owner: chfremer@chromium.org
Status: Assigned (was: Started)
Won't have time to work on this, so passing it over to chfremer@.
Status: WontFix (was: Assigned)
Now that some of the dust has settled after the refactoring work for the video capture service, we have the following situation:

media/capture: Video capture code that is not specific to the video capture service or the browser or renderers. This code is used by both the video capture service and the browser (and probably by renderer code as well).

services/video_capture: Code that is specific to the video capture service. This code depends on media/capture.

This situation seems acceptable to me. Even though there is not too much coherency between media/capture and the rest of media/*, this seems like an okay place for this low-level video capture library code. Until we reach a point where the video capture service becomes the only consumer of this code, I feel it is best to leave it in media/capture.

=> Closing as WontFix. Let us reopen when needed.

Sign in to add a comment