[Media] Clean up AudioRendererSink, fix ownership [chromium/src : main]

0 views
Skip to first unread message

Jordan Bayles (Gerrit)

unread,
Nov 22, 2022, 7:25:58 PM11/22/22
to Dale Curtis, Matthew Wolenetz, Mark Foltz, marinacio...@chromium.org, olka+...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, chfreme...@chromium.org, eric.c...@apple.com, erickun...@chromium.org, feature-me...@chromium.org, jophba...@chromium.org, kinuko...@chromium.org, mfoltz...@chromium.org, poscia...@chromium.org, tommyw+w...@chromium.org, xhwang...@chromium.org

Attention is currently required from: Dale Curtis, Mark Foltz, Matthew Wolenetz.

Jordan Bayles would like Dale Curtis, Matthew Wolenetz and Mark Foltz to review this change.

View Change

[Media] Clean up AudioRendererSink, fix ownership

This patch changes AudioRendererSink to be owned by a std::unique_ptr
instead of a scoped_refptr, clarifying the ownership of this class and
its descendents as well as fixing a variety of bugs and potential bugs
caused by confusing ownership structures.

Of significant note is the changes to the AudioRendererSinkCache, which
now maintains ownership of sinks instead of a complex and confusing ref
counted sharing with callers + garbage collection.

Bug: 151051, 1381431
Change-Id: Icd9bf047810df2441c874263cd28ecb4ad2c839e
---
M components/cast_streaming/renderer/playback_command_forwarding_renderer_factory_unittest.cc
M content/renderer/media/media_factory.cc
M content/renderer/media/renderer_webaudiodevice_impl.cc
M content/renderer/media/renderer_webaudiodevice_impl.h
M content/renderer/media/renderer_webaudiodevice_impl_unittest.cc
M content/renderer/renderer_blink_platform_impl.cc
M content/renderer/renderer_blink_platform_impl.h
M media/audio/BUILD.gn
M media/audio/audio_output_device.cc
M media/audio/audio_output_device.h
M media/audio/audio_output_device_unittest.cc
D media/audio/audio_output_stream_sink.cc
D media/audio/audio_output_stream_sink.h
M media/audio/clockless_audio_sink.cc
M media/audio/clockless_audio_sink.h
M media/audio/null_audio_sink.cc
M media/audio/null_audio_sink.h
M media/base/audio_renderer_mixer.cc
M media/base/audio_renderer_mixer.h
M media/base/audio_renderer_mixer_input.cc
M media/base/audio_renderer_mixer_input.h
M media/base/audio_renderer_mixer_input_unittest.cc
M media/base/audio_renderer_mixer_pool.h
M media/base/audio_renderer_mixer_unittest.cc
M media/base/audio_renderer_sink.h
M media/base/fake_audio_renderer_sink.cc
M media/base/fake_audio_renderer_sink.h
M media/base/mock_audio_renderer_sink.cc
M media/base/mock_audio_renderer_sink.h
M media/base/silent_sink_suspender.cc
M media/base/silent_sink_suspender.h
M media/base/silent_sink_suspender_unittest.cc
M media/mojo/services/test_mojo_media_client.cc
M media/mojo/services/test_mojo_media_client.h
M media/renderers/audio_renderer_impl.cc
M media/renderers/audio_renderer_impl.h
M media/renderers/audio_renderer_impl_unittest.cc
M media/test/pipeline_integration_test_base.cc
M media/test/pipeline_integration_test_base.h
M services/audio/public/cpp/output_device_unittest.cc
M third_party/blink/public/platform/media/web_media_player_builder.h
M third_party/blink/public/platform/platform.h
M third_party/blink/public/platform/web_media_player.h
M third_party/blink/public/platform/webaudiosourceprovider_impl.h
M third_party/blink/public/web/modules/media/audio/audio_device_factory.h
M third_party/blink/renderer/core/exported/web_media_player_impl_unittest.cc
M third_party/blink/renderer/core/html/media/html_media_element.cc
M third_party/blink/renderer/core/html/media/html_media_element.h
M third_party/blink/renderer/modules/media/audio/audio_device_factory.cc
M third_party/blink/renderer/modules/media/audio/audio_renderer_mixer_manager.cc
M third_party/blink/renderer/modules/media/audio/audio_renderer_mixer_manager.h
M third_party/blink/renderer/modules/media/audio/audio_renderer_mixer_manager_test.cc
M third_party/blink/renderer/modules/media/audio/audio_renderer_sink_cache.cc
M third_party/blink/renderer/modules/media/audio/audio_renderer_sink_cache.h
M third_party/blink/renderer/modules/media/audio/audio_renderer_sink_cache_test.cc
M third_party/blink/renderer/modules/mediacapturefromelement/html_audio_element_capturer_source.cc
M third_party/blink/renderer/modules/mediacapturefromelement/html_audio_element_capturer_source.h
M third_party/blink/renderer/modules/mediacapturefromelement/html_audio_element_capturer_source_unittest.cc
M third_party/blink/renderer/modules/mediastream/track_audio_renderer.cc
M third_party/blink/renderer/modules/mediastream/track_audio_renderer.h
M third_party/blink/renderer/modules/mediastream/track_audio_renderer_test.cc
M third_party/blink/renderer/modules/peerconnection/webrtc_audio_renderer_test.cc
M third_party/blink/renderer/modules/webrtc/webrtc_audio_renderer.cc
M third_party/blink/renderer/modules/webrtc/webrtc_audio_renderer.h
M third_party/blink/renderer/platform/media/web_media_player_builder.cc
M third_party/blink/renderer/platform/media/web_media_player_impl.cc
M third_party/blink/renderer/platform/media/web_media_player_impl.h
M third_party/blink/renderer/platform/media/webaudiosourceprovider_impl.cc
M third_party/blink/renderer/platform/media/webaudiosourceprovider_impl_test.cc
69 files changed, 889 insertions(+), 1,352 deletions(-)


To view, visit change 4044524. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Icd9bf047810df2441c874263cd28ecb4ad2c839e
Gerrit-Change-Number: 4044524
Gerrit-PatchSet: 5
Gerrit-Owner: Jordan Bayles <jop...@chromium.org>
Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
Gerrit-Reviewer: Jordan Bayles <jop...@chromium.org>
Gerrit-Reviewer: Mark Foltz <mfo...@chromium.org>
Gerrit-Reviewer: Matthew Wolenetz <wole...@chromium.org>
Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
Gerrit-Attention: Dale Curtis <dalec...@chromium.org>
Gerrit-Attention: Matthew Wolenetz <wole...@chromium.org>
Gerrit-Attention: Mark Foltz <mfo...@chromium.org>
Gerrit-MessageType: newchange

Jordan Bayles (Gerrit)

unread,
Nov 22, 2022, 7:26:52 PM11/22/22
to Kentaro Hara, Ryan Keane, marinacio...@chromium.org, olka+...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, chfreme...@chromium.org, eric.c...@apple.com, erickun...@chromium.org, feature-me...@chromium.org, jophba...@chromium.org, kinuko...@chromium.org, mfoltz...@chromium.org, poscia...@chromium.org, tommyw+w...@chromium.org, xhwang...@chromium.org, Mark Foltz, Matthew Wolenetz, Dale Curtis

Attention is currently required from: Dale Curtis, Kentaro Hara, Mark Foltz, Matthew Wolenetz, Ryan Keane.

Jordan Bayles would like Kentaro Hara and Ryan Keane to review this change.

