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

Issue 674190 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

Change VideoFrameReceiverOnIOThread to VideoFrameReceiverOnTaskRunner

Project Member Reported by chfremer@chromium.org, Dec 14 2016

Issue description

Instead of using hard-coded 
content::BrowserThread::PostTask(content::BrowserThread::IO, ...
statements, tasks should be posted to a SingleThreadTaskRunner, which would be passed into the constructor of VideoFrameReceiverOnTaskRunner.
 

Comment 1 by c.pa...@samsung.com, Mar 31 2017

Hi,
I am interested in taking up this.

1. Use BrowserThread::GetTaskRunnerForThread (BrowserThread::IO) as the SingleThreadTaskRunner to post the tasks.
2. Instead of passing the SingleThreadTaskRunner to the ctor, it can be stored as a class variable and initialized in the ctor itself.
3. Alternate name for the class rather than VideoFrameReceiverOnTaskRunner. May be VideoFrameReceiverOnIO.

WDYT of the above?

If no one else is working on this, I may proceed.
The advantage of passing a SingleThreadTaskRunner into the constructor is that the class becomes independent of content::BrowserThread. As such, it can be reused in contexts that cannot depend on content::BrowserThread. It would also allow us to move it to a more general location, e.g. into media/capture/video where the VideoFrameReceiver interface is located.

With that in mind, please feel free to start working on this.

Comment 3 Deleted

Thank you for your respone. I understood your point. The idea is to make VideoFrameReceiverOnIOThread more generic.
Uploaded a CL https://codereview.chromium.org/2795663002/. Please take a look.
Project Member

Comment 5 by bugdroid1@chromium.org, Apr 5 2017

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

commit d30d9afc9288d064df6fd9f12543ce5df8f351b5
Author: c.padhi <c.padhi@samsung.com>
Date: Wed Apr 05 19:46:29 2017

Change VideoFrameReceiverOnIOThread to VideoFrameReceiverOnTaskRunner

Currently, VideoFrameReceiverOnIOThread uses hard coded content::
BrowserThread::PostTask(content::BrowserThread::IO, ... to post tasks.
This CL removes such hard coding to make VideoFrameReceiverOnIOThread
more generic by allowing it to post tasks to a SingleThreadTaskRunner.

BUG= 674190 

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

[modify] https://crrev.com/d30d9afc9288d064df6fd9f12543ce5df8f351b5/content/browser/BUILD.gn
[modify] https://crrev.com/d30d9afc9288d064df6fd9f12543ce5df8f351b5/content/browser/renderer_host/media/in_process_buildable_video_capture_device.cc
[modify] https://crrev.com/d30d9afc9288d064df6fd9f12543ce5df8f351b5/content/browser/renderer_host/media/video_capture_controller_unittest.cc
[delete] https://crrev.com/7e64a797f7b6b4fb54536bbbc4c809c4fc6da3e1/content/browser/renderer_host/media/video_frame_receiver_on_io_thread.cc
[delete] https://crrev.com/7e64a797f7b6b4fb54536bbbc4c809c4fc6da3e1/content/browser/renderer_host/media/video_frame_receiver_on_io_thread.h
[modify] https://crrev.com/d30d9afc9288d064df6fd9f12543ce5df8f351b5/media/capture/BUILD.gn
[add] https://crrev.com/d30d9afc9288d064df6fd9f12543ce5df8f351b5/media/capture/video/video_frame_receiver_on_task_runner.cc
[add] https://crrev.com/d30d9afc9288d064df6fd9f12543ce5df8f351b5/media/capture/video/video_frame_receiver_on_task_runner.h

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

Cc: chfremer@chromium.org
Owner: c.pa...@samsung.com
Status: Fixed (was: Available)

Sign in to add a comment