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

Issue 594234 link

Starred by 1 user

Issue metadata

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

Blocking:
issue 571155



Sign in to add a comment

[chromecast] Consolidate various media threads into one thread

Project Member Reported by alokp@chromium.org, Mar 11 2016

Issue description

Chromecast media backend implementation (CastMediaShlib and MediaPipelineBackend) expects all calls be made on a single thread. We create chromecast::MediaMessageLoop::thread_ for this purpose.

For chromecast there two other media threads in the browser process:
1. media::AudioManagerBase::audio_thread_
2. media::MojoMediaApplication thread

This results in unnecessary thread hops. If we decide to use AudioOutputStream in mojo pipeline, there will be mojo -> cma -> audio -> cma hops for each frame.

We should have a single media thread to avoid hops and reduce code complexity. This bug is about making media::MojoMediaApplication thread, the universal media thread in the browser process.
 

Comment 1 by alokp@chromium.org, Mar 11 2016

Blocking: 571155

Comment 2 by alokp@chromium.org, Mar 11 2016

Summary: [chromecast] Consolidate various media threads into one thread (was: [chromecast] Fix media thread mess)
It shouldn't be too hard to do this with ALSA audio, but it likely means giving up real time audio performance (WebRTC, WebAudio) since they generally need to deliver buffers immediately when requested by the hardware for ideal operation.

Comment 4 by alokp@chromium.org, Mar 14 2016

I am planning to do this for chromecast only, where it can only help. Currently we have too many threads for media output. There is nothing to be done on other platfor anyways because AFAIK no other platform is using mojo media service in the browser process for media rendering.
Project Member

Comment 5 by bugdroid1@chromium.org, Mar 15 2016

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

commit f4945022d19aaa9a0c70346398f1b2b9e4d64899
Author: alokp <alokp@chromium.org>
Date: Tue Mar 15 19:34:18 2016

AudioManagerBase: Create and run the audio thread lazily.

This allows AudioManagerBase subclasses not have to create an
unnecessary thread if they want to use a different audio task runner.

BUG= 594234 

Review URL: https://codereview.chromium.org/1780333007

