WebServer HTTP API (HttpApi): for PocketPC and Web-client Remote Control Apps - Printable Version
+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Development (/forumdisplay.php?fid=32)
+--- Forum: Development (/forumdisplay.php?fid=93)
+--- Thread: WebServer HTTP API (HttpApi): for PocketPC and Web-client Remote Control Apps (/showthread.php?tid=8760)
- morte0815 - 2005-08-02 23:56
(nad @ aug. 02 2005,19:28 Wrote:morte,i tried it with my pocketpc... works
my homepc...browser works...program doesnt work
maybe i fire up vs.net this weekend... then i can tell you more
- Drongo - 2005-08-03 00:06
right, i select an album name from the media window [i.e. a folder on my pc], then click the + button to add to the playlist, then goto the 'lists' screen and get this:-
the rest extends past the rhs of the pda screen. i get this entry for every track in the album. i click on any of then and it plays the correct track - just don't know what its called.
also on the main screen the pause button does not seem to work.
i will try and get something to you re the controller stuff asap but am away alot at the moment.
- nad - 2005-08-03 11:56
morte: if you have vs.net that would definitely help.
drongo: i have managed to replicate the bugs. i'll fix them asap.
- nad - 2005-08-03 18:27
both bugs fixed.
the pause bug fix is in the latest xbmc cvs.
the list tab fix is is in the latest version of xbmc controller (v1.21) which is at the usual sf location.
one other thing, i have added the ability for a username/password to be used to authenticate to the web server. (see the reame.txt file.)
- elupus - 2005-08-03 23:50
playfile command isn't working very well nad, i would think this also affects many other commands.
you have to remember the http stuff is running in a thread different from the application thread. you can't just go call playmedia directly for example, this causes many possible ways to crash, as two threads can be using resources at the same time. you have to go through the applicationmessenger, this is the only way to handle most stuff.
reading stuff can be ok, (not good but atleast it normally won't crash). but changing stuff pretty much allways has to be done through a thread message. i would suggest starting with the commands that affect alot, like playfile for example.
btw, stop by the irc dev channel some time, haven't seen you in there.
edit - another way could be to add a callback into the code in the http api. you add all work that needs to be done into some sort of que, then only send one thread message to application that there is httpapi work to do, which will call the callback function in httpapi to work through the que. just an idea
- nad - 2005-08-05 16:30
elupus: thanks for pointing that out. i thought i had handled the threading cases, but have just checked and you are correct. strange that i haven't experienced any crashes.
i'll fix asap.
- Drongo - 2005-08-07 01:07
please see files in the link below regarding the controller revamp.
- nad - 2005-08-07 09:14
i have had a quick look at your files and your suggested modifications (the e and r) to my code look reasonable. i will try to add them today but i'm not sure i will have the time. i'll report back here when it's done.
i'm don't know if a shortcut facility is present within xbmc; if not it would cause problems implementing your buttons to my music etc. also some of the more advanced stuff you discuss i believe could take a lot of work which i don't really want to get into but would be very happy to work with someone (e.g. by extendingthe httpapi where necessary) who does want to do it. let's see how far we get with the simple changes.
i'm not sure what happended to the email between us. did you receive my reply to your email?
- Drongo - 2005-08-08 12:26
thanks for the post. no, i never got a reply to the email. tried sending a forum email to myself and it worked within a few seconds, so it must be picking up my correct email address.
i will produce a nicer graphic with map file with all the controller functions on that could be used with the revised code and maybe you could distribute that with your app on sf if you want.
regarding the rest, i am sure you are correct that it could be a lot of work. i got the idea from viewing your http api document, where it had a command for executing the execbuiltin(function) and i thought that we could assign this command to some of the buttons to change to the other windows etc - sorry my definition of a shortcut. i'm not a c++ programmer, but i will try and play around with the api stuff via excel vba to see what happens.
however, one simpler possibility for now is to provide a feature in your app where you have the option to change manually to another more appropriate graphic / map file, say for music or videos. instead of just the controller tab, which you load first, you could have a tab for music & video controller. don't know about you but i keep forgetting what all the button do in the various windows, so having purpose graphics seemed a good idea.
- nad - 2005-08-10 19:04
i'm rather busy at the moment but have just uploaded a new version of controller which includes your changes.
the only changes i have made are your suggested ones as well as updating controller.map to make its coordinates more reliable.