Relay playback to XBMC, Help a rookie with an idea! |
This forum is for developer discussions only. If you have a problem / bug report / idea / feature request that isn't related to foobar2000 SDK, post it in an appropiate forum instead - tech support questions go to support forum, everything else goes to general forum.
All non-developer posts on this forum will be removed. Continued abuse of this forum will result in admin actions (warnings, account suspension).
![]() ![]() |
Relay playback to XBMC, Help a rookie with an idea! |
Sep 26 2008, 00:08
Post
#1
|
|
|
Group: Members Posts: 6 Joined: 25-September 08 Member No.: 58652 |
I want to make a really simple plugin, but I need some help to get started!
My idea is to make a plugin that relays playback of a file to XBMC. Do do this in the simplest way possible it should only react to pause, stop and play. When a file starts to play the plugin should get the path and name of the file I want to play, replace stuff like "D:/" to the proper samba path (eg. "smb://MY_COMP/D/") and send it to XBMC by accessing the URL: http://192.168.0.7/xbmcCmds/xbmcHttp?comma...meter=file_path When I hit stop or pause it should send similar commands. To keep regular playback on my computer for the times I use the computer speakers, I guess a DSP-plugin would do the trick, or can this be done like a general purpose plugin? The easiest way to do this would be to find a plugin that reacts to play/pause/stop and executes a command via the shell. That way I can use very simple python scripts to execute the 3 commands. Does anyone know of a plugin that works like that? For those of you who doesn't know what XBMC is: http://xbmc.org/ |
|
|
|
Sep 28 2008, 15:18
Post
#2
|
|
![]() Group: Members (Donating) Posts: 779 Joined: 25-September 03 From: Umeå, Sweden Member No.: 9001 |
This should be trivially doable by implementing play_callback and performing the relevant actions in the assorted member functions of it.
The HTTP request should be somewhat easy to do with WinInet, curl or some other API. -------------------- Zao shang yong zao nong zao rang zao ren zao.
To, early in the morning, use a chisel to build a bathtub makes impatient people hot-tempered. |
|
|
|
Oct 10 2008, 00:36
Post
#3
|
|
|
Group: Members Posts: 6 Joined: 25-September 08 Member No.: 58652 |
OK, started today and the first version is now done. Did it in c++, as a general purpose plug-in as described in my first post. I even got the seek function working!
I'll make it available when I have fixed a settings dialog... If anyone wants it... BTW; a few more examples would be great! |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 20th June 2013 - 12:34 |