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

Issue 708233 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: May 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Consider removing method VideoCaptureDeviceFactory::EnumerateDeviceDescriptors()

Project Member Reported by chfremer@chromium.org, Apr 4 2017

Issue description

The method VideoCaptureDeviceFactory::EnumerateDeviceDescriptors() is the asynchronous equivalent of method VideoCaptureDeviceFactory::GetDeviceDescriptors(). Its current implementation delegates to GetDeviceDescriptors() and invokes the callback synchronously. 

It was probably designed like this in order to allow implementations to work asynchronously instead of blocking the calling thread while querying devices. In general, this is a good idea. However, it appears that none of the current implementations provide such an asynchronous implementation. Instead they provide a blocking implementation overriding GetDeviceDescriptors(). 

With that being the case, we could simplify the API and usage by removing 
VideoCaptureDeviceFactory::EnumerateDeviceDescriptors() and letting all clients call GetDeviceDescriptors() directly.
 
chfremer@, If nobody is working on this, can I take this one up?
Yes, please go ahead.
Submitted https://codereview.chromium.org/2805863002/. Please review.
Project Member

Comment 4 by bugdroid1@chromium.org, Apr 10 2017

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

commit 71618f5681772f3d76c8c9c1f7f24490074db4b3
Author: c.padhi <c.padhi@samsung.com>
Date: Mon Apr 10 19:00:00 2017

Remove VideoCaptureDeviceFactory::EnumerateDeviceDescriptors()

The method VideoCaptureDeviceFactory::EnumerateDeviceDescriptors()
is the asynchronous equivalent of method VideoCaptureDeviceFactory
::GetDeviceDescriptors(). Its current implementation delegates to
GetDeviceDescriptors() and invokes the callback synchronously.

This CL removes EnumerateDeviceDescriptors() and lets all clients
call GetDeviceDescriptors() directly.

BUG= 708233 

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

[modify] https://crrev.com/71618f5681772f3d76c8c9c1f7f24490074db4b3/media/capture/video/fake_video_capture_device_unittest.cc
[modify] https://crrev.com/71618f5681772f3d76c8c9c1f7f24490074db4b3/media/capture/video/video_capture_device_descriptor.h
[modify] https://crrev.com/71618f5681772f3d76c8c9c1f7f24490074db4b3/media/capture/video/video_capture_device_factory.cc
[modify] https://crrev.com/71618f5681772f3d76c8c9c1f7f24490074db4b3/media/capture/video/video_capture_device_factory.h
[modify] https://crrev.com/71618f5681772f3d76c8c9c1f7f24490074db4b3/media/capture/video/video_capture_device_unittest.cc
[modify] https://crrev.com/71618f5681772f3d76c8c9c1f7f24490074db4b3/media/capture/video/video_capture_system_impl.cc
[modify] https://crrev.com/71618f5681772f3d76c8c9c1f7f24490074db4b3/media/capture/video/video_capture_system_impl.h

Comment 5 by c.pa...@samsung.com, May 19 2017

Owner: c.pa...@samsung.com
Status: Fixed (was: Available)

Sign in to add a comment