Gerrit-Reviewer: Kentaro Hara <har...@chromium.org>
Gerrit-Reviewer: Mark Foltz <mfo...@chromium.org>
Gerrit-Reviewer: Matthew Wolenetz <wole...@chromium.org>
Gerrit-Reviewer: Ryan Keane <rwk...@google.com>
Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
Gerrit-Attention: Kentaro Hara <har...@chromium.org>
Gerrit-Attention: Dale Curtis <dalec...@chromium.org>
Gerrit-Attention: Matthew Wolenetz <wole...@chromium.org>
Gerrit-Attention: Ryan Keane <rwk...@google.com>

Jordan Bayles (Gerrit)

unread,
Nov 22, 2022, 7:27:51 PM11/22/22
to marinacio...@chromium.org, olka+...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, chfreme...@chromium.org, eric.c...@apple.com, erickun...@chromium.org, feature-me...@chromium.org, jophba...@chromium.org, kinuko...@chromium.org, mfoltz...@chromium.org, poscia...@chromium.org, tommyw+w...@chromium.org, xhwang...@chromium.org, Mark Foltz, Matthew Wolenetz, Dale Curtis, Chromium LUCI CQ, Tricium, chromium...@chromium.org, Rijubrata Bhaumik, srirama chandra sekhar

Attention is currently required from: Dale Curtis, Mark Foltz, Matthew Wolenetz.

View Change

1 comment:

  • Patchset:

    • Patch Set #5:

      Doing this as a code health rotation task.

      Please LMK if I need to split this up, all of the changes cascaded from making the change to media/base/aduio_renderer_sink.h.

      PTAL.

To view, visit change 4044524. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Icd9bf047810df2441c874263cd28ecb4ad2c839e
Gerrit-Change-Number: 4044524
Gerrit-PatchSet: 5
Gerrit-Owner: Jordan Bayles <jop...@chromium.org>
Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
Gerrit-Reviewer: Jordan Bayles <jop...@chromium.org>
Gerrit-Reviewer: Mark Foltz <mfo...@chromium.org>
Gerrit-Reviewer: Matthew Wolenetz <wole...@chromium.org>
Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
Gerrit-Attention: Dale Curtis <dalec...@chromium.org>
Gerrit-Attention: Matthew Wolenetz <wole...@chromium.org>
Gerrit-Attention: Mark Foltz <mfo...@chromium.org>
Gerrit-Comment-Date: Wed, 23 Nov 2022 00:25:55 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment

Jordan Bayles (Gerrit)

unread,
Nov 22, 2022, 7:29:07 PM11/22/22
to marinacio...@chromium.org, olka+...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, chfreme...@chromium.org, eric.c...@apple.com, erickun...@chromium.org, feature-me...@chromium.org, jophba...@chromium.org, kinuko...@chromium.org, mfoltz...@chromium.org, poscia...@chromium.org, tommyw+w...@chromium.org, xhwang...@chromium.org, Ryan Keane, Kentaro Hara, Mark Foltz, Matthew Wolenetz, Dale Curtis, Chromium LUCI CQ, Tricium, chromium...@chromium.org, Rijubrata Bhaumik, srirama chandra sekhar

Attention is currently required from: Dale Curtis, Kentaro Hara, Mark Foltz, Matthew Wolenetz, Ryan Keane.

View Change

1 comment:

  • Patchset:

    • Patch Set #5:

      Also would appreciate any pointers on manual testing to ensure this doesn't introduce any regressions.

To view, visit change 4044524. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Icd9bf047810df2441c874263cd28ecb4ad2c839e
Gerrit-Change-Number: 4044524
Gerrit-PatchSet: 5
Gerrit-Owner: Jordan Bayles <jop...@chromium.org>
Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
Gerrit-Reviewer: Jordan Bayles <jop...@chromium.org>
Gerrit-Reviewer: Kentaro Hara <har...@chromium.org>
Gerrit-Reviewer: Mark Foltz <mfo...@chromium.org>
Gerrit-Reviewer: Matthew Wolenetz <wole...@chromium.org>
Gerrit-Reviewer: Ryan Keane <rwk...@google.com>
Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
Gerrit-Attention: Kentaro Hara <har...@chromium.org>
Gerrit-Attention: Dale Curtis <dalec...@chromium.org>
Gerrit-Attention: Matthew Wolenetz <wole...@chromium.org>
Gerrit-Attention: Ryan Keane <rwk...@google.com>
Gerrit-Attention: Mark Foltz <mfo...@chromium.org>
Gerrit-Comment-Date: Wed, 23 Nov 2022 00:27:12 +0000

Jordan Bayles (Gerrit)

unread,
Nov 23, 2022, 3:44:30 AM11/23/22
to marinacio...@chromium.org, olka+...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, chfreme...@chromium.org, eric.c...@apple.com, erickun...@chromium.org, feature-me...@chromium.org, jophba...@chromium.org, kinuko...@chromium.org, mfoltz...@chromium.org, poscia...@chromium.org, tommyw+w...@chromium.org, xhwang...@chromium.org, Ryan Keane, Kentaro Hara, Mark Foltz, Matthew Wolenetz, Dale Curtis, Chromium LUCI CQ, Tricium, chromium...@chromium.org, Rijubrata Bhaumik, srirama chandra sekhar

Patch set 6:Commit-Queue +1

View Change

8 comments:

To view, visit change 4044524. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Icd9bf047810df2441c874263cd28ecb4ad2c839e
Gerrit-Change-Number: 4044524
Gerrit-PatchSet: 6
Gerrit-Owner: Jordan Bayles <jop...@chromium.org>
Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
Gerrit-Reviewer: Jordan Bayles <jop...@chromium.org>
Gerrit-Reviewer: Kentaro Hara <har...@chromium.org>
Gerrit-Reviewer: Mark Foltz <mfo...@chromium.org>
Gerrit-Reviewer: Matthew Wolenetz <wole...@chromium.org>
Gerrit-Reviewer: Ryan Keane <rwk...@google.com>
Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
Gerrit-Comment-Date: Wed, 23 Nov 2022 08:41:58 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment

Olga Sharonova (Gerrit)

unread,
Nov 23, 2022, 4:03:25 AM11/23/22
to Jordan Bayles, marinacio...@chromium.org, olka+...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, chfreme...@chromium.org, eric.c...@apple.com, erickun...@chromium.org, feature-me...@chromium.org, jophba...@chromium.org, kinuko...@chromium.org, mfoltz...@chromium.org, poscia...@chromium.org, tommyw+w...@chromium.org, xhwang...@chromium.org, Ryan Keane, Kentaro Hara, Mark Foltz, Matthew Wolenetz, Dale Curtis, Chromium LUCI CQ, Tricium, chromium...@chromium.org, Rijubrata Bhaumik, srirama chandra sekhar

Attention is currently required from: Jordan Bayles.

View Change

4 comments:

  • Patchset:

    • Patch Set #6:

      I'll be happy to see a switch from ref counting to unique_ptr, but there is more to it than changing a pointer type. The current approach breaks AudioOutputDevice implementations.

  • File media/audio/audio_output_device.cc:

    • Patch Set #6, Line 82: base::Unretained(this), params, std::ref(callback)));

      Throughout the whole file: Since AOD is changed to unique pointer, this cannot be posted unretained: AOD is destroyed on another thread and the destructor can race with IO thread operations.

    • Patch Set #6, Line 86:

        TRACE_EVENT0("audio", "AudioOutputDevice::Stop");
      io_task_runner_->PostTask(
      FROM_HERE, base::BindOnce(&AudioOutputDevice::ShutDownOnIOThread,
      base::Unretained(this)));

      This made Stop() async and thus broke the contract "no callbacks from the rendering sink will come after Stop() exits".

  • File third_party/blink/renderer/modules/webrtc/webrtc_audio_renderer.h:

    • Patch Set #6, Line 364: media::AudioParameters audio_params_;

      Could you avoid this rename please? The there are vraious parameters involved in WebRTC audio rendering,

