2012-02-06, 03:37
hey mcheng I realize you got a lot on your plate but I noticed an issue in the xbmc plugin, when changing from an sd channel to an hd channel or for that matter any channel that did not have the same resolution as the previous channel, what occurs is that the video will be improperly scaled and be totally unwatchable. I think the issue apparently comes down to vlc not being able to handle a stream that changes resolution mid-stream. I have a work around but it is a crude one, it is 2 lines of code that tell the plugin to stop playing if it is playing before changing the channel and then start playing again, The drawback is it shows the program menu in between every channel change but it works perfectly otherwise. Below is the code I used in bold its should go on line 330 of the Overlay.py, maybe youll have an idea to make it work a little nicer lol.
Code:
...
if startup:
#sock.send(chr(1)+chr(1)+chr(1)+chr((channel&4278190080)>>24)+chr((channel&16711680)>>16)+chr((channel&65280)>>8)+chr(channel&255))
url = url + "&require=false"
#else:
#sock.send(chr(1)+chr(1)+chr(2)+chr((channel&4278190080)>>24)+chr((channel&16711680)>>16)+chr((channel&65280)>>8)+chr(channel&255))
channel = ""
[b] if self.Player.isPlaying():
self.Player.stop()[/b]
try:
req = urllib2.urlopen(url)
#data = sock.recv(6)
#channel = ord(data[2])<<24|ord(data[3])<<16|ord(data[4])<<8|ord(data[5])
while True:
...