|
|
Created:
4 years, 3 months ago by Shao-Chuan Lee Modified:
4 years, 3 months ago Reviewers:
Takashi Toyoshima CC:
chromium-reviews, feature-media-reviews_chromium.org, toyoshim+midi_chromium.org Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionReplace Setup API with PnP Configuration Manager in MidiManagerWinrt
Now retrieving driver information with PnP Configuration Manager, which is much
faster than using Setup API.
With the new approach we are now able to fetch information from the actual
device driver, instead of the software interface on top which seems to be always
provided by Microsoft.
BUG=512433, 642604
R=toyoshim@chromium.org
Committed: https://crrev.com/e6dffa1061e486bde2448c01e314e244497def46
Cr-Commit-Position: refs/heads/master@{#417536}
Patch Set 1 #
Total comments: 10
Patch Set 2 : dynamically allocate devprop buffer #
Total comments: 2
Patch Set 3 : fix #
Messages
Total messages: 18 (6 generated)
PTAL https://codereview.chromium.org/2318953002/diff/1/media/midi/BUILD.gn File media/midi/BUILD.gn (right): https://codereview.chromium.org/2318953002/diff/1/media/midi/BUILD.gn#newcode140 media/midi/BUILD.gn:140: libs += [ "cfgmgr32.lib" ] This library is available since Windows 2000, and is currently used in base. TODO: should add /DELAYLOAD:cfgmgr32.dll ldflag as in base/BUILD.gn
https://codereview.chromium.org/2318953002/diff/1/media/midi/BUILD.gn File media/midi/BUILD.gn (right): https://codereview.chromium.org/2318953002/diff/1/media/midi/BUILD.gn#newcode140 media/midi/BUILD.gn:140: libs += [ "cfgmgr32.lib" ] On 2016/09/07 08:26:52, Shao-Chuan Lee wrote: > This library is available since Windows 2000, and is currently used in base. > TODO: should add /DELAYLOAD:cfgmgr32.dll ldflag as in base/BUILD.gn Not very familiar with GN, but it looks like media/midi/BUILD.gn depends on base/BUILD.gn and the DELAYLOAD flag is already specified in all_dependent_configs (through base_win_linker_flag).
The CQ bit was checked by toyoshim@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
https://codereview.chromium.org/2318953002/diff/1/media/midi/midi_manager_win... File media/midi/midi_manager_winrt.cc (right): https://codereview.chromium.org/2318953002/diff/1/media/midi/midi_manager_win... media/midi/midi_manager_winrt.cc:269: // This is the maximum string length in driver INF files. If you know an official document about this magic number, can you have a link here as a comment? https://codereview.chromium.org/2318953002/diff/1/media/midi/midi_manager_win... media/midi/midi_manager_winrt.cc:297: VLOG(1) << "CM_Locate_DevNode failed: CONFIGRET 0x" << std::hex << cr; Hum.... another kind of error code again :/ CM_MapCrToWin32Err() would help to use existing PrintHr infra?
https://codereview.chromium.org/2318953002/diff/1/media/midi/BUILD.gn File media/midi/BUILD.gn (right): https://codereview.chromium.org/2318953002/diff/1/media/midi/BUILD.gn#newcode140 media/midi/BUILD.gn:140: libs += [ "cfgmgr32.lib" ] Probably, we do not need this? Or need only on is_component_build?
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
https://codereview.chromium.org/2318953002/diff/1/media/midi/midi_manager_win... File media/midi/midi_manager_winrt.cc (right): https://codereview.chromium.org/2318953002/diff/1/media/midi/midi_manager_win... media/midi/midi_manager_winrt.cc:269: // This is the maximum string length in driver INF files. On 2016/09/07 09:22:34, toyoshim wrote: > If you know an official document about this magic number, can you have a link > here as a comment? Now retrieving buffer size from CM_Get_DevNode_Property() and dynamically allocate buffer. https://codereview.chromium.org/2318953002/diff/1/media/midi/midi_manager_win... media/midi/midi_manager_winrt.cc:297: VLOG(1) << "CM_Locate_DevNode failed: CONFIGRET 0x" << std::hex << cr; On 2016/09/07 09:22:34, toyoshim wrote: > Hum.... another kind of error code again :/ > CM_MapCrToWin32Err() would help to use existing PrintHr infra? Tried this and found only a few error codes are mapped to WinAPI errors, should be better to print the original code for debug purposes.
https://codereview.chromium.org/2318953002/diff/1/media/midi/BUILD.gn File media/midi/BUILD.gn (right): https://codereview.chromium.org/2318953002/diff/1/media/midi/BUILD.gn#newcode140 media/midi/BUILD.gn:140: libs += [ "cfgmgr32.lib" ] On 2016/09/07 10:17:02, toyoshim wrote: > Probably, we do not need this? Or need only on is_component_build? This is required in component build, and adding this doesn't break static build. If we add this only in component build, we are assuming base always require this library. Maybe a potential problem in the future?
https://codereview.chromium.org/2318953002/diff/1/media/midi/midi_manager_win... File media/midi/midi_manager_winrt.cc (right): https://codereview.chromium.org/2318953002/diff/1/media/midi/midi_manager_win... media/midi/midi_manager_winrt.cc:297: VLOG(1) << "CM_Locate_DevNode failed: CONFIGRET 0x" << std::hex << cr; So could you left what you tried and why you do like this as comments? https://codereview.chromium.org/2318953002/diff/20001/media/midi/BUILD.gn File media/midi/BUILD.gn (right): https://codereview.chromium.org/2318953002/diff/20001/media/midi/BUILD.gn#new... media/midi/BUILD.gn:140: libs += [ "cfgmgr32.lib" ] Could you try without this line?
https://codereview.chromium.org/2318953002/diff/1/media/midi/midi_manager_win... File media/midi/midi_manager_winrt.cc (right): https://codereview.chromium.org/2318953002/diff/1/media/midi/midi_manager_win... media/midi/midi_manager_winrt.cc:297: VLOG(1) << "CM_Locate_DevNode failed: CONFIGRET 0x" << std::hex << cr; On 2016/09/09 05:17:41, toyoshim wrote: > So could you left what you tried and why you do like this as comments? Done. https://codereview.chromium.org/2318953002/diff/20001/media/midi/BUILD.gn File media/midi/BUILD.gn (right): https://codereview.chromium.org/2318953002/diff/20001/media/midi/BUILD.gn#new... media/midi/BUILD.gn:140: libs += [ "cfgmgr32.lib" ] On 2016/09/09 05:17:42, toyoshim wrote: > Could you try without this line? Now including only if is_component_build.
lgtm
The CQ bit was checked by shaochuan@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Committed patchset #3 (id:40001)
Message was sent while issue was closed.
Description was changed from ========== Replace Setup API with PnP Configuration Manager in MidiManagerWinrt Now retrieving driver information with PnP Configuration Manager, which is much faster than using Setup API. With the new approach we are now able to fetch information from the actual device driver, instead of the software interface on top which seems to be always provided by Microsoft. BUG=512433,642604 R=toyoshim@chromium.org ========== to ========== Replace Setup API with PnP Configuration Manager in MidiManagerWinrt Now retrieving driver information with PnP Configuration Manager, which is much faster than using Setup API. With the new approach we are now able to fetch information from the actual device driver, instead of the software interface on top which seems to be always provided by Microsoft. BUG=512433,642604 R=toyoshim@chromium.org Committed: https://crrev.com/e6dffa1061e486bde2448c01e314e244497def46 Cr-Commit-Position: refs/heads/master@{#417536} ==========
Message was sent while issue was closed.
Patchset 3 (id:??) landed as https://crrev.com/e6dffa1061e486bde2448c01e314e244497def46 Cr-Commit-Position: refs/heads/master@{#417536} |