To view, visit change 4044524. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Icd9bf047810df2441c874263cd28ecb4ad2c839e
Gerrit-Change-Number: 4044524
Gerrit-PatchSet: 6
Gerrit-Owner: Jordan Bayles <jop...@chromium.org>
Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
Gerrit-Reviewer: Jordan Bayles <jop...@chromium.org>
Gerrit-Reviewer: Kentaro Hara <har...@chromium.org>
Gerrit-Reviewer: Mark Foltz <mfo...@chromium.org>
Gerrit-Reviewer: Matthew Wolenetz <wole...@chromium.org>
Gerrit-Reviewer: Olga Sharonova <ol...@chromium.org>
Gerrit-Reviewer: Ryan Keane <rwk...@google.com>
Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
Gerrit-Attention: Jordan Bayles <jop...@chromium.org>
Gerrit-Comment-Date: Wed, 23 Nov 2022 09:00:46 +0000

Olga Sharonova (Gerrit)

unread,
Nov 23, 2022, 7:43:00 AM11/23/22
to Jordan Bayles, marinacio...@chromium.org, olka+...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, chfreme...@chromium.org, eric.c...@apple.com, erickun...@chromium.org, feature-me...@chromium.org, jophba...@chromium.org, kinuko...@chromium.org, mfoltz...@chromium.org, poscia...@chromium.org, tommyw+w...@chromium.org, xhwang...@chromium.org, Ryan Keane, Kentaro Hara, Mark Foltz, Matthew Wolenetz, Dale Curtis, Chromium LUCI CQ, Tricium, chromium...@chromium.org, Rijubrata Bhaumik, srirama chandra sekhar

Attention is currently required from: Jordan Bayles.

View Change

1 comment:

  • File third_party/blink/renderer/modules/media/audio/audio_renderer_sink_cache.h:

    • Patch Set #6, Line 66: scoped_refptr<media::AudioRendererSink> GetSink(

      Would be nice to remove unused methods of the cache in a separate CL instead.

To view, visit change 4044524. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Icd9bf047810df2441c874263cd28ecb4ad2c839e
Gerrit-Change-Number: 4044524
Gerrit-PatchSet: 6
Gerrit-Owner: Jordan Bayles <jop...@chromium.org>
Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
Gerrit-Reviewer: Jordan Bayles <jop...@chromium.org>
Gerrit-Reviewer: Kentaro Hara <har...@chromium.org>
Gerrit-Reviewer: Mark Foltz <mfo...@chromium.org>
Gerrit-Reviewer: Matthew Wolenetz <wole...@chromium.org>
Gerrit-Reviewer: Olga Sharonova <ol...@chromium.org>
Gerrit-Reviewer: Ryan Keane <rwk...@google.com>
Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
Gerrit-Attention: Jordan Bayles <jop...@chromium.org>
Gerrit-Comment-Date: Wed, 23 Nov 2022 12:39:54 +0000

Ryan Keane (Gerrit)

unread,
Nov 23, 2022, 5:33:05 PM11/23/22
to Jordan Bayles, marinacio...@chromium.org, olka+...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, chfreme...@chromium.org, eric.c...@apple.com, erickun...@chromium.org, feature-me...@chromium.org, jophba...@chromium.org, kinuko...@chromium.org, mfoltz...@chromium.org, poscia...@chromium.org, tommyw+w...@chromium.org, xhwang...@chromium.org, Olga Sharonova, Kentaro Hara, Mark Foltz, Matthew Wolenetz, Dale Curtis, Chromium LUCI CQ, Tricium, chromium...@chromium.org, Rijubrata Bhaumik, srirama chandra sekhar

Attention is currently required from: Jordan Bayles.

Patch set 6:Code-Review +1

View Change

3 comments:

  • Patchset:

  • File content/renderer/media/renderer_webaudiodevice_impl.cc:

  • File media/renderers/audio_renderer_impl.cc:

    • Patch Set #6, Line 88:

        if (sink_)
      sink_->Stop();

      Why were we never hitting a nullref here before? Should this be a DCHECK?

To view, visit change 4044524. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Icd9bf047810df2441c874263cd28ecb4ad2c839e
Gerrit-Change-Number: 4044524
Gerrit-PatchSet: 6
Gerrit-Owner: Jordan Bayles <jop...@chromium.org>
Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
Gerrit-Reviewer: Jordan Bayles <jop...@chromium.org>
Gerrit-Reviewer: Kentaro Hara <har...@chromium.org>
Gerrit-Reviewer: Mark Foltz <mfo...@chromium.org>
Gerrit-Reviewer: Matthew Wolenetz <wole...@chromium.org>
Gerrit-Reviewer: Olga Sharonova <ol...@chromium.org>
Gerrit-Reviewer: Ryan Keane <rwk...@google.com>
Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
Gerrit-Attention: Jordan Bayles <jop...@chromium.org>
Gerrit-Comment-Date: Wed, 23 Nov 2022 22:30:45 +0000

Jordan Bayles (Gerrit)

unread,
Nov 29, 2022, 6:38:05 PM11/29/22
to marinacio...@chromium.org, olka+...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, chfreme...@chromium.org, eric.c...@apple.com, erickun...@chromium.org, feature-me...@chromium.org, jophba...@chromium.org, kinuko...@chromium.org, mfoltz...@chromium.org, poscia...@chromium.org, tommyw+w...@chromium.org, xhwang...@chromium.org, Ryan Keane, Olga Sharonova, Kentaro Hara, Mark Foltz, Matthew Wolenetz, Dale Curtis, Chromium LUCI CQ, Tricium, chromium...@chromium.org, Rijubrata Bhaumik, srirama chandra sekhar

Attention is currently required from: Olga Sharonova, Ryan Keane.

Patch set 7:Commit-Queue +1

View Change

6 comments:

  • Patchset:

    • Patch Set #7:

      I agree I put too many refactors in this patch, I have pulled out refactors not directly relevant to the core change from scoped_refptr to std::unique_ptr and the patch is now 1/3 smaller.

       I'll add attentions back when the CQ tests succeed.
  • File content/renderer/media/renderer_webaudiodevice_impl.cc:

    • Good point. I think I should have split that up in a separate patch--initialize is no longer necessary but it's not related to the primary change in this patch.

  • File media/audio/audio_output_device.cc:

    • Throughout the whole file: Since AOD is changed to unique pointer, this cannot be posted unretained: […]

      Done

    • Patch Set #6, Line 86:

        TRACE_EVENT0("audio", "AudioOutputDevice::Stop");
      io_task_runner_->PostTask(
      FROM_HERE, base::BindOnce(&AudioOutputDevice::ShutDownOnIOThread,
      base::Unretained(this)));

    • This made Stop() async and thus broke the contract "no callbacks from the rendering sink will come a […]

      Done

  • File media/renderers/audio_renderer_impl.cc:

    • Patch Set #6, Line 88:

        if (sink_)
      sink_->Stop();

      Why were we never hitting a nullref here before? Should this be a DCHECK?

    • Done

  • File third_party/blink/renderer/modules/webrtc/webrtc_audio_renderer.h:

    • Could you avoid this rename please? The there are vraious parameters involved in WebRTC audio render […]

      Fair enough. It's confusing in the impl file due to AudioSinkParameters.

