Log in

View Full Version : Want to add AVRCP support to GSPlayer? Here's the long-awaited solution!


Menneisyys
07-29-2008, 12:48 PM
GSPlayer (http://hp.vector.co.jp/authors/VA032810/) is a well-known, excellent, free (!!!!), constantly updated audio player application I’ve very frequently elaborated on (search my blog (http://www.pocketpcmag.com/blogs) for my related articles).

Unfortunately, it, as of version 2.29, still doesn’t support AVRCP (the remote control protocol of Bluetooth), which makes it useless for many Windows Mobile fans. No problem: XDA-Devs forum member Wolfman-XP has come up (http://forum.xda-developers.com/showthread.php?t=331385) with a decent solution compatible with the Microsoft BT stack (but not with the Widcomm one - that is, HP iPAQ users are left out in the cold).

It allows for making GSPlayer controllable via your wireless Bluetooth headphones’ buttons. In addition, it has some tricks up its sleeve: it even allows for implementing extra functionality like fast forwarding / rewinding (10 secs a time) with supporting double-presses of the two directional buttons. With the play/stop button, it even allows for three button presses. In this regard, it’s way superior to the AVRCP support of most? all? current, natively AVRCP-capable Windows Mobile multimedia apps (see their list HERE (http://www.pocketpcmag.com/blogs/index.php?blog=3&p=1307&more=1&c=1&tb=1&pb=1); note that the since-released CorePlayer, Slide2Play (http://forum.xda-developers.com/showthread.php?t=377627) - see review HERE (http://www.pocketpcmag.com/old_blogs/index.php?blog=3&p=2639&more=1&c=1&tb=1&pb=1) -, and Pocket Tunes all support AVRCP; albeit the second two “only” on the MS BT stack.)

Installing, using

First, download it from the first post of the original thread (http://forum.xda-developers.com/showthread.php?t=331385). Extract AVRCP.exe and put it somewhere (if you want it to be auto-started after resets / reboots, in \Windows\Startup). Click it twice (!); you’ll see the bottom softkey bar change to “OK” and “Settings”. Press the latter. (But never press the former, OK, because it causes the program to be terminated, necessitating starting it again.)

Now, go to Settings (right softkey) / Settings and fill in the fields in the following way:

http://www.winmobiletech.com/sekalaiset/gsplayeravrcp.png

The upper two parameters (giving the path to the GSPlayer executable to “Path to application” and “GSPlayer” in “WindowName”) will always be like so. (Except when you have another path to GSPlayer because it’s on, say, a storage card or yours is a non-English device.)

The contents of the other parameters are pretty easy to decode. For example, “40027” in “Play single click” instructs the converter to translate all single Play / Pause button presses to the play/pause even. Similarly, “40075” in the “Forward double click” tells the system to pass a Fast Forward event (“40075”) to GSPlayer whenever you quickly press the forward button twice.

The available codes are as follows:

play/pause 40027
PREV 40037
NEXT 40038
FastFF 40075
FastBack 40074
OpenFile Dialog 40018
Switch Display 100

Note that as these settings are stored in the Registry, you can easily back up / restore / migrate it to another device. To make your life easier, I’ve created a registry export and made it available HERE (http://www.winmobiletech.com/sekalaiset/avrcpreg.reg). If the above settings are OK with you, you can safely skip the manual set-up by just importing the file with a Registry Editor 5.00-compliant registry explorer like that of SOTI Pocket Controller any time. After the next AVRCP.exe restart, the new changes will be seen.

Note that there also exists a configuration for older, pre-1.2 versions of CorePlayer. As the 1.2+ versions already support AVRCP, you won’t need to rely on it. Finally, the developer of the hack has tried implementing support for TCPMP, which, as can clearly be seen HERE (http://www.pocketpcmag.com/blogs/index.php?blog=3&p=1307&more=1&c=1&tb=1&pb=1), was only AVRCP-compliant with WM2003SE + A2DP upgrade and nothing else. Unfortunately, there doesn’t seem to be a solution for TCPMP.

Note that AVRCP.exe runs in the background. Don’t be afraid of this: it only consumes 100 kbytes of RAM and 0% CPU time (my benchmarks). The latter only increases to about 0.1% when you do press a button on your stereo headphones.

I've tested it on the HTC Universal, the Dell Axim x51v (both running WM6.1) and the iPAQ 210. The first two worked flawlessly. The latter is based on the Widcomm BT stack and, therefore, is incompatible.

Finally, note that the utility can be used with any app, game or emulator utilizing WM_COMMAND commands. It’s just that you need to ask the developer to tell you what these are and/or consult the source code, if available. This way, you can even increase the number of hardware buttons on your handset.