Cleanup: use CancellableTaskTracker iso VideoCaptureManager::CaptureDeviceStartRequest |
||
Issue descriptionThis is a proposed cleanup, to use CancellableTaskTracker [1] instead of VCM::CaptureDeviceStartRequest [2] which is used in a pseudo queue fashion [3] (Start requests can be cancelled before being serviced if DoStopDevice() is called). This pseudo queue (pseudo since the "cancellation" happens in a reverse fashion [4]) is only used on IO thread. [1] https://code.google.com/p/chromium/codesearch#chromium/src/base/task/cancelable_task_tracker.h&sq=package:chromium&type=cs&l=58 [2] https://code.google.com/p/chromium/codesearch#chromium/src/content/browser/renderer_host/media/video_capture_manager.h&sq=package:chromium&type=cs&l=314&rcl=1459179066 [3] https://code.google.com/p/chromium/codesearch#chromium/src/content/browser/renderer_host/media/video_capture_manager.cc&q=device_start_queue_&sq=package:chromium&type=cs&l=297 [4] https://code.google.com/p/chromium/codesearch#chromium/src/content/browser/renderer_host/media/video_capture_manager.cc&q=device_start_queue_&sq=package:chromium&type=cs&l=308
,
Mar 31 2017
After reading CancelableTaskTracker, I am not sure it can be applied here. If I understand correctly, CancelableTaskTracker is meant to allow cancellation of tasks after they have already been posted to a TaskRunner. In the case of |VideoCaptureManager::device_start_request_queue_|, we do not post the next request (task) to a TaskRunner until the previous one has completed. And the reason we do it this way is (probably) because processing the requests requires a roundtrip to another thread (device thread) and we want to avoid having more than one request in flight.
,
Apr 13 2018
|
||
►
Sign in to add a comment |
||
Comment 1 by mcasas@chromium.org
, Mar 28 2016Labels: Hotlist-GoodFirstBug OS-All