To view, visit change 4044524. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Icd9bf047810df2441c874263cd28ecb4ad2c839e
Gerrit-Change-Number: 4044524
Gerrit-PatchSet: 7
Gerrit-Owner: Jordan Bayles <jop...@chromium.org>
Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
Gerrit-Reviewer: Jordan Bayles <jop...@chromium.org>
Gerrit-Reviewer: Kentaro Hara <har...@chromium.org>
Gerrit-Reviewer: Mark Foltz <mfo...@chromium.org>
Gerrit-Reviewer: Matthew Wolenetz <wole...@chromium.org>
Gerrit-Reviewer: Olga Sharonova <ol...@chromium.org>
Gerrit-Reviewer: Ryan Keane <rwk...@google.com>
Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
Gerrit-Attention: Olga Sharonova <ol...@chromium.org>
Gerrit-Attention: Ryan Keane <rwk...@google.com>
Gerrit-Comment-Date: Tue, 29 Nov 2022 23:35:26 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Ryan Keane <rwk...@google.com>
Comment-In-Reply-To: Olga Sharonova <ol...@chromium.org>
Gerrit-MessageType: comment

Jordan Bayles (Gerrit)

unread,
Nov 29, 2022, 6:39:07 PM11/29/22
to marinacio...@chromium.org, olka+...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, chfreme...@chromium.org, eric.c...@apple.com, erickun...@chromium.org, feature-me...@chromium.org, jophba...@chromium.org, kinuko...@chromium.org, mfoltz...@chromium.org, poscia...@chromium.org, tommyw+w...@chromium.org, xhwang...@chromium.org, Ryan Keane, Olga Sharonova, Kentaro Hara, Mark Foltz, Matthew Wolenetz, Dale Curtis, Chromium LUCI CQ, Tricium, chromium...@chromium.org, Rijubrata Bhaumik, srirama chandra sekhar

Attention is currently required from: Olga Sharonova, Ryan Keane.

View Change

1 comment:

  • File third_party/blink/renderer/modules/media/audio/audio_renderer_sink_cache.h:

    • Patch Set #6, Line 66: scoped_refptr<media::AudioRendererSink> GetSink(

      Would be nice to remove unused methods of the cache in a separate CL instead.

    • It's not exactly removed, just had to refactor due to no longer used scoped_refptr. I've kept it public to minimize the diff.

To view, visit change 4044524. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Icd9bf047810df2441c874263cd28ecb4ad2c839e
Gerrit-Change-Number: 4044524
Gerrit-PatchSet: 7
Gerrit-Owner: Jordan Bayles <jop...@chromium.org>
Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
Gerrit-Reviewer: Jordan Bayles <jop...@chromium.org>
Gerrit-Reviewer: Kentaro Hara <har...@chromium.org>
Gerrit-Reviewer: Mark Foltz <mfo...@chromium.org>
Gerrit-Reviewer: Matthew Wolenetz <wole...@chromium.org>
Gerrit-Reviewer: Olga Sharonova <ol...@chromium.org>
Gerrit-Reviewer: Ryan Keane <rwk...@google.com>
Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
Gerrit-Attention: Olga Sharonova <ol...@chromium.org>
Gerrit-Attention: Ryan Keane <rwk...@google.com>
Gerrit-Comment-Date: Tue, 29 Nov 2022 23:36:15 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No

Olga Sharonova (Gerrit)

unread,
Nov 30, 2022, 8:51:13 AM11/30/22
to Jordan Bayles, marinacio...@chromium.org, olka+...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, chfreme...@chromium.org, eric.c...@apple.com, erickun...@chromium.org, feature-me...@chromium.org, jophba...@chromium.org, kinuko...@chromium.org, mfoltz...@chromium.org, poscia...@chromium.org, tommyw+w...@chromium.org, xhwang...@chromium.org, Ryan Keane, Kentaro Hara, Mark Foltz, Matthew Wolenetz, Dale Curtis, Chromium LUCI CQ, Tricium, chromium...@chromium.org, Rijubrata Bhaumik, srirama chandra sekhar

Attention is currently required from: Jordan Bayles, Ryan Keane.

View Change

4 comments:

  • File media/audio/audio_output_device.cc:

    • Patch Set #7, Line 52: base::BindOnce(&AudioOutputDevice::InitializeOnIOThread, AsWeakPtr(),

      The weak ptr factory must be destroyed on a thread its weak pointers are accessed on, so we need to think of a way to safely destroy AudioOutputDevice. For example, one way would be to extract "AudioOutputDeviceDelegate" object which would be accessed and destroyed on IO thread, another way - to use a custom deleter; there are likely other options.

  • File media/audio/audio_output_stream_sink.h:

  • File third_party/blink/renderer/modules/media/audio/audio_renderer_sink_cache.h:

    • Patch Set #7, Line 66: scoped_refptr<media::AudioRendererSink> GetSink(

      If I understand correctly, this method is not used anywhere. Could you remove it in a separate CL?

  • File third_party/blink/renderer/platform/media/web_media_player_impl.cc:

To view, visit change 4044524. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Icd9bf047810df2441c874263cd28ecb4ad2c839e
Gerrit-Change-Number: 4044524
Gerrit-PatchSet: 7
Gerrit-Owner: Jordan Bayles <jop...@chromium.org>
Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
Gerrit-Reviewer: Jordan Bayles <jop...@chromium.org>
Gerrit-Reviewer: Kentaro Hara <har...@chromium.org>
Gerrit-Reviewer: Mark Foltz <mfo...@chromium.org>
Gerrit-Reviewer: Matthew Wolenetz <wole...@chromium.org>
Gerrit-Reviewer: Olga Sharonova <ol...@chromium.org>
Gerrit-Reviewer: Ryan Keane <rwk...@google.com>
Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
Gerrit-Attention: Jordan Bayles <jop...@chromium.org>
Gerrit-Attention: Ryan Keane <rwk...@google.com>
Gerrit-Comment-Date: Wed, 30 Nov 2022 13:48:41 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment

Jordan Bayles (Gerrit)

unread,
Nov 30, 2022, 7:11:56 PM11/30/22
to marinacio...@chromium.org, olka+...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, chfreme...@chromium.org, eric.c...@apple.com, erickun...@chromium.org, feature-me...@chromium.org, jophba...@chromium.org, kinuko...@chromium.org, mfoltz...@chromium.org, poscia...@chromium.org, tommyw+w...@chromium.org, xhwang...@chromium.org, Ryan Keane, Olga Sharonova, Kentaro Hara, Mark Foltz, Matthew Wolenetz, Dale Curtis, Chromium LUCI CQ, Tricium, chromium...@chromium.org, Rijubrata Bhaumik, srirama chandra sekhar

Attention is currently required from: Olga Sharonova.

Patch set 8:Commit-Queue +1

View Change

6 comments:

    • (Lint observed on `android-clang-tidy-rel`, `linux-chromeos-clang-tidy-rel`, and `linux-clang-tidy-rel`)

    • Please fix.

  • File media/audio/audio_output_device.cc:

    • The weak ptr factory must be destroyed on a thread its weak pointers are accessed on, so we need to […]

      Done

  • File media/audio/audio_output_stream_sink.h:

    • If I understand correctly, this method is not used anywhere. […]

      Happy to remove it later. It has to be refactored due to using scoped_refptr in this patch however.

  • File third_party/blink/renderer/platform/media/web_media_player_impl.cc:

    • |audio_source_provider_| […]

      Done

