DescriptionEliminate video capture thread in renderer
The main motivation of this change is to remove the video capture thread
in the renderer. All users of a video capture device already handles the
video frame on their thread. There is no need to call the clients with
an additional thread.
Summary of this change:
* Video capture thread eliminated
VideoCaptureImpl now runs on the IO thread. Clients are called on the
IO thread.
* Simplified VideoCaptureImplManager
We still need to keep this object for the purpose of sharing a
VideoCaptureImpl object with multiple clients. It should own these
objects and maintain the usage count. A couple clean up items are done
on this class:
* It doesn't own the video capture thread now.
* It is now a render thread only object.
* It maintains refcount of a VideoCaptureImpl explicitly.
* It is no longer refcounted.
* Clients access it through RenderThreadImpl. Which ensures usage is
on the render thread.
* New VideoCaptureHandle class
Object of this class is returned by VideoCaptureImplManager to give
access to a media::VideoCapture object. It is purely a wrapper and
helps to do refcounting on the render thread.
Testing:
Added unit tests for VideoCaptureImplManager to test refcounting.
Also updated unit test for VideoCaptureImpl due to the threading
changes.
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=244074
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=244687
Patch Set 1 : mac compile #Patch Set 2 : compile warning #
Total comments: 7
Patch Set 3 : missing file #Patch Set 4 : fixed comments #Patch Set 5 : comments #
Total comments: 51
Patch Set 6 : git cl upload #
Total comments: 25
Patch Set 7 : comments #
Total comments: 9
Patch Set 8 : comments #Patch Set 9 : upload again because of stupid 500 error #Patch Set 10 : merged #Patch Set 11 : merged #Patch Set 12 : revert #Patch Set 13 : test-fix #
Total comments: 2
Patch Set 14 : fixed tsan #
Total comments: 2
Patch Set 15 : git cl upload #Patch Set 16 : upload again #Messages
Total messages: 36 (0 generated)
|