2 way communication between xbmc and python "client"
#1
I have dabbled with xbmc off and on since 2006 in some form or another. To me it is easily the best HTPC software available, and the fact that it is open source is a huge plus.

A few years ago I got a dune media player and have used it instead of xbmc...the headache of keeping the computer running correctly was just too much. However I missed xbmc. Last summer I decided to try to mesh the two: in particular I wanted to use yatse to browse my media collection and then play it on the dune. Obviously with the external player and a simple python script it was trivial to start movies on the dune. However I couldn't get player control over the dune during playback, so I decided to write some code that would let me do so.

I was a little too ambitious and edited the ExternalPlayer.cpp source code to send and receive commands from the dune. In retrospect I could have done most of this using python add-ons and saved myself trouble. However, I did get it to work for the most part, but my edits made xbmc unstable and it would frequently crash.

In the last week I decided to try to make the dune communicate with xbmc via python alone: thereby not requiring edits and compiling from source every time I made a change. It would also be easier to distribute. My goal was to make the yatse work with the dune to such an extent that I could not tell that I wasnt running xbmc. One huge wrench in this plan was that there was no python function that could send the total movie time back to xbmc. So seek, next, previous, and simply seeing how much time was left in the movie all didn't work.

Today I thought of a new method of approaching the problem, and one that I need help in figuring out the best way to accomplish. I could simply play the movie as normal on the computer (using DVDPlayer instead of ExternalPlayer), and my python script would send any appropriate commands to the dune. But playing blurays is expensive in terms of power and my method of keeping the two streams in sinc (checking every half second if they were within half a second of each other and seeking the xbmc movie if they werent) would not work since it took too long for the computer to actually seek the bluray.

So my second thought was to use a true"dummyplayer" that acted exactly like the DVDPlayer but didn't actually decode anything. And this is where I need other's help to point me in the right direction: I can't find the location in the dvdplayer folder where decoding actually happens. I see there is a #ifdef HAS_VIDEO_PLAYBACK, but I don't know where I can turn this off or if turning this off will even work. Obviously I have also tried using the "DummyVideoPlayer.cpp" but with little success since I don't know why this file is even in the source code.

Any help would be much appreciated!

Thanks!
Reply
#2
DVDPlayer uses audio and video codecs, See DVDCodecs then inside Audio and Video folders.
Reply

Logout Mark Read Team Forum Stats Members Help
2 way communication between xbmc and python "client"0