To view, visit change 4044524. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Icd9bf047810df2441c874263cd28ecb4ad2c839e
Gerrit-Change-Number: 4044524
Gerrit-PatchSet: 8
Gerrit-Owner: Jordan Bayles <jop...@chromium.org>
Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
Gerrit-Reviewer: Jordan Bayles <jop...@chromium.org>
Gerrit-Reviewer: Kentaro Hara <har...@chromium.org>
Gerrit-Reviewer: Mark Foltz <mfo...@chromium.org>
Gerrit-Reviewer: Matthew Wolenetz <wole...@chromium.org>
Gerrit-Reviewer: Olga Sharonova <ol...@chromium.org>
Gerrit-Reviewer: Ryan Keane <rwk...@google.com>
Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
Gerrit-Attention: Olga Sharonova <ol...@chromium.org>
Gerrit-Comment-Date: Thu, 01 Dec 2022 00:09:06 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes

Olga Sharonova (Gerrit)

unread,
Dec 1, 2022, 4:24:27 AM12/1/22
to Jordan Bayles, marinacio...@chromium.org, olka+...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, chfreme...@chromium.org, eric.c...@apple.com, erickun...@chromium.org, feature-me...@chromium.org, jophba...@chromium.org, kinuko...@chromium.org, mfoltz...@chromium.org, poscia...@chromium.org, tommyw+w...@chromium.org, xhwang...@chromium.org, Ryan Keane, Kentaro Hara, Mark Foltz, Matthew Wolenetz, Dale Curtis, Chromium LUCI CQ, Tricium, chromium...@chromium.org, Rijubrata Bhaumik, srirama chandra sekhar

Attention is currently required from: Jordan Bayles.

View Change

2 comments:

  • File media/audio/audio_output_device.h:

    • Patch Set #8, Line 96: : public AudioOutputIPCDelegate,

      Could you flip the naming around? Delegate is usually an internal class, the owner delegates the calls to the delegate on a given thread and takes care of destroying it on that thread.

      Here you changed the whole meaning of AudioOutputDevice, which makes the change counterintuitive for everybody familiar with this code. Also, we have AudioInputDevice, so we want the naming to be consistent.

  • File third_party/blink/renderer/modules/media/audio/audio_renderer_sink_cache.h:

To view, visit change 4044524. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Icd9bf047810df2441c874263cd28ecb4ad2c839e
Gerrit-Change-Number: 4044524
Gerrit-PatchSet: 8
Gerrit-Owner: Jordan Bayles <jop...@chromium.org>
Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
Gerrit-Reviewer: Jordan Bayles <jop...@chromium.org>
Gerrit-Reviewer: Kentaro Hara <har...@chromium.org>
Gerrit-Reviewer: Mark Foltz <mfo...@chromium.org>
Gerrit-Reviewer: Matthew Wolenetz <wole...@chromium.org>
Gerrit-Reviewer: Olga Sharonova <ol...@chromium.org>
Gerrit-Reviewer: Ryan Keane <rwk...@google.com>
Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
Gerrit-Attention: Jordan Bayles <jop...@chromium.org>
Gerrit-Comment-Date: Thu, 01 Dec 2022 09:21:48 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Jordan Bayles <jop...@chromium.org>

Olga Sharonova (Gerrit)

unread,
Dec 1, 2022, 8:30:45 AM12/1/22
to marinacio...@chromium.org, olka+...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, chfreme...@chromium.org, eric.c...@apple.com, erickun...@chromium.org, feature-me...@chromium.org, jophba...@chromium.org, kinuko...@chromium.org, mfoltz...@chromium.org, poscia...@chromium.org, tommyw+w...@chromium.org, xhwang...@chromium.org, Fredrik Hernqvist, Jordan Bayles, Ryan Keane, Kentaro Hara, Mark Foltz, Matthew Wolenetz, Dale Curtis

Attention is currently required from: Jordan Bayles.

Jordan Bayles has uploaded this change for review.

View Change

[Media] Clean up AudioRendererSink, fix ownership

This patch changes AudioRendererSink to be owned by a std::unique_ptr
instead of a scoped_refptr, clarifying the ownership of this class and
its descendents as well as fixing a variety of bugs and potential bugs
caused by confusing ownership structures.

Of significant note is the changes to the AudioRendererSinkCache, which
now maintains ownership of sinks instead of a complex and confusing ref
counted sharing with callers + garbage collection.

Bug: 151051, 1381431
Change-Id: Icd9bf047810df2441c874263cd28ecb4ad2c839e
---
M chromecast/media/audio/cast_audio_device_factory.cc
M chromecast/media/audio/cast_audio_device_factory.h

M components/cast_streaming/renderer/playback_command_forwarding_renderer_factory_unittest.cc
M content/renderer/media/media_factory.cc
M content/renderer/media/renderer_webaudiodevice_impl.cc
M content/renderer/media/renderer_webaudiodevice_impl.h
M content/renderer/media/renderer_webaudiodevice_impl_unittest.cc
M content/renderer/renderer_blink_platform_impl.cc
M content/renderer/renderer_blink_platform_impl.h
M media/audio/BUILD.gn
M media/audio/audio_output_device.cc
M media/audio/audio_output_device.h
M media/audio/audio_output_device_unittest.cc
D media/audio/audio_output_stream_sink.cc
D media/audio/audio_output_stream_sink.h
M media/audio/clockless_audio_sink.h

M media/audio/null_audio_sink.h
M media/base/audio_renderer_mixer.cc
M media/base/audio_renderer_mixer.h
M media/base/audio_renderer_mixer_input.cc
M media/base/audio_renderer_mixer_input.h
M media/base/audio_renderer_mixer_input_unittest.cc
M media/base/audio_renderer_mixer_pool.h
M media/base/audio_renderer_mixer_unittest.cc
M media/base/audio_renderer_sink.h
M media/base/fake_audio_renderer_sink.h

M media/base/mock_audio_renderer_sink.h
M media/base/silent_sink_suspender.cc
M media/base/silent_sink_suspender.h
M media/base/silent_sink_suspender_unittest.cc
M media/mojo/services/test_mojo_media_client.cc
M media/mojo/services/test_mojo_media_client.h
M media/renderers/audio_renderer_impl.cc
M media/renderers/audio_renderer_impl.h
M media/renderers/audio_renderer_impl_unittest.cc
M media/renderers/renderer_impl_factory.cc
68 files changed, 961 insertions(+), 1,176 deletions(-)


To view, visit change 4044524. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Icd9bf047810df2441c874263cd28ecb4ad2c839e
Gerrit-Change-Number: 4044524
Gerrit-PatchSet: 8
Gerrit-Owner: Jordan Bayles <jop...@chromium.org>
Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
Gerrit-Reviewer: Jordan Bayles <jop...@chromium.org>
Gerrit-Reviewer: Kentaro Hara <har...@chromium.org>
Gerrit-Reviewer: Mark Foltz <mfo...@chromium.org>
Gerrit-Reviewer: Matthew Wolenetz <wole...@chromium.org>
Gerrit-Reviewer: Olga Sharonova <ol...@chromium.org>
Gerrit-Reviewer: Ryan Keane <rwk...@google.com>
Gerrit-CC: Fredrik Hernqvist <fhern...@google.com>
Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
Gerrit-Attention: Jordan Bayles <jop...@chromium.org>
Gerrit-MessageType: newchange

Jordan Bayles (Gerrit)

