Hi, new here, been reading some, but i hope this is the right place. I put it here because i am communicating via the http: interface.
first a probable bug. im win-xp, vlc-205
to replicate, "start vlc" below means "start vlc with the http interface running on port 8080"
start vlc, find a dir of mp3s, right click on it and select "add to vlc media players playlist", so then save that as a playlist, (<ctrl>-y ) with the name "test". close vlc.
start vlc again, find same dir, right click on it and select "add to vlc media players playlist", and start playing a file in it. now use media, open-file, and open that same test playlist you just saved. It should start vlc playing too, but if it nothing is started make sure something is playing.
it looks fine in the vlc playlist window, but now it gets interesting.
(i have a dns/host-entry for vlcl.my.lan pointing to the right machines ip address, you may want to use 127.0.0.1 instead in the below addresses.
now go look at http://vlc.my.lan:8080/requests/playlist.json
and notice there are TWO leafs marked current!!!!!!!!!!!!
this causes my perl/Tkx routine to do a real doubletake, and and the last one found is marked as the "current" leaf internally.
now outside this simple fault-replication, lets say i had other directorys between the hand loaded directory and the playlist, and if it is actually the first instance playing when all files in that directory are done, it will "fall into" and play from an intermediate directory, but if it was playing out of the "test playlist" and loop isnt set, it will stop playing..... hmmm...
Any hope??
Second, to start, let me describe a little what im doing.
i have perl/Tkx code designed to act kinda like the browser interface , but with no streaming, the host machine is plugged into my house-stereo, and i just need to control it.
its doing okish, long way to go still. My design principle is that there could be more than one of these going at once , "controllers in different rooms". it displays the playlst, highlites whats current (see above), has your standard <prev []stop/play/pause >next buttons, volume will be next. I kinda like that it keeps all dirs not containing current "closed"
I have created a new button series ">>skip to next dir in playlist", and "<<skip to prev dir in playlist". i had a cd player that did this and i loved it. i just kinda parse up/down the playlist and watch for the anything but the last token of the uri to change (skipping children nodes), and grab the proper id, and do a http://vlc.my.lan:8080/requests/status. ... &id=<right number>. I love it, "skip to next/prev show"(etree...). command=pl_next/pl_previous, just play something on its end, even if my app doesnt have the right/current playlist, they do what i want. but this "skip to" thing needs to know the most current playlist, (another controller or even the host console may have played something new, or changed the playlist). this means i need to update my playlist.json before i can do this "skip to" function. and ya know getting the playlist can take 4+seconds, (ok, it has 3000+ leafs) , (and can cause the vlc player to "hickup" at times too, yea i know you want logs, ill get there, im not complaining about it, yet...). This really ruins my "quality of experience" for my app. now i realize 99% of the time the playlist.json i have will be right, i just need to know what is current in the playlist.
hence if i may propose an extension, first have status.json include a playlist-last-modified field, it can be anything that can be unique and will change each time the playlist is modified, such as time-gmt or a even a just counter or real randomized number. if a json field is added to playlist.json that contains it too, i can compare the two and know if i need to request a new playlist and save my QoE rating. This would of course mean i need to get current from status.json, and request that a field called current (somewhere) be added with the <ID> of the current item playing. This way all i need to do is request status.json (which i do anyway).
third: when i do a status.json?command= it seems what i get back is the state BEFORE the command= is executed. in fact, even if i get a new status.json right away, it can contain the state pre execution of the command state, (this is where i get position, time, and volume from ), and i ask for this before i ask for playlist.json. so now i need to wait Two whole seconds after the eof of the ?command= just to get valid data. (waiting 1 second wasnt always enuf), again messing with that QoE. i would love it if the ?command= would wait until the command had finished, AND that any other machines that request status.json after the ?command= was issued got a status.json back that indicated there was a command in progress to tell me im going to need to update again soonish.
Fourth: this dell 610 runs at 50% when playing mp3s. and basically 0%-ish when not actively playing mp3s ... I know logs, when requesting playlist.json glitches the playback, its hitting 100%. ill get to the logs, hey, this is my first rant ....
Otherwise, *** *** thanks *** a whole whole lot ***
I used an older vlc to play "odd" videos before, and in putting vlc onto a rebuild of a friends machine i noted the 2.0.x version and started using it again. Thats when i came up with the idea of the perl,perl/tkx app. Its been mostly fun to play with, but at times exasperating as you might guess from the above. Its an old laptop thats the vlc-host-machine.
maybe i need to go to lua? instead of the http: interface, but ive been having fun getting exasperated with Tkx/Tcl, under perl. To do "interruptable" IO to keep that QoE, i wrote my own simple "wget"/LWP under TCL sockets/fileevent even. Im not ready to play with that yet.