Validate midstream audio config changes with CHANNEL_LAYOUT_DISCRETE [chromium/src : master]

27 views
Skip to first unread message

Felicia Lim (Gerrit)

unread,
Mar 26, 2018, 1:50:01 PM3/26/18
to feature-me...@chromium.org, Dale Curtis, Felicia Lim, chromium...@chromium.org

hmm, I thought I'd started the review but apparently not, so here's another try.

View Change

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

    Gerrit-Project: chromium/src
    Gerrit-Branch: master
    Gerrit-Change-Id: I483e3f9644f4087295a0be95f9def4c6286ec72b
    Gerrit-Change-Number: 972327
    Gerrit-PatchSet: 1
    Gerrit-Owner: Felicia Lim <fl...@chromium.org>
    Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
    Gerrit-Reviewer: Felicia Lim <fl...@chromium.org>
    Gerrit-CC: Felicia Lim <fl...@google.com>
    Gerrit-Comment-Date: Mon, 26 Mar 2018 17:50:00 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: No
    Gerrit-MessageType: comment

    Dale Curtis (Gerrit)

    unread,
    Mar 26, 2018, 2:25:38 PM3/26/18
    to Felicia Lim, feature-me...@chromium.org, Felicia Lim, chromium...@chromium.org

    lgtm in either case.

    Patch set 1:Code-Review +1

    View Change

    2 comments:

    • File media/renderers/audio_renderer_impl.cc:

      • Patch Set #1, Line 683: sink_->IsOptimizedForHardwareParameters()) {

        Is this extra check on the sink necessary? Or should we delete this and say that DISCRETE streams must start discrete and never downgrade? I.e. any channel layout change once DISCRETE has been set is not allowed.

      • Patch Set #1, Line 685: << "Unsupported midstream configuration change!"

        "Unsupported midstream configuration change! Discrete channel layout not allowed by sink."

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

    Gerrit-Project: chromium/src
    Gerrit-Branch: master
    Gerrit-Change-Id: I483e3f9644f4087295a0be95f9def4c6286ec72b
    Gerrit-Change-Number: 972327
    Gerrit-PatchSet: 1
    Gerrit-Owner: Felicia Lim <fl...@chromium.org>
    Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
    Gerrit-Reviewer: Felicia Lim <fl...@chromium.org>
    Gerrit-CC: Felicia Lim <fl...@google.com>
    Gerrit-Comment-Date: Mon, 26 Mar 2018 18:25:36 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Gerrit-MessageType: comment

    Felicia Lim (Gerrit)

    unread,
    Mar 26, 2018, 3:08:02 PM3/26/18
    to feature-me...@chromium.org, Dale Curtis, Felicia Lim, chromium...@chromium.org

    Thanks for looking!

    Patch set 2:Commit-Queue +2

    View Change

    2 comments:

    • File media/renderers/audio_renderer_impl.cc:

      • Patch Set #1, Line 683: MEDIA_LOG(ERROR, media_log_)

        Is this extra check on the sink necessary? Or should we delete this and say that DISCRETE streams mu […]

        Deleting this check makes sense, can't think of a good use case for allowing changes from discrete streams.

      • Patch Set #1, Line 685: << " layout not allowed by sink.";

        "Unsupported midstream configuration change! Discrete channel layout not allowed by sink. […]

        Done

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

    Gerrit-Project: chromium/src
    Gerrit-Branch: master
    Gerrit-Change-Id: I483e3f9644f4087295a0be95f9def4c6286ec72b
    Gerrit-Change-Number: 972327
    Gerrit-PatchSet: 2
    Gerrit-Owner: Felicia Lim <fl...@chromium.org>
    Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
    Gerrit-Reviewer: Felicia Lim <fl...@chromium.org>
    Gerrit-CC: Felicia Lim <fl...@google.com>
    Gerrit-Comment-Date: Mon, 26 Mar 2018 19:08:00 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Dale Curtis <dalec...@chromium.org>
    Gerrit-MessageType: comment

    Commit Bot (Gerrit)

    unread,
    Mar 26, 2018, 3:08:09 PM3/26/18
    to Felicia Lim, feature-me...@chromium.org, Dale Curtis, Felicia Lim, chromium...@chromium.org

    CQ is trying the patch.

    Note: The patchset sent to CQ was uploaded after this CL was approved.
    "Remove extra check on sink and simplify comment" https://chromium-review.googlesource.com/c/972327/2

    Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/chromium-review.googlesource.com/972327/2

    Bot data: {"action": "start", "triggered_at": "2018-03-26T19:08:00.0Z", "cq_cfg_revision": "5b6c43e4d6b0297aa92e118e785d640c42297271", "revision": "7bbd82e30f493dfd84d4ef905bfe541b8e74fa9e"}

    View Change

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

      Gerrit-Project: chromium/src
      Gerrit-Branch: master
      Gerrit-Change-Id: I483e3f9644f4087295a0be95f9def4c6286ec72b
      Gerrit-Change-Number: 972327
      Gerrit-PatchSet: 2
      Gerrit-Owner: Felicia Lim <fl...@chromium.org>
      Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
      Gerrit-Reviewer: Felicia Lim <fl...@chromium.org>
      Gerrit-CC: Commit Bot <commi...@chromium.org>
      Gerrit-CC: Felicia Lim <fl...@google.com>
      Gerrit-Comment-Date: Mon, 26 Mar 2018 19:08:07 +0000

      Commit Bot (Gerrit)

      unread,
      Mar 26, 2018, 5:08:44 PM3/26/18
      to Felicia Lim, feature-me...@chromium.org, Dale Curtis, Felicia Lim, chromium...@chromium.org
      Try jobs failed on following builders:
      ios-simulator on master.tryserver.chromium.mac (JOB_TIMED_OUT, build has not started yet; builder either lacks capacity or does not exist (misspelled?))

      View Change

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

        Gerrit-Project: chromium/src
        Gerrit-Branch: master
        Gerrit-Change-Id: I483e3f9644f4087295a0be95f9def4c6286ec72b
        Gerrit-Change-Number: 972327
        Gerrit-PatchSet: 2
        Gerrit-Owner: Felicia Lim <fl...@chromium.org>
        Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
        Gerrit-Reviewer: Felicia Lim <fl...@chromium.org>
        Gerrit-CC: Commit Bot <commi...@chromium.org>
        Gerrit-CC: Felicia Lim <fl...@google.com>
        Gerrit-Comment-Date: Mon, 26 Mar 2018 21:08:43 +0000

        Felicia Lim (Gerrit)

        unread,
        Mar 27, 2018, 5:17:25 PM3/27/18
        to feature-me...@chromium.org, Commit Bot, Dale Curtis, Felicia Lim, chromium...@chromium.org

        Patch set 2:Commit-Queue +2

        View Change

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

          Gerrit-Project: chromium/src
          Gerrit-Branch: master
          Gerrit-Change-Id: I483e3f9644f4087295a0be95f9def4c6286ec72b
          Gerrit-Change-Number: 972327
          Gerrit-PatchSet: 2
          Gerrit-Owner: Felicia Lim <fl...@chromium.org>
          Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
          Gerrit-Reviewer: Felicia Lim <fl...@chromium.org>
          Gerrit-CC: Commit Bot <commi...@chromium.org>
          Gerrit-CC: Felicia Lim <fl...@google.com>
          Gerrit-Comment-Date: Tue, 27 Mar 2018 21:17:23 +0000
          Gerrit-HasComments: No
          Gerrit-Has-Labels: Yes
          Gerrit-MessageType: comment

          Commit Bot (Gerrit)

          unread,
          Mar 27, 2018, 5:17:35 PM3/27/18
          to Felicia Lim, feature-me...@chromium.org, Dale Curtis, Felicia Lim, chromium...@chromium.org

          CQ is trying the patch.

          Note: The patchset sent to CQ was uploaded after this CL was approved.
          "Remove extra check on sink and simplify comment" https://chromium-review.googlesource.com/c/972327/2

          Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/chromium-review.googlesource.com/972327/2

          Bot data: {"action": "start", "triggered_at": "2018-03-27T21:17:23.0Z", "cq_cfg_revision": "354223ef8a9beaefb02393573b81bd63fb2ab219", "revision": "7bbd82e30f493dfd84d4ef905bfe541b8e74fa9e"}

          View Change

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

            Gerrit-Project: chromium/src
            Gerrit-Branch: master
            Gerrit-Change-Id: I483e3f9644f4087295a0be95f9def4c6286ec72b
            Gerrit-Change-Number: 972327
            Gerrit-PatchSet: 2
            Gerrit-Owner: Felicia Lim <fl...@chromium.org>
            Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
            Gerrit-Reviewer: Felicia Lim <fl...@chromium.org>
            Gerrit-CC: Commit Bot <commi...@chromium.org>
            Gerrit-CC: Felicia Lim <fl...@google.com>
            Gerrit-Comment-Date: Tue, 27 Mar 2018 21:17:33 +0000

            Commit Bot (Gerrit)

            unread,
            Mar 27, 2018, 7:24:26 PM3/27/18
            to Felicia Lim, feature-me...@chromium.org, Dale Curtis, Felicia Lim, chromium...@chromium.org
            Try jobs failed on following builders:
              mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/681188)

            View Change

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

              Gerrit-Project: chromium/src
              Gerrit-Branch: master
              Gerrit-Change-Id: I483e3f9644f4087295a0be95f9def4c6286ec72b
              Gerrit-Change-Number: 972327
              Gerrit-PatchSet: 2
              Gerrit-Owner: Felicia Lim <fl...@chromium.org>
              Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
              Gerrit-Reviewer: Felicia Lim <fl...@chromium.org>
              Gerrit-CC: Commit Bot <commi...@chromium.org>
              Gerrit-CC: Felicia Lim <fl...@google.com>
              Gerrit-Comment-Date: Tue, 27 Mar 2018 23:24:24 +0000

              Felicia Lim (Gerrit)

              unread,
              Mar 28, 2018, 12:27:08 AM3/28/18
              to feature-me...@chromium.org, Commit Bot, Dale Curtis, Felicia Lim, chromium...@chromium.org

              Patch set 2:Commit-Queue +2

              View Change

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

                Gerrit-Project: chromium/src
                Gerrit-Branch: master
                Gerrit-Change-Id: I483e3f9644f4087295a0be95f9def4c6286ec72b
                Gerrit-Change-Number: 972327
                Gerrit-PatchSet: 2
                Gerrit-Owner: Felicia Lim <fl...@chromium.org>
                Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
                Gerrit-Reviewer: Felicia Lim <fl...@chromium.org>
                Gerrit-CC: Commit Bot <commi...@chromium.org>
                Gerrit-CC: Felicia Lim <fl...@google.com>
                Gerrit-Comment-Date: Wed, 28 Mar 2018 04:27:06 +0000

                Commit Bot (Gerrit)

                unread,
                Mar 28, 2018, 12:27:22 AM3/28/18
                to Felicia Lim, feature-me...@chromium.org, Dale Curtis, Felicia Lim, chromium...@chromium.org

                CQ is trying the patch.

                Note: The patchset sent to CQ was uploaded after this CL was approved.
                "Remove extra check on sink and simplify comment" https://chromium-review.googlesource.com/c/972327/2

                Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/chromium-review.googlesource.com/972327/2

                Bot data: {"action": "start", "triggered_at": "2018-03-28T04:27:06.0Z", "cq_cfg_revision": "8ec12a5d6a407bc41085f8c1d9e56fa92b6add10", "revision": "7bbd82e30f493dfd84d4ef905bfe541b8e74fa9e"}

                View Change

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

                  Gerrit-Project: chromium/src
                  Gerrit-Branch: master
                  Gerrit-Change-Id: I483e3f9644f4087295a0be95f9def4c6286ec72b
                  Gerrit-Change-Number: 972327
                  Gerrit-PatchSet: 2
                  Gerrit-Owner: Felicia Lim <fl...@chromium.org>
                  Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
                  Gerrit-Reviewer: Felicia Lim <fl...@chromium.org>
                  Gerrit-CC: Commit Bot <commi...@chromium.org>
                  Gerrit-CC: Felicia Lim <fl...@google.com>
                  Gerrit-Comment-Date: Wed, 28 Mar 2018 04:27:20 +0000

                  Commit Bot (Gerrit)

                  unread,
                  Mar 28, 2018, 12:29:55 AM3/28/18
                  to Felicia Lim, feature-me...@chromium.org, Dale Curtis, Felicia Lim, chromium...@chromium.org

                  Commit Bot merged this change.

                  View Change

                  Approvals: Dale Curtis: Looks good to me Felicia Lim: Commit
                  Validate midstream audio config changes with CHANNEL_LAYOUT_DISCRETE

                  Bug: 822744
                  Change-Id: I483e3f9644f4087295a0be95f9def4c6286ec72b
                  Reviewed-on: https://chromium-review.googlesource.com/972327
                  Commit-Queue: Felicia Lim <fl...@chromium.org>
                  Reviewed-by: Dale Curtis <dalec...@chromium.org>
                  Cr-Commit-Position: refs/heads/master@{#546403}
                  ---
                  M media/renderers/audio_renderer_impl.cc
                  1 file changed, 11 insertions(+), 6 deletions(-)

                  diff --git a/media/renderers/audio_renderer_impl.cc b/media/renderers/audio_renderer_impl.cc
                  index abcb3df..269d347 100644
                  --- a/media/renderers/audio_renderer_impl.cc
                  +++ b/media/renderers/audio_renderer_impl.cc
                  @@ -679,12 +679,17 @@
                  last_decoded_sample_rate_ = buffer->sample_rate();

                  if (last_decoded_channel_layout_ != buffer->channel_layout()) {
                  - last_decoded_channel_layout_ = buffer->channel_layout();
                  - last_decoded_channels_ = buffer->channel_count();
                  -
                  - // Input layouts should never be discrete.
                  - DCHECK_NE(last_decoded_channel_layout_, CHANNEL_LAYOUT_DISCRETE);
                  - ConfigureChannelMask();
                  + if (buffer->channel_layout() == CHANNEL_LAYOUT_DISCRETE) {
                  + MEDIA_LOG(ERROR, media_log_)
                  + << "Unsupported midstream configuration change! Discrete channel"
                  + << " layout not allowed by sink.";
                  + HandleAbortedReadOrDecodeError(PIPELINE_ERROR_DECODE);
                  + return;
                  + } else {
                  + last_decoded_channel_layout_ = buffer->channel_layout();
                  + last_decoded_channels_ = buffer->channel_count();
                  + ConfigureChannelMask();
                  + }
                  }
                  }


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

                  Gerrit-Project: chromium/src
                  Gerrit-Branch: master
                  Gerrit-Change-Id: I483e3f9644f4087295a0be95f9def4c6286ec72b
                  Gerrit-Change-Number: 972327
                  Gerrit-PatchSet: 3
                  Gerrit-Owner: Felicia Lim <fl...@chromium.org>
                  Gerrit-Reviewer: Commit Bot <commi...@chromium.org>
                  Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
                  Gerrit-Reviewer: Felicia Lim <fl...@chromium.org>
                  Gerrit-CC: Felicia Lim <fl...@google.com>
                  Gerrit-MessageType: merged
                  Reply all
                  Reply to author
                  Forward
                  0 new messages