unread,
Dec 1, 2022, 8:54:02 PM12/1/22
to marinacio...@chromium.org, olka+...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, chfreme...@chromium.org, eric.c...@apple.com, erickun...@chromium.org, feature-me...@chromium.org, jophba...@chromium.org, kinuko...@chromium.org, mfoltz...@chromium.org, poscia...@chromium.org, tommyw+w...@chromium.org, xhwang...@chromium.org, Fredrik Hernqvist, Ryan Keane, Olga Sharonova, Kentaro Hara, Mark Foltz, Matthew Wolenetz, Dale Curtis, Chromium LUCI CQ, Tricium, chromium...@chromium.org, Rijubrata Bhaumik, srirama chandra sekhar

Attention is currently required from: Olga Sharonova.

Patch set 9:Commit-Queue +1

View Change

3 comments:

  • Patchset:

    • Patch Set #9:

      I'll readd attention sets when I have finished making all the platforms happy. Had to do a significant Fuchsia only refactor unfortunately.

  • File media/audio/audio_output_device.h:

    • Could you flip the naming around? Delegate is usually an internal class, the owner delegates the cal […]

      Apologies for the code review update before I was totally ready, I didn't remove you from the attention set and only updated this patch to see what bot failures remain.

      I agree the Delegate should be internal, I was planning on looking at other examples of this pattern since I haven't seen it much in my section of the codebase.

  • File third_party/blink/renderer/modules/media/audio/audio_renderer_sink_cache.h:

    • No, there is no point in leaving it around. […]

      I've completed that now. I have done dependent CLs but wasn't planning on that when I started this refactor. This started as a code health rotation cleanup patch and obviously blew up--I definitely could have been more strategic in the patch scope but was hoping for this to not take longer than a week to finish implementation.

To view, visit change 4044524. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Icd9bf047810df2441c874263cd28ecb4ad2c839e
Gerrit-Change-Number: 4044524
Gerrit-PatchSet: 9
Gerrit-Owner: Jordan Bayles <jop...@chromium.org>
Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
Gerrit-Reviewer: Jordan Bayles <jop...@chromium.org>
Gerrit-Reviewer: Kentaro Hara <har...@chromium.org>
Gerrit-Reviewer: Mark Foltz <mfo...@chromium.org>
Gerrit-Reviewer: Matthew Wolenetz <wole...@chromium.org>
Gerrit-Reviewer: Olga Sharonova <ol...@chromium.org>
Gerrit-Reviewer: Ryan Keane <rwk...@google.com>
Gerrit-CC: Fredrik Hernqvist <fhern...@google.com>
Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
Gerrit-Attention: Olga Sharonova <ol...@chromium.org>
Gerrit-Comment-Date: Fri, 02 Dec 2022 01:51:13 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes

Olga Sharonova (Gerrit)

unread,
Dec 2, 2022, 3:18:30 AM12/2/22
to Jordan Bayles, marinacio...@chromium.org, olka+...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, chfreme...@chromium.org, eric.c...@apple.com, erickun...@chromium.org, feature-me...@chromium.org, jophba...@chromium.org, kinuko...@chromium.org, mfoltz...@chromium.org, poscia...@chromium.org, tommyw+w...@chromium.org, xhwang...@chromium.org, Fredrik Hernqvist, Ryan Keane, Kentaro Hara, Mark Foltz, Matthew Wolenetz, Dale Curtis, Chromium LUCI CQ, Tricium, chromium...@chromium.org, Rijubrata Bhaumik, srirama chandra sekhar

Attention is currently required from: Jordan Bayles.

View Change

1 comment:

  • File third_party/blink/renderer/modules/media/audio/audio_renderer_sink_cache.h:

    • I've completed that now. […]

      I'm very grateful you are working on this: have been wanting to do it for so long, but I knew it would not be a quick fix 😄.

To view, visit change 4044524. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Icd9bf047810df2441c874263cd28ecb4ad2c839e
Gerrit-Change-Number: 4044524
Gerrit-PatchSet: 9
Gerrit-Owner: Jordan Bayles <jop...@chromium.org>
Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
Gerrit-Reviewer: Jordan Bayles <jop...@chromium.org>
Gerrit-Reviewer: Kentaro Hara <har...@chromium.org>
Gerrit-Reviewer: Mark Foltz <mfo...@chromium.org>
Gerrit-Reviewer: Matthew Wolenetz <wole...@chromium.org>
Gerrit-Reviewer: Olga Sharonova <ol...@chromium.org>
Gerrit-Reviewer: Ryan Keane <rwk...@google.com>
Gerrit-CC: Fredrik Hernqvist <fhern...@google.com>
Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
Gerrit-Attention: Jordan Bayles <jop...@chromium.org>
Gerrit-Comment-Date: Fri, 02 Dec 2022 08:15:59 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No

Jordan Bayles (Gerrit)

unread,
Dec 13, 2022, 4:33:19 AM12/13/22
to marinacio...@chromium.org, olka+...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, chfreme...@chromium.org, eric.c...@apple.com, erickun...@chromium.org, feature-me...@chromium.org, jophba...@chromium.org, kinuko...@chromium.org, mfoltz...@chromium.org, poscia...@chromium.org, tommyw+w...@chromium.org, xhwang...@chromium.org

Attention is currently required from: Jordan Bayles.

Jordan Bayles uploaded patch set #15 to this change.

View Change

[Media] Clean up AudioRendererSink, fix ownership

This patch changes AudioRendererSink to be owned by a std::unique_ptr
instead of a scoped_refptr, clarifying the ownership of this class and
its descendants as well as fixing a variety of bugs and potential bugs

caused by confusing ownership structures.

Bug: 151051, 1381431
Change-Id: Icd9bf047810df2441c874263cd28ecb4ad2c839e
---
M base/threading/thread_restrictions.h
M chromecast/media/audio/cast_audio_device_factory.cc
M chromecast/media/audio/cast_audio_device_factory.h
M chromecast/media/audio/cast_audio_output_device.cc

M components/cast_streaming/renderer/playback_command_forwarding_renderer_factory_unittest.cc
M content/renderer/media/media_factory.cc
M content/renderer/media/renderer_webaudiodevice_impl.cc
M content/renderer/media/renderer_webaudiodevice_impl.h
M content/renderer/media/renderer_webaudiodevice_impl_unittest.cc
M content/renderer/renderer_blink_platform_impl.cc
M content/renderer/renderer_blink_platform_impl.h
M fuchsia_web/webengine/renderer/web_engine_audio_device_factory.cc
M fuchsia_web/webengine/renderer/web_engine_audio_device_factory.h
M fuchsia_web/webengine/renderer/web_engine_audio_output_device.cc
M fuchsia_web/webengine/renderer/web_engine_audio_output_device.h
M fuchsia_web/webengine/renderer/web_engine_audio_output_device_test.cc

M media/audio/audio_output_device.cc
M media/audio/audio_output_device.h
M media/audio/audio_output_device_unittest.cc
M media/audio/clockless_audio_sink.h
M media/audio/null_audio_sink.h
M media/base/audio_renderer_mixer.cc
M media/base/audio_renderer_mixer.h
M media/base/audio_renderer_mixer_input.cc
M media/base/audio_renderer_mixer_input.h
M media/base/audio_renderer_mixer_input_unittest.cc
M media/base/audio_renderer_mixer_pool.h
M media/base/audio_renderer_mixer_unittest.cc
M media/base/audio_renderer_sink.h
M media/base/fake_audio_renderer_sink.h
M media/base/mock_audio_renderer_sink.h
M media/base/output_device_info.cc
M media/base/output_device_info.h
74 files changed, 1,082 insertions(+), 931 deletions(-)