Cr-Commit-Position: refs/heads/master@{#381282}

[modify] https://crrev.com/f4945022d19aaa9a0c70346398f1b2b9e4d64899/media/audio/alsa/alsa_output_unittest.cc
[modify] https://crrev.com/f4945022d19aaa9a0c70346398f1b2b9e4d64899/media/audio/audio_low_latency_input_output_unittest.cc
[modify] https://crrev.com/f4945022d19aaa9a0c70346398f1b2b9e4d64899/media/audio/audio_manager.h
[modify] https://crrev.com/f4945022d19aaa9a0c70346398f1b2b9e4d64899/media/audio/audio_manager_base.cc
[modify] https://crrev.com/f4945022d19aaa9a0c70346398f1b2b9e4d64899/media/audio/audio_manager_base.h
[modify] https://crrev.com/f4945022d19aaa9a0c70346398f1b2b9e4d64899/media/audio/audio_output_proxy_unittest.cc
[modify] https://crrev.com/f4945022d19aaa9a0c70346398f1b2b9e4d64899/media/audio/mac/audio_manager_mac.cc
[modify] https://crrev.com/f4945022d19aaa9a0c70346398f1b2b9e4d64899/media/audio/mac/audio_manager_mac.h
[modify] https://crrev.com/f4945022d19aaa9a0c70346398f1b2b9e4d64899/media/audio/mock_audio_manager.cc
[modify] https://crrev.com/f4945022d19aaa9a0c70346398f1b2b9e4d64899/media/audio/mock_audio_manager.h

Project Member

Comment 7 by bugdroid1@chromium.org, Mar 23 2016

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

commit ff847a1068a3e5872d091af9c673bc715771fa5d
Author: alokp <alokp@chromium.org>
Date: Wed Mar 23 17:57:31 2016

[chromecast] Pass media task runner to VideoPlaneController.

This required making VideoPlaneController non-singleton and
passed around wherever required, which is also a good change.

BUG= 594234 

Review URL: https://codereview.chromium.org/1824723003

Cr-Commit-Position: refs/heads/master@{#382877}

[modify] https://crrev.com/ff847a1068a3e5872d091af9c673bc715771fa5d/chromecast/app/cast_main_delegate.cc
[modify] https://crrev.com/ff847a1068a3e5872d091af9c673bc715771fa5d/chromecast/app/cast_main_delegate.h
[modify] https://crrev.com/ff847a1068a3e5872d091af9c673bc715771fa5d/chromecast/browser/cast_browser_main_parts.cc
[modify] https://crrev.com/ff847a1068a3e5872d091af9c673bc715771fa5d/chromecast/browser/cast_browser_main_parts.h
[modify] https://crrev.com/ff847a1068a3e5872d091af9c673bc715771fa5d/chromecast/browser/cast_content_browser_client.cc
[modify] https://crrev.com/ff847a1068a3e5872d091af9c673bc715771fa5d/chromecast/browser/cast_content_browser_client.h
[modify] https://crrev.com/ff847a1068a3e5872d091af9c673bc715771fa5d/chromecast/browser/cast_content_window.cc
[modify] https://crrev.com/ff847a1068a3e5872d091af9c673bc715771fa5d/chromecast/graphics/BUILD.gn
[modify] https://crrev.com/ff847a1068a3e5872d091af9c673bc715771fa5d/chromecast/graphics/cast_screen.cc
[modify] https://crrev.com/ff847a1068a3e5872d091af9c673bc715771fa5d/chromecast/graphics/cast_screen.h
[modify] https://crrev.com/ff847a1068a3e5872d091af9c673bc715771fa5d/chromecast/media/base/video_plane_controller.cc
[modify] https://crrev.com/ff847a1068a3e5872d091af9c673bc715771fa5d/chromecast/media/base/video_plane_controller.h

Project Member

Comment 9 by bugdroid1@chromium.org, Apr 18 2016

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

commit e05981bd06b4694b426990acd41be8ab6d9a1659
Author: alokp <alokp@chromium.org>
Date: Mon Apr 18 22:24:07 2016

Pass task runners to AudioManager constructor.

This patch replaces the internal AudioManagerBase::audio_thread with
an external task runner. The old implementation made it harder to test
and override the internal audio thread.

AudioManagerBase::Shutdown had to complete on the audio thread before
the AudioManager instance could be deleted. It relied on Thread::Stop
on the main thread to wait for the audio thread to shutdown. A subclass
using a different thread shared with other modules could not do that.

Passing a task runner into AudioManager and making GetTaskRunner
non-virtual ensures that the task runner will not change for the
lifetime of AudioManager instance.

BUG= 594234 

Review URL: https://codereview.chromium.org/1806313003

Cr-Commit-Position: refs/heads/master@{#388048}

[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/chromecast/media/audio/cast_audio_manager.cc
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/chromecast/media/audio/cast_audio_manager.h
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/chromecast/media/audio/cast_audio_manager_factory.cc
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/chromecast/media/audio/cast_audio_manager_factory.h
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/chromecast/media/audio/cast_audio_output_stream_unittest.cc
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/components/audio_modem/BUILD.gn
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/components/audio_modem/audio_player_impl.cc
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/components/audio_modem/audio_player_impl.h
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/components/audio_modem/audio_player_unittest.cc
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/components/audio_modem/audio_recorder_impl.cc
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/components/audio_modem/audio_recorder_impl.h
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/components/audio_modem/audio_recorder_unittest.cc
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/content/browser/browser_main_loop.cc
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/content/browser/browser_main_loop.h
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/content/browser/renderer_host/media/audio_input_device_manager_unittest.cc
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/content/browser/renderer_host/media/audio_output_device_enumerator.cc
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/content/browser/renderer_host/media/audio_output_device_enumerator_unittest.cc
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/content/browser/renderer_host/media/audio_renderer_host.cc
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/content/browser/renderer_host/media/audio_renderer_host_unittest.cc
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/content/browser/renderer_host/media/media_stream_manager.cc
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/content/browser/renderer_host/media/media_stream_manager_unittest.cc
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/content/browser/renderer_host/media/video_capture_host_unittest.cc
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/content/browser/renderer_host/render_message_filter.cc
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/content/browser/speech/speech_recognizer_impl_unittest.cc
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/media/audio/alsa/alsa_output_unittest.cc
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/media/audio/alsa/audio_manager_alsa.cc
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/media/audio/alsa/audio_manager_alsa.h
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/media/audio/android/audio_android_unittest.cc
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/media/audio/android/audio_manager_android.cc
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/media/audio/android/audio_manager_android.h
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/media/audio/audio_input_controller_unittest.cc
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/media/audio/audio_input_unittest.cc
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/media/audio/audio_low_latency_input_output_unittest.cc
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/media/audio/audio_manager.cc
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/media/audio/audio_manager.h
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/media/audio/audio_manager_base.cc
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/media/audio/audio_manager_base.h
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/media/audio/audio_manager_factory.h
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/media/audio/audio_manager_factory_unittest.cc
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/media/audio/audio_manager_unittest.cc
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/media/audio/audio_output_controller_unittest.cc
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/media/audio/audio_output_proxy_unittest.cc
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/media/audio/cras/audio_manager_cras.cc
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/media/audio/cras/audio_manager_cras.h
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/media/audio/cras/cras_input_unittest.cc
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/media/audio/cras/cras_unified_unittest.cc
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/media/audio/fake_audio_manager.cc
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/media/audio/fake_audio_manager.h
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/media/audio/linux/audio_manager_linux.cc
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/media/audio/mac/audio_auhal_mac_unittest.cc
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/media/audio/mac/audio_low_latency_input_mac_unittest.cc
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/media/audio/mac/audio_manager_mac.cc
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/media/audio/mac/audio_manager_mac.h
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/media/audio/mock_audio_manager.cc
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/media/audio/mock_audio_manager.h
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/media/audio/pulse/audio_manager_pulse.cc
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/media/audio/pulse/audio_manager_pulse.h
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/media/audio/sounds/audio_stream_handler_unittest.cc
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/media/audio/sounds/sounds_manager_unittest.cc
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/media/audio/win/audio_low_latency_input_win_unittest.cc
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/media/audio/win/audio_low_latency_output_win_unittest.cc
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/media/audio/win/audio_manager_win.cc
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/media/audio/win/audio_manager_win.h
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/media/audio/win/audio_output_win_unittest.cc
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/media/cast/test/receiver.cc
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/media/mojo/services/mojo_media_application.cc
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/media/mojo/services/mojo_media_application.h
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/media/mojo/services/mojo_media_client.cc
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/media/mojo/services/mojo_media_client.h
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/media/mojo/services/test_mojo_media_client.cc
[modify] https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659/media/mojo/services/test_mojo_media_client.h

Project Member

Comment 10 by bugdroid1@chromium.org, Apr 19 2016

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

commit 78655ccbbd314f7ceb4133cd0d395dd35502fdf9
Author: jyasskin <jyasskin@chromium.org>
Date: Tue Apr 19 00:40:35 2016

Revert of Pass task runners to AudioManager constructor. (patchset #50 id:980001 of https://codereview.chromium.org/1806313003/ )

Reason for revert:
Broke TSan: https://build.chromium.org/p/chromium.memory.fyi/builders/Linux%20TSan%20Tests/builds/19362

WARNING: ThreadSanitizer: data race (pid=25863)
  Write of size 8 at 0x0000081b8060 by main thread:
    #0 media::AudioManagerDeleter::operator()(media::AudioManager const*) const media/audio/audio_manager.cc:264:20 (content_browsertests+0x000001e77078)
    #1 reset buildtools/third_party/libc++/trunk/include/memory:2735:13 (content_browsertests+0x000004e5f2af)
    #2 ~unique_ptr buildtools/third_party/libc++/trunk/include/memory:2703 (content_browsertests+0x000004e5f2af)
    #3 content::BrowserMainLoop::~BrowserMainLoop() content/browser/browser_main_loop.cc:428 (content_browsertests+0x000004e5f2af)
    #4 content::BrowserMainLoop::~BrowserMainLoop() content/browser/browser_main_loop.cc:424:37 (content_browsertests+0x000004e5f779)
    #5 operator() buildtools/third_party/libc++/trunk/include/memory:2529:13 (content_browsertests+0x000004e68120)
    #6 reset buildtools/third_party/libc++/trunk/include/memory:2735 (content_browsertests+0x000004e68120)
    #7 content::BrowserMainRunnerImpl::Shutdown() content/browser/browser_main_runner.cc:223 (content_browsertests+0x000004e68120)
    #8 ShellBrowserMain(content::MainFunctionParams const&, std::__1::unique_ptr<content::BrowserMainRunner, std::__1::default_delete<content::BrowserMainRunner> > const&) content/shell/browser/shell_browser_main.cc:33:3 (content_browsertests+0x000000c97ce7)
    #9 content::ShellMainDelegate::RunProcess(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, content::MainFunctionParams const&) content/shell/app/shell_main_delegate.cc:288:16 (content_browsertests+0x000000c8bec4)
    #10 content::RunNamedProcessTypeMain(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, content::MainFunctionParams const&, content::ContentMainDelegate*) content/app/content_main_runner.cc:368:25 (content_browsertests+0x000005558812)
    #11 content::ContentMainRunnerImpl::Run() content/app/content_main_runner.cc:742:12 (content_browsertests+0x000005559511)
    #12 content::ContentMain(content::ContentMainParams const&) content/app/content_main.cc:20:15 (content_browsertests+0x00000555797e)
    #13 content::BrowserTestBase::SetUp() content/public/test/browser_test_base.cc:287:3 (content_browsertests+0x000000c55601)
    #14 content::ContentBrowserTest::SetUp() content/public/test/content_browser_test.cc:92:3 (content_browsertests+0x000000c5e8e6)
    #15 SetUp content/browser/renderer_host/render_widget_host_view_browsertest.cc:221:5 (content_browsertests+0x000000739618)
    #16 content::(anonymous namespace)::CompositingRenderWidgetHostViewBrowserTestTabCapture::SetUp() content/browser/renderer_host/render_widget_host_view_browsertest.cc:403 (content_browsertests+0x000000739618)
    #17 HandleExceptionsInMethodIfSupported<testing::Test, void> testing/gtest/src/gtest.cc:2458:12 (content_browsertests+0x000000f3168d)
    #18 testing::Test::Run() testing/gtest/src/gtest.cc:2470 (content_browsertests+0x000000f3168d)
    #19 testing::TestInfo::Run() testing/gtest/src/gtest.cc:2656:5 (content_browsertests+0x000000f32833)
    #20 testing::TestCase::Run() testing/gtest/src/gtest.cc:2774:5 (content_browsertests+0x000000f33118)
    #21 testing::internal::UnitTestImpl::RunAllTests() testing/gtest/src/gtest.cc:4647:11 (content_browsertests+0x000000f3c562)
    #22 HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool> testing/gtest/src/gtest.cc:2458:12 (content_browsertests+0x000000f3bfc6)
    #23 testing::UnitTest::Run() testing/gtest/src/gtest.cc:4255 (content_browsertests+0x000000f3bfc6)
    #24 RUN_ALL_TESTS testing/gtest/include/gtest/gtest.h:2237:10 (content_browsertests+0x000000d209eb)
    #25 base::TestSuite::Run() base/test/test_suite.cc:230 (content_browsertests+0x000000d209eb)
    #26 content::ContentTestLauncherDelegate::RunTestSuite(int, char**) content/test/content_test_launcher.cc:105:12 (content_browsertests+0x000000c677db)
    #27 content::LaunchTests(content::TestLauncherDelegate*, int, int, char**) content/public/test/test_launcher.cc:517:12 (content_browsertests+0x000000cfb2fc)
    #28 main content/test/content_test_launcher.cc:131:10 (content_browsertests+0x000000c67762)

  Previous read of size 8 at 0x0000081b8060 by thread T15:
    #0 media::(anonymous namespace)::AudioManagerHelper::UpdateLastAudioThreadTimeTick() media/audio/audio_manager.cc:179:5 (content_browsertests+0x000001e77986)
    #1 Run<> base/bind_internal.h:181:12 (content_browsertests+0x000001e77df2)
    #2 MakeItSo<media::(anonymous namespace)::AudioManagerHelper *> base/bind_internal.h:321 (content_browsertests+0x000001e77df2)
    #3 base::internal::Invoker<base::IndexSequence<0ul>, base::internal::BindState<base::internal::RunnableAdapter<void (media::(anonymous namespace)::AudioManagerHelper::*)()>, void (media::(anonymous namespace)::AudioManagerHelper*), base::internal::UnretainedWrapper<media::(anonymous namespace)::AudioManagerHelper> >, base::internal::InvokeHelper<false, void, base::internal::RunnableAdapter<void (media::(anonymous namespace)::AudioManagerHelper::*)()> >, void ()>::Run(base::internal::BindStateBase*) base/bind_internal.h:372 (content_browsertests+0x000001e77df2)
    #4 Run base/callback.h:397:12 (content_browsertests+0x00000111aa7d)
    #5 base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask const&) base/debug/task_annotator.cc:51 (content_browsertests+0x00000111aa7d)
    #6 base::MessageLoop::RunTask(base::PendingTask const&) base/message_loop/message_loop.cc:479:3 (content_browsertests+0x0000010958e6)
    #7 base::MessageLoop::DeferOrRunPendingTask(base::PendingTask const&) base/message_loop/message_loop.cc:488:5 (content_browsertests+0x000001095ecd)
    #8 base::MessageLoop::DoDelayedWork(base::TimeTicks*) base/message_loop/message_loop.cc:638:10 (content_browsertests+0x00000109662a)
    #9 base::MessagePumpDefault::Run(base::MessagePump::Delegate*) base/message_loop/message_pump_default.cc:37:17 (content_browsertests+0x000001099875)
    #10 base::MessageLoop::RunHandler() base/message_loop/message_loop.cc:443:3 (content_browsertests+0x00000109528b)
    #11 base::RunLoop::Run() base/run_loop.cc:35:3 (content_browsertests+0x0000010b5cc6)
    #12 base::MessageLoop::Run() base/message_loop/message_loop.cc:295:3 (content_browsertests+0x000001094a95)
    #13 base::Thread::Run(base::MessageLoop*) base/threading/thread.cc:202:3 (content_browsertests+0x0000010de279)
    #14 base::Thread::ThreadMain() base/threading/thread.cc:254:3 (content_browsertests+0x0000010de449)
    #15 base::(anonymous namespace)::ThreadFunc(void*) base/threading/platform_thread_posix.cc:70:3 (content_browsertests+0x0000010d88bd)

  Location is global 'media::(anonymous namespace)::g_last_created' of size 8 at 0x0000081b8060 (content_browsertests+0x0000081b8060)

  Thread T15 'AudioThread' (tid=25884, running) created by main thread at:
    #0 pthread_create <null> (content_browsertests+0x0000004a15c5)
    #1 base::(anonymous namespace)::CreateThread(unsigned long, bool, base::PlatformThread::Delegate*, base::PlatformThreadHandle*, base::ThreadPriority) base/threading/platform_thread_posix.cc:109:13 (content_browsertests+0x0000010d860a)
    #2 base::PlatformThread::CreateWithPriority(unsigned long, base::PlatformThread::Delegate*, base::PlatformThreadHandle*, base::ThreadPriority) base/threading/platform_thread_posix.cc:190:10 (content_browsertests+0x0000010d8515)
    #3 base::Thread::StartWithOptions(base::Thread::Options const&) base/threading/thread.cc:116:10 (content_browsertests+0x0000010ddfa0)
    #4 base::Thread::Start() base/threading/thread.cc:86:10 (content_browsertests+0x0000010ddde4)
    #5 content::BrowserMainLoop::CreateAudioManager() content/browser/browser_main_loop.cc:1468:3 (content_browsertests+0x000004e665c6)
    #6 content::BrowserMainLoop::BrowserThreadsStarted() content/browser/browser_main_loop.cc:1228:5 (content_browsertests+0x000004e633b5)
    #7 Run<> base/bind_internal.h:181:12 (content_browsertests+0x000004e67612)
    #8 MakeItSo<content::BrowserMainLoop *> base/bind_internal.h:313 (content_browsertests+0x000004e67612)
    #9 base::internal::Invoker<base::IndexSequence<0ul>, base::internal::BindState<base::internal::RunnableAdapter<int (content::BrowserMainLoop::*)()>, int (content::BrowserMainLoop*), base::internal::UnretainedWrapper<content::BrowserMainLoop> >, base::internal::InvokeHelper<false, int, base::internal::RunnableAdapter<int (content::BrowserMainLoop::*)()> >, int ()>::Run(base::internal::BindStateBase*) base/bind_internal.h:372 (content_browsertests+0x000004e67612)
    #10 Run base/callback.h:397:12 (content_browsertests+0x0000050dd941)
    #11 content::StartupTaskRunner::RunAllTasksNow() content/browser/startup_task_runner.cc:45 (content_browsertests+0x0000050dd941)
    #12 content::BrowserMainLoop::CreateStartupTasks() content/browser/browser_main_loop.cc:803:3 (content_browsertests+0x000004e622db)
    #13 content::BrowserMainRunnerImpl::Initialize(content::MainFunctionParams const&) content/browser/browser_main_runner.cc:139:5 (content_browsertests+0x000004e67c63)
    #14 ShellBrowserMain(content::MainFunctionParams const&, std::__1::unique_ptr<content::BrowserMainRunner, std::__1::default_delete<content::BrowserMainRunner> > const&) content/shell/browser/shell_browser_main.cc:23:19 (content_browsertests+0x000000c97ca7)
    #15 content::ShellMainDelegate::RunProcess(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, content::MainFunctionParams const&) content/shell/app/shell_main_delegate.cc:288:16 (content_browsertests+0x000000c8bec4)
    #16 content::RunNamedProcessTypeMain(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, content::MainFunctionParams const&, content::ContentMainDelegate*) content/app/content_main_runner.cc:368:25 (content_browsertests+0x000005558812)
    #17 content::ContentMainRunnerImpl::Run() content/app/content_main_runner.cc:742:12 (content_browsertests+0x000005559511)
    #18 content::ContentMain(content::ContentMainParams const&) content/app/content_main.cc:20:15 (content_browsertests+0x00000555797e)
    #19 content::BrowserTestBase::SetUp() content/public/test/browser_test_base.cc:287:3 (content_browsertests+0x000000c55601)
    #20 content::ContentBrowserTest::SetUp() content/public/test/content_browser_test.cc:92:3 (content_browsertests+0x000000c5e8e6)
    #21 SetUp content/browser/renderer_host/render_widget_host_view_browsertest.cc:221:5 (content_browsertests+0x000000739618)
    #22 content::(anonymous namespace)::CompositingRenderWidgetHostViewBrowserTestTabCapture::SetUp() content/browser/renderer_host/render_widget_host_view_browsertest.cc:403 (content_browsertests+0x000000739618)
    #23 HandleExceptionsInMethodIfSupported<testing::Test, void> testing/gtest/src/gtest.cc:2458:12 (content_browsertests+0x000000f3168d)
    #24 testing::Test::Run() testing/gtest/src/gtest.cc:2470 (content_browsertests+0x000000f3168d)
    #25 testing::TestInfo::Run() testing/gtest/src/gtest.cc:2656:5 (content_browsertests+0x000000f32833)
    #26 testing::TestCase::Run() testing/gtest/src/gtest.cc:2774:5 (content_browsertests+0x000000f33118)
    #27 testing::internal::UnitTestImpl::RunAllTests() testing/gtest/src/gtest.cc:4647:11 (content_browsertests+0x000000f3c562)
    #28 HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool> testing/gtest/src/gtest.cc:2458:12 (content_browsertests+0x000000f3bfc6)
    #29 testing::UnitTest::Run() testing/gtest/src/gtest.cc:4255 (content_browsertests+0x000000f3bfc6)
    #30 RUN_ALL_TESTS testing/gtest/include/gtest/gtest.h:2237:10 (content_browsertests+0x000000d209eb)
    #31 base::TestSuite::Run() base/test/test_suite.cc:230 (content_browsertests+0x000000d209eb)
    #32 content::ContentTestLauncherDelegate::RunTestSuite(int, char**) content/test/content_test_launcher.cc:105:12 (content_browsertests+0x000000c677db)
    #33 content::LaunchTests(content::TestLauncherDelegate*, int, int, char**) content/public/test/test_launcher.cc:517:12 (content_browsertests+0x000000cfb2fc)
    #34 main content/test/content_test_launcher.cc:131:10 (content_browsertests+0x000000c67762)

SUMMARY: ThreadSanitizer: data race media/audio/audio_manager.cc:264:20 in media::AudioManagerDeleter::operator()(media::AudioManager const*) const

Original issue's description:
> Pass task runners to AudioManager constructor.
>
> This patch replaces the internal AudioManagerBase::audio_thread with
> an external task runner. The old implementation made it harder to test
> and override the internal audio thread.
>
> AudioManagerBase::Shutdown had to complete on the audio thread before
> the AudioManager instance could be deleted. It relied on Thread::Stop
> on the main thread to wait for the audio thread to shutdown. A subclass
> using a different thread shared with other modules could not do that.
>
> Passing a task runner into AudioManager and making GetTaskRunner
> non-virtual ensures that the task runner will not change for the
> lifetime of AudioManager instance.
>
> BUG= 594234 
>
> Committed: https://crrev.com/e05981bd06b4694b426990acd41be8ab6d9a1659
> Cr-Commit-Position: refs/heads/master@{#388048}

TBR=dalecurtis@chromium.org,tommi@chromium.org,xhwang@chromium.org,rkc@chromium.org,jam@chromium.org,ckehoe@chromium.org,alokp@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG= 594234 

Review URL: https://codereview.chromium.org/1901583005

Cr-Commit-Position: refs/heads/master@{#388096}

[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/chromecast/media/audio/cast_audio_manager.cc
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/chromecast/media/audio/cast_audio_manager.h
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/chromecast/media/audio/cast_audio_manager_factory.cc
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/chromecast/media/audio/cast_audio_manager_factory.h
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/chromecast/media/audio/cast_audio_output_stream_unittest.cc
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/components/audio_modem/BUILD.gn
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/components/audio_modem/audio_player_impl.cc
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/components/audio_modem/audio_player_impl.h
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/components/audio_modem/audio_player_unittest.cc
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/components/audio_modem/audio_recorder_impl.cc
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/components/audio_modem/audio_recorder_impl.h
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/components/audio_modem/audio_recorder_unittest.cc
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/content/browser/browser_main_loop.cc
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/content/browser/browser_main_loop.h
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/content/browser/renderer_host/media/audio_input_device_manager_unittest.cc
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/content/browser/renderer_host/media/audio_output_device_enumerator.cc
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/content/browser/renderer_host/media/audio_output_device_enumerator_unittest.cc
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/content/browser/renderer_host/media/audio_renderer_host.cc
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/content/browser/renderer_host/media/audio_renderer_host_unittest.cc
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/content/browser/renderer_host/media/media_stream_manager.cc
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/content/browser/renderer_host/media/media_stream_manager_unittest.cc
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/content/browser/renderer_host/media/video_capture_host_unittest.cc
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/content/browser/renderer_host/render_message_filter.cc
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/content/browser/speech/speech_recognizer_impl_unittest.cc
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/media/audio/alsa/alsa_output_unittest.cc
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/media/audio/alsa/audio_manager_alsa.cc
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/media/audio/alsa/audio_manager_alsa.h
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/media/audio/android/audio_android_unittest.cc
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/media/audio/android/audio_manager_android.cc
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/media/audio/android/audio_manager_android.h
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/media/audio/audio_input_controller_unittest.cc
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/media/audio/audio_input_unittest.cc
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/media/audio/audio_low_latency_input_output_unittest.cc
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/media/audio/audio_manager.cc
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/media/audio/audio_manager.h
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/media/audio/audio_manager_base.cc
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/media/audio/audio_manager_base.h
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/media/audio/audio_manager_factory.h
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/media/audio/audio_manager_factory_unittest.cc
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/media/audio/audio_manager_unittest.cc
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/media/audio/audio_output_controller_unittest.cc
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/media/audio/audio_output_proxy_unittest.cc
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/media/audio/cras/audio_manager_cras.cc
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/media/audio/cras/audio_manager_cras.h
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/media/audio/cras/cras_input_unittest.cc
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/media/audio/cras/cras_unified_unittest.cc
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/media/audio/fake_audio_manager.cc
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/media/audio/fake_audio_manager.h
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/media/audio/linux/audio_manager_linux.cc
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/media/audio/mac/audio_auhal_mac_unittest.cc
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/media/audio/mac/audio_low_latency_input_mac_unittest.cc
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/media/audio/mac/audio_manager_mac.cc
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/media/audio/mac/audio_manager_mac.h
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/media/audio/mock_audio_manager.cc
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/media/audio/mock_audio_manager.h
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/media/audio/pulse/audio_manager_pulse.cc
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/media/audio/pulse/audio_manager_pulse.h
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/media/audio/sounds/audio_stream_handler_unittest.cc
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/media/audio/sounds/sounds_manager_unittest.cc
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/media/audio/win/audio_low_latency_input_win_unittest.cc
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/media/audio/win/audio_low_latency_output_win_unittest.cc
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/media/audio/win/audio_manager_win.cc
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/media/audio/win/audio_manager_win.h
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/media/audio/win/audio_output_win_unittest.cc
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/media/cast/test/receiver.cc
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/media/mojo/services/mojo_media_application.cc
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/media/mojo/services/mojo_media_application.h
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/media/mojo/services/mojo_media_client.cc
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/media/mojo/services/mojo_media_client.h
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/media/mojo/services/test_mojo_media_client.cc
[modify] https://crrev.com/78655ccbbd314f7ceb4133cd0d395dd35502fdf9/media/mojo/services/test_mojo_media_client.h

Project Member

Comment 11 by bugdroid1@chromium.org, Apr 19 2016

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

commit 1f4996786dd7ab2e5d7f51c72f9309ee50aeb176
Author: alokp <alokp@chromium.org>
Date: Tue Apr 19 15:26:28 2016

Reland: Pass task runners to AudioManager constructor.

This patch replaces the internal AudioManagerBase::audio_thread with
an external task runner. The old implementation made it harder to test
and override the internal audio thread.

AudioManagerBase::Shutdown had to complete on the audio thread before
the AudioManager instance could be deleted. It relied on Thread::Stop
on the main thread to wait for the audio thread to shutdown. A subclass
using a different thread shared with other modules could not do that.

Passing a task runner into AudioManager and making GetTaskRunner
non-virtual ensures that the task runner will not change for the
lifetime of AudioManager instance.

BUG= 594234 
TBR=rkc,tommi,xhwang,jam,dalecurtis

Review URL: https://codereview.chromium.org/1894373002

Cr-Commit-Position: refs/heads/master@{#388211}

[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/chromecast/media/audio/cast_audio_manager.cc
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/chromecast/media/audio/cast_audio_manager.h
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/chromecast/media/audio/cast_audio_manager_factory.cc
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/chromecast/media/audio/cast_audio_manager_factory.h
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/chromecast/media/audio/cast_audio_output_stream_unittest.cc
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/components/audio_modem/BUILD.gn
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/components/audio_modem/audio_player_impl.cc
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/components/audio_modem/audio_player_impl.h
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/components/audio_modem/audio_player_unittest.cc
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/components/audio_modem/audio_recorder_impl.cc
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/components/audio_modem/audio_recorder_impl.h
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/components/audio_modem/audio_recorder_unittest.cc
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/content/browser/browser_main_loop.cc
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/content/browser/browser_main_loop.h
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/content/browser/renderer_host/media/audio_input_device_manager_unittest.cc
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/content/browser/renderer_host/media/audio_output_device_enumerator.cc
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/content/browser/renderer_host/media/audio_output_device_enumerator_unittest.cc
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/content/browser/renderer_host/media/audio_renderer_host.cc
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/content/browser/renderer_host/media/audio_renderer_host_unittest.cc
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/content/browser/renderer_host/media/media_stream_manager.cc
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/content/browser/renderer_host/media/media_stream_manager_unittest.cc
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/content/browser/renderer_host/media/video_capture_host_unittest.cc
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/content/browser/renderer_host/render_message_filter.cc
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/content/browser/speech/speech_recognizer_impl_unittest.cc
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/media/audio/alsa/alsa_output_unittest.cc
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/media/audio/alsa/audio_manager_alsa.cc
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/media/audio/alsa/audio_manager_alsa.h
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/media/audio/android/audio_android_unittest.cc
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/media/audio/android/audio_manager_android.cc
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/media/audio/android/audio_manager_android.h
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/media/audio/audio_input_controller_unittest.cc
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/media/audio/audio_input_unittest.cc
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/media/audio/audio_low_latency_input_output_unittest.cc
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/media/audio/audio_manager.cc
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/media/audio/audio_manager.h
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/media/audio/audio_manager_base.cc
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/media/audio/audio_manager_base.h
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/media/audio/audio_manager_factory.h
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/media/audio/audio_manager_factory_unittest.cc
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/media/audio/audio_manager_unittest.cc
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/media/audio/audio_output_controller_unittest.cc
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/media/audio/audio_output_proxy_unittest.cc
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/media/audio/cras/audio_manager_cras.cc
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/media/audio/cras/audio_manager_cras.h
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/media/audio/cras/cras_input_unittest.cc
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/media/audio/cras/cras_unified_unittest.cc
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/media/audio/fake_audio_manager.cc
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/media/audio/fake_audio_manager.h
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/media/audio/linux/audio_manager_linux.cc
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/media/audio/mac/audio_auhal_mac_unittest.cc
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/media/audio/mac/audio_low_latency_input_mac_unittest.cc
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/media/audio/mac/audio_manager_mac.cc
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/media/audio/mac/audio_manager_mac.h
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/media/audio/mock_audio_manager.cc
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/media/audio/mock_audio_manager.h
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/media/audio/pulse/audio_manager_pulse.cc
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/media/audio/pulse/audio_manager_pulse.h
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/media/audio/sounds/audio_stream_handler_unittest.cc
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/media/audio/sounds/sounds_manager_unittest.cc
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/media/audio/win/audio_low_latency_input_win_unittest.cc
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/media/audio/win/audio_low_latency_output_win_unittest.cc
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/media/audio/win/audio_manager_win.cc
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/media/audio/win/audio_manager_win.h
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/media/audio/win/audio_output_win_unittest.cc
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/media/cast/test/receiver.cc
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/media/mojo/services/mojo_media_application.cc
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/media/mojo/services/mojo_media_application.h
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/media/mojo/services/mojo_media_client.cc
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/media/mojo/services/mojo_media_client.h
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/media/mojo/services/test_mojo_media_client.cc
[modify] https://crrev.com/1f4996786dd7ab2e5d7f51c72f9309ee50aeb176/media/mojo/services/test_mojo_media_client.h

Project Member

Comment 12 by bugdroid1@chromium.org, Apr 26 2016

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

commit f2f046b64c75438d36ac0b60a8bc6cc382f068a2
Author: alokp <alokp@chromium.org>
Date: Tue Apr 26 00:26:46 2016

Allow content embedders to create AudioManager.

This allows the content embedders to choose the implementation
and task runner for AudioManager instance. Moving the factory
function to ContentBrowserClient eliminates the need for
AudioManagerFactory, which this patch removes as well.

BUG= 594234 

Review URL: https://codereview.chromium.org/1908423006

Cr-Commit-Position: refs/heads/master@{#389633}

[modify] https://crrev.com/f2f046b64c75438d36ac0b60a8bc6cc382f068a2/chromecast/browser/cast_browser_main_parts.cc
[modify] https://crrev.com/f2f046b64c75438d36ac0b60a8bc6cc382f068a2/chromecast/browser/cast_content_browser_client.cc
[modify] https://crrev.com/f2f046b64c75438d36ac0b60a8bc6cc382f068a2/chromecast/browser/cast_content_browser_client.h
[modify] https://crrev.com/f2f046b64c75438d36ac0b60a8bc6cc382f068a2/chromecast/media/audio/BUILD.gn
[delete] https://crrev.com/8aa292dd634877fc41e5844af23d1dee28694f41/chromecast/media/audio/cast_audio_manager_factory.cc
[delete] https://crrev.com/8aa292dd634877fc41e5844af23d1dee28694f41/chromecast/media/audio/cast_audio_manager_factory.h
[modify] https://crrev.com/f2f046b64c75438d36ac0b60a8bc6cc382f068a2/content/browser/browser_main_loop.cc
[modify] https://crrev.com/f2f046b64c75438d36ac0b60a8bc6cc382f068a2/content/public/browser/DEPS
[modify] https://crrev.com/f2f046b64c75438d36ac0b60a8bc6cc382f068a2/content/public/browser/content_browser_client.cc
[modify] https://crrev.com/f2f046b64c75438d36ac0b60a8bc6cc382f068a2/content/public/browser/content_browser_client.h
[modify] https://crrev.com/f2f046b64c75438d36ac0b60a8bc6cc382f068a2/media/audio/BUILD.gn
[modify] https://crrev.com/f2f046b64c75438d36ac0b60a8bc6cc382f068a2/media/audio/audio_manager.cc
[modify] https://crrev.com/f2f046b64c75438d36ac0b60a8bc6cc382f068a2/media/audio/audio_manager.h
[delete] https://crrev.com/8aa292dd634877fc41e5844af23d1dee28694f41/media/audio/audio_manager_factory.h
[delete] https://crrev.com/8aa292dd634877fc41e5844af23d1dee28694f41/media/audio/audio_manager_factory_unittest.cc
[modify] https://crrev.com/f2f046b64c75438d36ac0b60a8bc6cc382f068a2/media/media.gyp

Project Member

Comment 15 by bugdroid1@chromium.org, May 5 2016

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

commit ffd6d8448a8ee5f5b66243c179fc76954bc06991
Author: alokp <alokp@chromium.org>
Date: Thu May 05 21:33:30 2016

Enable content embedders to specify mojo application task runner.

BUG= 594234 

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

[modify] https://crrev.com/ffd6d8448a8ee5f5b66243c179fc76954bc06991/chrome/browser/chrome_content_browser_client.cc
[modify] https://crrev.com/ffd6d8448a8ee5f5b66243c179fc76954bc06991/chromecast/browser/cast_content_browser_client.cc
[modify] https://crrev.com/ffd6d8448a8ee5f5b66243c179fc76954bc06991/content/browser/mojo/mojo_shell_context.cc
[modify] https://crrev.com/ffd6d8448a8ee5f5b66243c179fc76954bc06991/content/browser/mojo/mojo_shell_context.h
[modify] https://crrev.com/ffd6d8448a8ee5f5b66243c179fc76954bc06991/content/child/process_control_impl.cc
[modify] https://crrev.com/ffd6d8448a8ee5f5b66243c179fc76954bc06991/content/child/process_control_impl.h
[modify] https://crrev.com/ffd6d8448a8ee5f5b66243c179fc76954bc06991/content/content_common.gypi
[modify] https://crrev.com/ffd6d8448a8ee5f5b66243c179fc76954bc06991/content/gpu/gpu_process_control_impl.cc
[modify] https://crrev.com/ffd6d8448a8ee5f5b66243c179fc76954bc06991/content/gpu/gpu_process_control_impl.h
[modify] https://crrev.com/ffd6d8448a8ee5f5b66243c179fc76954bc06991/content/public/browser/content_browser_client.h
[add] https://crrev.com/ffd6d8448a8ee5f5b66243c179fc76954bc06991/content/public/common/mojo_application_info.cc
[add] https://crrev.com/ffd6d8448a8ee5f5b66243c179fc76954bc06991/content/public/common/mojo_application_info.h
[modify] https://crrev.com/ffd6d8448a8ee5f5b66243c179fc76954bc06991/content/public/utility/content_utility_client.h
[modify] https://crrev.com/ffd6d8448a8ee5f5b66243c179fc76954bc06991/content/shell/browser/shell_content_browser_client.cc
[modify] https://crrev.com/ffd6d8448a8ee5f5b66243c179fc76954bc06991/content/shell/utility/shell_content_utility_client.cc
[modify] https://crrev.com/ffd6d8448a8ee5f5b66243c179fc76954bc06991/content/utility/utility_process_control_impl.cc
[modify] https://crrev.com/ffd6d8448a8ee5f5b66243c179fc76954bc06991/content/utility/utility_process_control_impl.h

Project Member

Comment 16 by bugdroid1@chromium.org, May 7 2016

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

commit 24e36c4845a886525b260ee1b0b86802d59e768f
Author: alokp <alokp@chromium.org>
Date: Sat May 07 05:18:53 2016

[chromecast] Delete CastMojoMediaApplication.

Use media::MojoMediaApplication instead. CastMojoMediaApplication was
created for the sole purpose of running the media app on cast media
thread. Now that EmbeddedApplicationRunner accepts an existing thread,
there is no need for CastMojoMediaApplication to exist.

BUG= 594234 

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

[modify] https://crrev.com/24e36c4845a886525b260ee1b0b86802d59e768f/chromecast/browser/cast_content_browser_client.cc
[modify] https://crrev.com/24e36c4845a886525b260ee1b0b86802d59e768f/chromecast/browser/media/BUILD.gn
[delete] https://crrev.com/daae653a39fe75fc4b5e73fddf2c8909a9566074/chromecast/browser/media/cast_mojo_media_application.cc
[delete] https://crrev.com/daae653a39fe75fc4b5e73fddf2c8909a9566074/chromecast/browser/media/cast_mojo_media_application.h

Status: Fixed (was: Assigned)

Sign in to add a comment