From 4f63b9d17ce0daed741ea77422381591c1b3586d Mon Sep 17 00:00:00 2001 From: John Stumpo Date: Thu, 28 Oct 2010 13:35:03 -0400 Subject: [PATCH 1/3] Update .gitignore to properly ignore custom controllers and players. --- .gitignore | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 45c96aa66..4216526d9 100644 --- a/.gitignore +++ b/.gitignore @@ -16,12 +16,14 @@ src/pypitch/_pypitch.cpp src/cmgl.c gstreamer/* data/library.zip -data/users/players/FoFiX-players.cache -data/users/players/*.png +data/users/players/* +!data/users/players/default.png +!data/users/players/default.ini +data/users/controllers/* +!data/users/controllers/default[dgm].ini data/songs/ data/themes/* !data/themes/MegaLight !data/themes/MegaLight GH3 !data/themes/MegaLight V4 !data/themes/Uberlight -!data/users/players/default.png From e9c8b987c13434fe4013aede94a3b03f0993fa85 Mon Sep 17 00:00:00 2001 From: John Stumpo Date: Fri, 19 Nov 2010 17:15:42 -0500 Subject: [PATCH 2/3] Load videos from the .ogv extension rather than .avi. --- src/Credits.py | 2 +- src/FoFiX.py | 2 +- src/Stage.py | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Credits.py b/src/Credits.py index eebe4df16..226c25bc1 100644 --- a/src/Credits.py +++ b/src/Credits.py @@ -179,7 +179,7 @@ def __init__(self, engine, songName = None): # - credits_video_start_time # - credits_video_end_time vidSource = os.path.join(Version.dataPath(), 'themes', self.themename, \ - 'menu', 'credits.avi') + 'menu', 'credits.ogv') if os.path.exists(vidSource): winWidth, winHeight = self.engine.view.geometry[2:4] songVideoStartTime = 0 diff --git a/src/FoFiX.py b/src/FoFiX.py index b31a3f812..5cbbd3777 100644 --- a/src/FoFiX.py +++ b/src/FoFiX.py @@ -225,7 +225,7 @@ def main(): # - intro_video_end_time themename = Config.get("coffee", "themename") vidSource = os.path.join(Version.dataPath(), 'themes', themename, \ - 'menu', 'intro.avi') + 'menu', 'intro.ogv') if os.path.isfile(vidSource): winWidth, winHeight = engine.view.geometry[2:4] songVideoStartTime = 0 diff --git a/src/Stage.py b/src/Stage.py index 663c3116d..cedbf10b6 100644 --- a/src/Stage.py +++ b/src/Stage.py @@ -102,21 +102,21 @@ def loadVideo(self, libraryName, songName, songVideo = None, if songVideo is not None and \ os.path.isfile(os.path.join(songAbsPath, songVideo)): self.vidSource = os.path.join(songAbsPath, songVideo) - elif os.path.exists(os.path.join(songAbsPath, "default.avi")): + elif os.path.exists(os.path.join(songAbsPath, "default.ogv")): Log.warn("Video not found: %s" % \ os.path.join(songAbsPath, songVideo)) - self.vidSource = os.path.join(songAbsPath, "default.avi") + self.vidSource = os.path.join(songAbsPath, "default.ogv") if self.vidSource is None: if self.songStage == 1: Log.warn("Video not found: %s" % \ - os.path.join(songAbsPath, "default.avi")) + os.path.join(songAbsPath, "default.ogv")) songVideoStartTime = None songVideoEndTime = None - self.vidSource = os.path.join(self.pathfull, "default.avi") + self.vidSource = os.path.join(self.pathfull, "default.ogv") if not os.path.exists(self.vidSource): Log.warn("Video not found: %s" % \ - os.path.join(self.pathfull, "default.avi")) + os.path.join(self.pathfull, "default.ogv")) Log.warn("No video found, falling back to default static image mode for now") self.mode = 1 # Fallback self.vidSource = None From 91686d847328c1fb7a9b4c920d41dbc349c48dfa Mon Sep 17 00:00:00 2001 From: John Stumpo Date: Sun, 21 Nov 2010 12:31:24 -0500 Subject: [PATCH 3/3] Refuse to play non-Theora video while we're still using gstreamer. --- src/VideoPlayer.py | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/VideoPlayer.py b/src/VideoPlayer.py index ae0a13bf2..9dabff5fe 100644 --- a/src/VideoPlayer.py +++ b/src/VideoPlayer.py @@ -119,25 +119,29 @@ def videoDiscover(self, d, isMedia): vcodec = d.tags.get('video-codec', '[plugin did not give a name]') Log.debug('Video codec: ' + vcodec) if vcodec not in FUTUREPROOF_VIDEO_CODECS: - Log.warn('Support for %s is not guaranteed in the future; try one of: %s' % (vcodec, ', '.join(FUTUREPROOF_VIDEO_CODECS))) + self.validFile = False if d.is_audio: acodec = d.tags.get('audio-codec', '[plugin did not give a name]') Log.debug('Audio codec: ' + acodec) if acodec not in FUTUREPROOF_AUDIO_CODECS: - Log.warn('Support for %s is not guaranteed in the future; try one of: %s' % (acodec, ', '.join(FUTUREPROOF_AUDIO_CODECS))) + self.validFile = False container = d.tags.get('container-format', '[plugin did not give a name]') Log.debug('Container format: ' + container) if container not in FUTUREPROOF_CONTAINERS: - Log.warn('Support for %s is not guaranteed in the future; try one of: %s' % (container, ', '.join(FUTUREPROOF_CONTAINERS))) - - self.vidWidth, self.vidHeight = d.videowidth, d.videoheight - # Force mute if no sound track is available or - # else you'll get nothing but a black screen! - if not d.is_audio and not self.mute: - Log.warn("Video has no sound ==> forcing mute.") - self.mute = True + self.validFile = False + + if not self.validFile: + Log.warn('Refusing to play non-Ogg, non-Theora, or (if audio is present) non-Vorbis video file.') + else: + self.vidWidth, self.vidHeight = d.videowidth, d.videoheight + # Force mute if no sound track is available or + # else you'll get nothing but a black screen! + if not d.is_audio and not self.mute: + Log.warn("Video has no sound ==> forcing mute.") + self.mute = True + else: self.validFile = False