To view, visit change 4044524. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Icd9bf047810df2441c874263cd28ecb4ad2c839e
Gerrit-Change-Number: 4044524
Gerrit-PatchSet: 15
Gerrit-Owner: Jordan Bayles <jop...@chromium.org>
Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
Gerrit-Reviewer: Jordan Bayles <jop...@chromium.org>
Gerrit-Reviewer: Kentaro Hara <har...@chromium.org>
Gerrit-Reviewer: Mark Foltz <mfo...@chromium.org>
Gerrit-Reviewer: Matthew Wolenetz <wole...@chromium.org>
Gerrit-Reviewer: Olga Sharonova <ol...@chromium.org>
Gerrit-Reviewer: Ryan Keane <rwk...@google.com>
Gerrit-CC: Fredrik Hernqvist <fhern...@google.com>
Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
Gerrit-Attention: Jordan Bayles <jop...@chromium.org>
Gerrit-MessageType: newpatchset

Jordan Bayles (Gerrit)

unread,
Dec 13, 2022, 4:33:19 AM12/13/22
to marinacio...@chromium.org, olka+...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, chfreme...@chromium.org, eric.c...@apple.com, erickun...@chromium.org, feature-me...@chromium.org, jophba...@chromium.org, kinuko...@chromium.org, mfoltz...@chromium.org, poscia...@chromium.org, tommyw+w...@chromium.org, xhwang...@chromium.org

Attention is currently required from: Jordan Bayles.

Jordan Bayles uploaded patch set #14 to this change.

View Change

[Media] Clean up AudioRendererSink, fix ownership

This patch changes AudioRendererSink to be owned by a std::unique_ptr
instead of a scoped_refptr, clarifying the ownership of this class and
its descendants as well as fixing a variety of bugs and potential bugs
caused by confusing ownership structures.

Of significant note is the changes to the AudioRendererSinkCache, which
now maintains ownership of sinks instead of a complex and confusing ref
counted sharing with callers + garbage collection.

74 files changed, 1,086 insertions(+), 931 deletions(-)

To view, visit change 4044524. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Icd9bf047810df2441c874263cd28ecb4ad2c839e
Gerrit-Change-Number: 4044524
Gerrit-PatchSet: 14

Jordan Bayles (Gerrit)

unread,
Dec 13, 2022, 4:38:48 AM12/13/22
to marinacio...@chromium.org, olka+...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, chfreme...@chromium.org, eric.c...@apple.com, erickun...@chromium.org, feature-me...@chromium.org, jophba...@chromium.org, kinuko...@chromium.org, mfoltz...@chromium.org, poscia...@chromium.org, tommyw+w...@chromium.org, xhwang...@chromium.org

Attention is currently required from: Jordan Bayles.

Jordan Bayles uploaded patch set #17 to this change.

View Change

[Media] Clean up AudioRendererSink, fix ownership

This patch changes AudioRendererSink to be owned by a std::unique_ptr
instead of a scoped_refptr, clarifying the ownership of this class and
its descendents as well as fixing a variety of bugs and potential bugs

caused by confusing ownership structures.

Bug: 151051, 1381431
Change-Id: Icd9bf047810df2441c874263cd28ecb4ad2c839e
---
M base/threading/thread_restrictions.h
M chromecast/media/audio/cast_audio_device_factory.cc
M chromecast/media/audio/cast_audio_device_factory.h
M chromecast/media/audio/cast_audio_output_device.cc
M chromecast/media/audio/cast_audio_output_device.h
75 files changed, 1,145 insertions(+), 995 deletions(-)

To view, visit change 4044524. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Icd9bf047810df2441c874263cd28ecb4ad2c839e
Gerrit-Change-Number: 4044524
Gerrit-PatchSet: 17

Matthew Wolenetz (Gerrit)

unread,
Jan 12, 2023, 4:22:54 PM1/12/23
to Jordan Bayles, marinacio...@chromium.org, olka+...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, chfreme...@chromium.org, eric.c...@apple.com, erickun...@chromium.org, feature-me...@chromium.org, jophba...@chromium.org, kinuko...@chromium.org, mfoltz...@chromium.org, poscia...@chromium.org, tommyw+w...@chromium.org, xhwang...@chromium.org, Fredrik Hernqvist, Ryan Keane, Olga Sharonova, Kentaro Hara, Mark Foltz, Dale Curtis, Chromium LUCI CQ, Tricium, chromium...@chromium.org, Rijubrata Bhaumik, srirama chandra sekhar

Attention is currently required from: Jordan Bayles.

View Change

1 comment:

  • Patchset:

    • Patch Set #20:

      Is this a work-in-progress or is it ready for review? It's been sitting in our collective inboxes since before the holidays, when the most recent patch sets had description "in progress refactor". My apologies if it's been awaiting my review in actuality.

To view, visit change 4044524. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Icd9bf047810df2441c874263cd28ecb4ad2c839e
Gerrit-Change-Number: 4044524
Gerrit-PatchSet: 20
Gerrit-Owner: Jordan Bayles <jop...@chromium.org>
Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
Gerrit-Reviewer: Jordan Bayles <jop...@chromium.org>
Gerrit-Reviewer: Kentaro Hara <har...@chromium.org>
Gerrit-Reviewer: Mark Foltz <mfo...@chromium.org>
Gerrit-Reviewer: Matthew Wolenetz <wole...@chromium.org>
Gerrit-Reviewer: Olga Sharonova <ol...@chromium.org>
Gerrit-Reviewer: Ryan Keane <rwk...@google.com>
Gerrit-CC: Fredrik Hernqvist <fhern...@google.com>
Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
Gerrit-Attention: Jordan Bayles <jop...@chromium.org>
Gerrit-Comment-Date: Thu, 12 Jan 2023 21:22:46 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment

Jordan Bayles (Gerrit)

unread,
Feb 7, 2023, 6:51:55 PM2/7/23
to Dale Curtis, Kentaro Hara, Matthew Wolenetz, Olga Sharonova, Ryan Keane, Mark Foltz, marinacio...@chromium.org, olka+...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, chfreme...@chromium.org, eric.c...@apple.com, erickun...@chromium.org, feature-me...@chromium.org, jophba...@chromium.org, kinuko...@chromium.org, mfoltz...@chromium.org, poscia...@chromium.org, tommyw+w...@chromium.org, xhwang...@chromium.org

Jordan Bayles removed Dale Curtis, Kentaro Hara, Matthew Wolenetz, Olga Sharonova, Ryan Keane and Mark Foltz from this change.

View Change

[Media] Clean up AudioRendererSink, fix ownership

This patch changes AudioRendererSink to be owned by a std::unique_ptr
instead of a scoped_refptr, clarifying the ownership of this class and
its descendents as well as fixing a variety of bugs and potential bugs
caused by confusing ownership structures.

Bug: 151051, 1381431
Change-Id: Icd9bf047810df2441c874263cd28ecb4ad2c839e
---
M base/threading/thread_restrictions.h
M chromecast/media/audio/BUILD.gn

M chromecast/media/audio/cast_audio_device_factory.cc
M chromecast/media/audio/cast_audio_device_factory.h
M chromecast/media/audio/cast_audio_output_device.cc
M chromecast/media/audio/cast_audio_output_device.h
M chromecast/media/audio/mixer_service/mock_mixer_socket.h
M chromecast/media/audio/mixer_service/receiver/receiver_creation.cc
M media/base/pipeline_impl.cc

