2014-09-07, 13:42
Hi, i'm trying to make multithread streaming by HTTP.
To do this, I download the file with mutiple http connections, and as soon as I have enough bytes to start streaming I call myplayer.play(filepath, listitem).
myplayer is a class that inherit from xbmc.Player and override play() and implements onPlayBackStopped, onPlayBackEnded and onPlayBackSeek.
This works well and is very fast, now the problem is when i try to seek at certain position.
When i seek, "onPlayBackSeek" was called, but player stops becouse EOF (End Of File).
So I tried this:
but player doesn't pause, it say always EOF and close itself.
I think that when I seek was called the player method "def seekTime(self, pTime)" and is this method that manage EOF and close player.
There is a way to override this one?
I'm tryed this:
but "HERE!" is never printed (i mean in xbmc.log) so my "seekTime" method is never called.
Thanks[/code]
To do this, I download the file with mutiple http connections, and as soon as I have enough bytes to start streaming I call myplayer.play(filepath, listitem).
myplayer is a class that inherit from xbmc.Player and override play() and implements onPlayBackStopped, onPlayBackEnded and onPlayBackSeek.
This works well and is very fast, now the problem is when i try to seek at certain position.
When i seek, "onPlayBackSeek" was called, but player stops becouse EOF (End Of File).
So I tried this:
Code:
def onPlayBackSeek(self, time, seekOffset):
self.pause()
# code to download file starting at seek offset and wait for first bytes
# self.play()
util.notify("SEEK %d %d" % (time, seekOffset))
but player doesn't pause, it say always EOF and close itself.
I think that when I seek was called the player method "def seekTime(self, pTime)" and is this method that manage EOF and close player.
There is a way to override this one?
I'm tryed this:
Code:
def seekTime(self, pTime):
print "HERE!"
but "HERE!" is never printed (i mean in xbmc.log) so my "seekTime" method is never called.
Thanks[/code]