问题
Just doing some advanced scouting so to speak here... For my Pandora client, Elpis, I support global media keys (MediaPlayPause, MediaNext, etc. on the keyboard) and I want to be able to support AVRCP from bluetooth headphones if possible. I do not currently have any (though will try to get some soon).
My main question is, what events (keyboard or otherwise) are fired by AVRCP commands in windows? Is it something that depends on the BT adapter and/or driver stack? I would love it if they just were exposed as the same media keys mentioned above, but I can not find any official MS documentation confirming or denying that... But from what I can tell, WMP supports it but some other media players do not (though they support the standard media keys), which leads me to believe it is different events.
Any insight would be greatly appreciated.
回答1:
There isn't a set of exposed events available for Bluetooth on Windows. Btd.dll contains this functionality and uses the PassThruOpId enum for play, stop, pause, FF and RW. Click here for the MSDN entry on this.
UPDATE As per the comment below I am unable to find any documentation other than that of the Compact Framework for this question.
UPDATE: Here is a link to the Windows Bluetooth Driver Stack. Also checkout this other stack question.
回答2:
Don't know where its documented at MSDN...assuming it exists at all. But I have some other references:
http://download.microsoft.com/download/5/E/6/5E66B27B-988B-4F50-AF3A-C2FF1E62180F/CON-T564_WH08.pptx
- Slide 10 -- "HF and AVRCP controls are mapped to Human Interface Device (HID) controls"
- Slide 14 -- "AVRCP Controls are mapped to Human Interface Device (HID) API" and table of mapping between AVRCP and HID values
IIRC it's also discussed by Larry Ostermann in this video: http://channel9.msdn.com/blogs/charles/inside-windows-7-larry-osterman-on-new-audio-capabilities At least Bluetooth phone Call control is discussed at 00:33:35 according to my notes.
来源:https://stackoverflow.com/questions/8632614/what-events-are-fired-by-bluetooth-avrcp-commands-in-windows