- Further cleaning of the streaming code
- Added codec check in video controller
This commit is contained in:
parent
b75d5c80f3
commit
42d3628579
|
@ -86,12 +86,13 @@ class VideoController:
|
||||||
if t == gst.MESSAGE_ELEMENT:
|
if t == gst.MESSAGE_ELEMENT:
|
||||||
#This occurs when an invalid codec is attempted to be played
|
#This occurs when an invalid codec is attempted to be played
|
||||||
#Need to insert some form of message to the user here
|
#Need to insert some form of message to the user here
|
||||||
#print "Element: " + message.structure.to_string()
|
if self.player.glossMgr.debug: print "GStreamer Bus msg: " + message.structure.to_string()
|
||||||
struc = message.structure
|
struc = message.structure
|
||||||
if struc is None:
|
if struc is None:
|
||||||
return
|
return
|
||||||
|
|
||||||
if struc.get_name() == "missing-plugin":
|
if struc.get_name() == "missing-plugin":
|
||||||
|
print "GStreamer Error (missing-plugin): " + message.structure.to_string()
|
||||||
self.isPlaying = False
|
self.isPlaying = False
|
||||||
self.video_texture.set_playing(False)
|
self.video_texture.set_playing(False)
|
||||||
self.player.stop_video()
|
self.player.stop_video()
|
||||||
|
|
|
@ -209,11 +209,11 @@ class MythBackendConnection(threading.Thread):
|
||||||
|
|
||||||
#This tries to optimise the request size
|
#This tries to optimise the request size
|
||||||
if (num_bytes == request_size) and (request_size < max_request_size):
|
if (num_bytes == request_size) and (request_size < max_request_size):
|
||||||
request_size = request_size + request_size_step
|
request_size += request_size_step
|
||||||
if request_size > max_request_size:
|
if request_size > max_request_size:
|
||||||
request_size = max_request_size
|
request_size = max_request_size
|
||||||
elif (request_size > request_size_step) and (num_bytes != request_size):
|
elif (request_size > request_size_step) and (num_bytes != request_size):
|
||||||
request_size = request_size - request_size_step
|
request_size -= request_size_step
|
||||||
|
|
||||||
|
|
||||||
print "Ending playback"
|
print "Ending playback"
|
||||||
|
|
Loading…
Reference in New Issue