New issue
Advanced search Search tips

Issue 645403 link

Starred by 1 user

Issue metadata

Status: Duplicate
Owner:
Closed: Jan 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Feature

Blocked on:
issue 672793



Sign in to add a comment

Enable Windows Runtime MIDI API backend by default

Project Member Reported by shaochuan@chromium.org, Sep 9 2016

Issue description

As per  issue 512433 , an implementation of MidiManager using WinRT MIDI API (media::midi::MidiManagerWinrt) is now available on Windows 10 behind a runtime flag "--use-winrt-midi-api".
As soon as this feature is considered stable, we may enable this backend by default on Windows 10 hosts.
 
Labels: -Type-Launch Type-Feature
Project Member

Comment 2 by bugdroid1@chromium.org, Sep 20 2016

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

commit 500c32be9f547a6e4ea818672ed62e34399b1916
Author: shaochuan <shaochuan@chromium.org>
Date: Tue Sep 20 08:10:50 2016

Check if null pointer is provided in DeviceWatcher callbacks

Callbacks from DeviceWatcher events occasionally provide null pointers for
device information and handle interfaces. For example,
Midi{In,Out}Port.FromIdAsync return null handles in IAsyncOperation results if
the requested device is occupied by another application using legacy APIs.
DeviceWatcher.Removed event is also observed to provide null
IDeviceInformationUpdate pointers, but we are still unable to reproduce the
problem.

Additional checks in DeviceWatcher callbacks should be added to prevent crashes
before shipping this feature as default on Windows 10 hosts. We may also want to
collect statistics on this issue in the future.

BUG= 645403 

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

[modify] https://crrev.com/500c32be9f547a6e4ea818672ed62e34399b1916/media/midi/midi_manager_winrt.cc

Labels: M-55

Comment 5 by agoode@chromium.org, Sep 28 2016

FYI there is a recent Windows blog post that mentions improvements to the Windows 10 MIDI support. They do mention a win32 wrapper which may or may not be useful for Chrome at this point.

https://blogs.windows.com/buildingapps/2016/09/21/midi-enhancements-in-windows-10/
Thanks Adam.
The post gave answers for the most of our questions, and I'm happy to know that they started supporting third party drivers from the last update.

Also Win32 wrapper would help third parties to start using the new API. But... yeah, the best scenario is Windows implements the winmm API on the top of new one so that all existing apps can utilize the benefit of sharing devices.

Anyway, we start a field trial for Windows 10 backend in a few days for Canary and Dev channels, and will enable it by default after the stability checks.
It turned out that the new APIs don't work well without driver support. Some devices are not available at all through new APIs with vendor-provided drivers. For other devices, unexpected behavior have been observed, e.g. async request to open device not returning or returning null handles from OS callbacks. Such problems often occur by accessing the same device with old APIs first then with new APIs, and can only be fixed with a reboot. The device sharing feature also seems to require all applications to use the new APIs.

As discussed offline with toyoshim@, we may want to revert https://codereview.chromium.org/2392263002 to make the feature back behind a Finch flag disabled by default, and enable it as soon as third-party driver and app providers begin switching to new APIs. The revert should be applied to M55 as well.
toyoshim@: Is it possible to merge the revert to M55? As suggested in
http://www.chromium.org/developers/the-zen-of-merge-requests#TOC-Phase-2:-The-Push-to-Beta
there will be "changes to strings", though I guess the original flag name and description have already been localized.
I can not surely say, but worth requesting.
Your changes to strings are only for chrome://flags, and I guess that should be ok. Can you file a bug and create a CL to revert the flag change?

Project Member

Comment 12 by bugdroid1@chromium.org, Oct 29 2016

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

commit 2d340033715f50c38b75b4cbaa06b7445411869c
Author: shaochuan <shaochuan@chromium.org>
Date: Sat Oct 29 07:26:00 2016

Revert "Enable MidiManagerWinrt by default on Windows 10"

Make MidiManagerWinrt back behind a Finch flag disabled by default.

Reverting CL https://codereview.chromium.org/2392263002/ while preserving
strings and histograms for the "disabled" flag. Revert this CL to enable it by
default again.

BUG= 645403 , 659458 

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

[modify] https://crrev.com/2d340033715f50c38b75b4cbaa06b7445411869c/chrome/app/generated_resources.grd
[modify] https://crrev.com/2d340033715f50c38b75b4cbaa06b7445411869c/chrome/browser/about_flags.cc
[modify] https://crrev.com/2d340033715f50c38b75b4cbaa06b7445411869c/media/midi/midi_manager_win.cc
[modify] https://crrev.com/2d340033715f50c38b75b4cbaa06b7445411869c/media/midi/midi_switches.cc
[modify] https://crrev.com/2d340033715f50c38b75b4cbaa06b7445411869c/media/midi/midi_switches.h

Comment 13 by dimu@google.com, Nov 4 2016

Labels: -merge-merged-2840
[Automated comment] removing mislabelled merge-merged-2840
Project Member

Comment 14 by bugdroid1@chromium.org, Nov 7 2016

Labels: merge-merged-2883
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b98ddc5d66411ec00f4bc597a5e4aac0ca9dd0a7

commit b98ddc5d66411ec00f4bc597a5e4aac0ca9dd0a7
Author: shaochuan <shaochuan@chromium.org>
Date: Mon Nov 07 06:37:42 2016

Revert "Enable MidiManagerWinrt by default on Windows 10"

Make MidiManagerWinrt back behind a Finch flag disabled by default.

Reverting CL https://codereview.chromium.org/2392263002/ while preserving
strings and histograms for the "disabled" flag. Revert this CL to enable it by
default again.

BUG= 645403 , 659458 
TBR=shaochuan@chromium.org,toyoshim@chromium.org
NOTRY=true
NOPRESUBMIT=true

Review-Url: https://codereview.chromium.org/2462383002
Cr-Commit-Position: refs/branch-heads/2883@{#473}
Cr-Branched-From: 614d31daee2f61b0180df403a8ad43f20b9f6dd7-refs/heads/master@{#423768}

[modify] https://crrev.com/b98ddc5d66411ec00f4bc597a5e4aac0ca9dd0a7/chrome/app/generated_resources.grd
[modify] https://crrev.com/b98ddc5d66411ec00f4bc597a5e4aac0ca9dd0a7/chrome/browser/about_flags.cc
[modify] https://crrev.com/b98ddc5d66411ec00f4bc597a5e4aac0ca9dd0a7/media/midi/midi_manager_win.cc
[modify] https://crrev.com/b98ddc5d66411ec00f4bc597a5e4aac0ca9dd0a7/media/midi/midi_switches.cc
[modify] https://crrev.com/b98ddc5d66411ec00f4bc597a5e4aac0ca9dd0a7/media/midi/midi_switches.h

Status: Fixed (was: Assigned)
Cc: -toyoshim@chromium.org shaochuan@chromium.org
Labels: -M-55
Owner: toyoshim@chromium.org
Status: Assigned (was: Fixed)
It would be better to keep this open until we succeed to enable it by default.
Blockedon: 672793
Mergedinto: 807536
Status: Duplicate (was: Assigned)
merge to a launch bug that is needed for an experimental-controlled launch today.

Sign in to add a comment