Skip to content

Commit

Permalink
Merge branch 'master' of github.com:stump/fofix
Browse files Browse the repository at this point in the history
  • Loading branch information
mdsitton committed Nov 21, 2010
2 parents 0b50c76 + 91686d8 commit fc2e81f
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 20 deletions.
8 changes: 5 additions & 3 deletions .gitignore
Expand Up @@ -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
2 changes: 1 addition & 1 deletion src/Credits.py
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/FoFiX.py
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions src/Stage.py
Expand Up @@ -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
Expand Down
24 changes: 14 additions & 10 deletions src/VideoPlayer.py
Expand Up @@ -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

Expand Down

0 comments on commit fc2e81f

Please sign in to comment.