Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(123)

Issue 135683002: Revert 244074 "Eliminate video capture thread in renderer" (Closed)

Created:
6 years, 11 months ago by Nico
Modified:
6 years, 11 months ago
Reviewers:
Alpha Left Google
CC:
chromium-reviews
Visibility:
Public.

Description

Revert 244074 "Eliminate video capture thread in renderer" Caused lots of races on the tsan bot: http://build.chromium.org/p/chromium.memory.fyi/builders/Linux%20Tests%20%28tsan%29%283%29?numbuilds=200 Example: ThreadSanitizer:Race fun:std::_Rb_tree::_M_begin fun:std::_Rb_tree::~_Rb_tree fun:std::map::~map fun:content::VideoCaptureImpl::~VideoCaptureImpl fun:content::MockVideoCaptureImpl::~MockVideoCaptureImpl fun:content::MockVideoCaptureImpl::~MockVideoCaptureImpl fun:linked_ptr::depart fun:linked_ptr::~linked_ptr fun:std::pair::~pair fun:std::pair::~pair fun:__gnu_cxx::new_allocator::destroy fun:std::_Rb_tree::_M_destroy_node fun:std::_Rb_tree::_M_erase fun:std::_Rb_tree::~_Rb_tree fun:std::map::~map fun:content::VideoCaptureImplManager::~VideoCaptureImplManager ThreadSanitizer:Race fun:std::_Rb_tree::_M_begin fun:std::_Rb_tree::~_Rb_tree fun:std::map::~map fun:content::VideoCaptureImpl::~VideoCaptureImpl fun:content::VideoCaptureImplTest::MockVideoCaptureImpl::~MockVideoCaptureImpl fun:content::VideoCaptureImplTest::MockVideoCaptureImpl::~MockVideoCaptureImpl fun:content::VideoCaptureImplTest::~VideoCaptureImplTest fun:content::VideoCaptureImplTest_TwoClientsInSequence_Test::~VideoCaptureImplTest_TwoClientsInSequence_Test fun:content::VideoCaptureImplTest_TwoClientsInSequence_Test::~VideoCaptureImplTest_TwoClientsInSequence_Test fun:testing::Test::DeleteSelf_ > Eliminate 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. > > Review URL: https://codereview.chromium.org/120893002 TBR=hclam@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=244358

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+428 lines, -394 lines) Patch
M trunk/src/content/content_tests.gypi View 1 chunk +0 lines, -1 line 0 comments Download
M trunk/src/content/renderer/media/media_stream_dependency_factory.h View 3 chunks +3 lines, -0 lines 0 comments Download
M trunk/src/content/renderer/media/media_stream_dependency_factory.cc View 3 chunks +4 lines, -1 line 0 comments Download
M trunk/src/content/renderer/media/mock_media_stream_dependency_factory.cc View 1 chunk +1 line, -1 line 0 comments Download
M trunk/src/content/renderer/media/rtc_video_capture_delegate.h View 3 chunks +7 lines, -7 lines 0 comments Download
M trunk/src/content/renderer/media/rtc_video_capture_delegate.cc View 1 chunk +6 lines, -8 lines 0 comments Download
M trunk/src/content/renderer/media/rtc_video_capturer.h View 2 chunks +2 lines, -0 lines 0 comments Download
M trunk/src/content/renderer/media/rtc_video_capturer.cc View 1 chunk +2 lines, -1 line 0 comments Download
M trunk/src/content/renderer/media/video_capture_impl.h View 6 chunks +57 lines, -50 lines 0 comments Download
M trunk/src/content/renderer/media/video_capture_impl.cc View 13 chunks +107 lines, -60 lines 0 comments Download
M trunk/src/content/renderer/media/video_capture_impl_manager.h View 1 chunk +38 lines, -65 lines 0 comments Download
M trunk/src/content/renderer/media/video_capture_impl_manager.cc View 1 chunk +55 lines, -74 lines 0 comments Download
M trunk/src/content/renderer/media/video_capture_impl_unittest.cc View 5 chunks +133 lines, -59 lines 0 comments Download
M trunk/src/content/renderer/pepper/pepper_platform_video_capture.h View 2 chunks +1 line, -2 lines 0 comments Download
M trunk/src/content/renderer/pepper/pepper_platform_video_capture.cc View 3 chunks +8 lines, -2 lines 0 comments Download
M trunk/src/content/renderer/render_thread_impl.h View 1 chunk +2 lines, -2 lines 0 comments Download
M trunk/src/content/renderer/render_thread_impl.cc View 3 chunks +2 lines, -8 lines 0 comments Download
M trunk/src/media/media.gyp View 1 chunk +0 lines, -2 lines 0 comments Download
D trunk/src/media/video/capture/mock_video_capture_event_handler.h View 1 chunk +0 lines, -36 lines 0 comments Download
D trunk/src/media/video/capture/mock_video_capture_event_handler.cc View 1 chunk +0 lines, -15 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
Nico
6 years, 11 months ago (2014-01-11 20:43:13 UTC) #1
Nico
6 years, 11 months ago (2014-01-11 20:43:37 UTC) #2
Message was sent while issue was closed.
Committed patchset #1 manually as r244358.

Powered by Google App Engine
This is Rietveld 408576698