Skip to content

Commit

Permalink
Still that strange issue with sometimes crashing pygame
Browse files Browse the repository at this point in the history
  • Loading branch information
tzwenn committed Oct 12, 2014
1 parent 46d1a08 commit 18b3b0d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions FrameHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def __del__(self):
self.finish()

def sessionName(self):
return str(self.streamInfo.get('deviceID', 'Unknown client'))
return str(self.streamInfo.get('deviceID', 'UnknownClient'))

def start(self):
""" Called on initialization. Reimplement in subclass if needed """
Expand Down Expand Up @@ -91,11 +91,11 @@ def handle(self, frame, timestamp):
self.setupWindow(frame)

# No idea why I need to keep that, but otherwise overlay.display crashes
dummyBufBecauseItSucks = frame.y + frame.u + frame.v
dummyBufBecauseItSucks = "%s%s%s" % (frame.y, frame.u, frame.v)
self.overlay.display((frame.y, frame.u, frame.v))
dummyBufBecauseItSucks = ""
pygame.event.get()
#self.clock.tick(5)
self.clock.tick(10)

def finish(self):
pygame.display.quit()
Expand Down
2 changes: 1 addition & 1 deletion MirrorHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def handlePacket(self, packet):

elif packet.payloadType == MirroringPacket.TYPE_CODECDATA:
self.decoder = h264decode.Decoder(packet.data)
self.frameHandler = FrameHandler.YUVFileStorage(self.streamInfo)
self.frameHandler = FrameHandler.SDLRenderer(self.streamInfo)

def sendCapabilities(self):
self.log_message("Sending capabilities")
Expand Down
2 changes: 1 addition & 1 deletion yuv2mp4.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ if [ $# -lt 1 ]; then
exit 1
fi

ffmpeg -vcodec rawvideo -f rawvideo -pix_fmt yuv420p -s:v 1036x648 -r 25 -i $1 -c:v libx264 ${1%.yuv}.mp4
ffmpeg -vcodec rawvideo -f rawvideo -pix_fmt yuv420p -s:v 1036x648 -r 25 -i "$1" -c:v libx264 "${1%.yuv}.mp4"

0 comments on commit 18b3b0d

Please sign in to comment.