M media/base/silent_sink_suspender.cc
M media/base/silent_sink_suspender.h
M media/base/silent_sink_suspender_unittest.cc
M media/mojo/services/test_mojo_media_client.cc
M media/mojo/services/test_mojo_media_client.h
M media/renderers/audio_renderer_impl.cc
M media/renderers/audio_renderer_impl.h
M media/renderers/audio_renderer_impl_unittest.cc
M media/renderers/renderer_impl.cc
80 files changed, 1,200 insertions(+), 1,035 deletions(-)


To view, visit change 4044524. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Icd9bf047810df2441c874263cd28ecb4ad2c839e
Gerrit-Change-Number: 4044524
Gerrit-PatchSet: 20
Gerrit-Owner: Jordan Bayles <jop...@chromium.org>
Gerrit-Reviewer: Jordan Bayles <jop...@chromium.org>
Gerrit-CC: Fredrik Hernqvist <fhern...@google.com>
Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
Gerrit-MessageType: newchange

Jordan Bayles (Gerrit)

unread,
Feb 7, 2023, 6:52:01 PM2/7/23
to marinacio...@chromium.org, olka+...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, chfreme...@chromium.org, eric.c...@apple.com, erickun...@chromium.org, feature-me...@chromium.org, jophba...@chromium.org, kinuko...@chromium.org, mfoltz...@chromium.org, poscia...@chromium.org, tommyw+w...@chromium.org, xhwang...@chromium.org, Fredrik Hernqvist, Chromium LUCI CQ, Tricium, chromium...@chromium.org, Rijubrata Bhaumik, srirama chandra sekhar

View Change

1 comment:

  • Patchset:

To view, visit change 4044524. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Icd9bf047810df2441c874263cd28ecb4ad2c839e
Gerrit-Change-Number: 4044524
Gerrit-PatchSet: 20
Gerrit-Owner: Jordan Bayles <jop...@chromium.org>
Gerrit-Reviewer: Jordan Bayles <jop...@chromium.org>
Gerrit-CC: Fredrik Hernqvist <fhern...@google.com>
Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
Gerrit-Comment-Date: Tue, 07 Feb 2023 23:51:50 +0000

Jordan Bayles (Gerrit)

unread,
Sep 28, 2023, 6:55:53 PM9/28/23
to marinacio...@chromium.org, olka+...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, chfreme...@chromium.org, eric.c...@apple.com, erickun...@chromium.org, feature-me...@chromium.org, jophba...@chromium.org, kinuko...@chromium.org, mfoltz...@chromium.org, poscia...@chromium.org, tommyw+w...@chromium.org, xhwang...@chromium.org, Fredrik Hernqvist, Chromium LUCI CQ, Tricium, chromium...@chromium.org, Rijubrata Bhaumik, srirama chandra sekhar

Jordan Bayles abandoned this change.

View Change

To view, visit change 4044524. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: abandon

Jordan Bayles (Gerrit)

unread,
Sep 28, 2023, 9:20:32 PM9/28/23
to blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, chfreme...@chromium.org, eric.c...@apple.com, erickun...@chromium.org, feature-me...@chromium.org, fuchsia...@chromium.org, halliwe...@chromium.org, jophba...@chromium.org, kinuko...@chromium.org, lcwu+...@chromium.org, marinacio...@chromium.org, mfoltz...@chromium.org, olka+...@chromium.org, poscia...@chromium.org, tommyw+w...@chromium.org, video-networking...@google.com, xhwang...@chromium.org

Attention is currently required from: Jordan Bayles.

Jordan Bayles uploaded patch set #3 to this change.

View Change

[Media] Clean up AudioRendererSink, fix ownership

This patch changes AudioRendererSink to be owned by a std::unique_ptr
instead of a scoped_refptr, clarifying the ownership of this class and
its descendents as well as fixing a variety of bugs and potential bugs
caused by confusing ownership structures.

Bug: 151051, 1381431
Change-Id: I8192e7fa4bd2ee8ada23e6cc413fa28a48b5a37e

---
M base/threading/thread_restrictions.h
M chromecast/media/audio/BUILD.gn
M chromecast/media/audio/cast_audio_device_factory.cc
M chromecast/media/audio/cast_audio_device_factory.h
M chromecast/media/audio/cast_audio_output_device.h
M chromecast/media/audio/mixer_service/receiver/receiver_creation.cc
M components/cast_streaming/renderer/control/playback_command_forwarding_renderer_factory_unittest.cc

M content/renderer/media/media_factory.cc
M content/renderer/media/renderer_webaudiodevice_impl.cc
M content/renderer/media/renderer_webaudiodevice_impl.h
M content/renderer/media/renderer_webaudiodevice_impl_unittest.cc
M content/renderer/renderer_blink_platform_impl.cc
M content/renderer/renderer_blink_platform_impl.h
M fuchsia_web/webengine/renderer/web_engine_audio_device_factory.cc
M fuchsia_web/webengine/renderer/web_engine_audio_device_factory.h
M fuchsia_web/webengine/renderer/web_engine_audio_output_device.cc
M fuchsia_web/webengine/renderer/web_engine_audio_output_device.h
M fuchsia_web/webengine/renderer/web_engine_audio_output_device_test.cc
M media/audio/audio_input_unittest.cc
79 files changed, 1,203 insertions(+), 973 deletions(-)

To view, visit change 4904163. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newpatchset
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I8192e7fa4bd2ee8ada23e6cc413fa28a48b5a37e
Gerrit-Change-Number: 4904163
Gerrit-PatchSet: 3
Gerrit-Owner: Jordan Bayles <jop...@chromium.org>
Gerrit-Reviewer: Jordan Bayles <jop...@chromium.org>
Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
Gerrit-CC: Zijie He <zij...@google.com>
Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
Gerrit-Attention: Jordan Bayles <jop...@chromium.org>

Jordan Bayles (Gerrit)

unread,
Sep 29, 2023, 4:24:42 AM9/29/23
to blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, chfreme...@chromium.org, eric.c...@apple.com, erickun...@chromium.org, feature-me...@chromium.org, fuchsia...@chromium.org, halliwe...@chromium.org, jophba...@chromium.org, kinuko...@chromium.org, lcwu+...@chromium.org, marinacio...@chromium.org, mfoltz...@chromium.org, olka+...@chromium.org, poscia...@chromium.org, tommyw+w...@chromium.org, video-networking...@google.com, xhwang...@chromium.org

Attention is currently required from: Jordan Bayles.

Jordan Bayles uploaded patch set #4 to this change.

View Change

79 files changed, 1,213 insertions(+), 977 deletions(-)

To view, visit change 4904163. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newpatchset
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I8192e7fa4bd2ee8ada23e6cc413fa28a48b5a37e
Gerrit-Change-Number: 4904163
Gerrit-PatchSet: 4

Jordan Bayles (Gerrit)

unread,
Sep 19, 2025, 8:08:32 PM (12 hours ago) Sep 19
to Chromium LUCI CQ, chromium...@chromium.org, Rijubrata Bhaumik, srirama chandra sekhar, Zijie He, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, chfreme...@chromium.org, eric.c...@apple.com, erickun...@chromium.org, feature-me...@chromium.org, fuchsia...@chromium.org, halliwe...@chromium.org, jophba...@chromium.org, kinuko...@chromium.org, lcwu+...@chromium.org, marinacio...@chromium.org, mfoltz...@chromium.org, olka+...@chromium.org, poscia...@chromium.org, tommyw+w...@chromium.org, video-networking...@google.com, xhwang...@chromium.org

Jordan Bayles abandoned this change

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: abandon
satisfied_requirement
unsatisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages