1231
|
1 |
--- xl/player.py.orig Tue Jun 24 08:40:40 2008
|
|
2 |
+++ xl/player.py Tue Jun 24 08:41:48 2008
|
|
3 |
@@ -119,13 +119,13 @@
|
|
4 |
self.playbin.set_property('uri', uri.encode(xlmisc.get_default_encoding()))
|
|
5 |
|
|
6 |
formats = {
|
|
7 |
- 'mp3': 'mad',
|
|
8 |
- 'flac': 'flac',
|
|
9 |
- 'ogg': 'vorbis',
|
|
10 |
- 'mpc': 'musepack',
|
|
11 |
- 'tta': 'tta',
|
|
12 |
- 'mp4': 'faad',
|
|
13 |
- 'm4a': 'faad',
|
|
14 |
+ 'mp3': ['mad', 'flump3dec'],
|
|
15 |
+ 'flac': ['flac'],
|
|
16 |
+ 'ogg': ['vorbis'],
|
|
17 |
+ 'mpc': ['musepack'],
|
|
18 |
+ 'tta': ['tta'],
|
|
19 |
+ 'mp4': ['faad'],
|
|
20 |
+ 'm4a': ['faad'],
|
|
21 |
}
|
|
22 |
|
|
23 |
ext_re = re.compile(r'\.([^\.]*)$')
|
|
24 |
@@ -136,8 +136,14 @@
|
|
25 |
ext = ''
|
|
26 |
|
|
27 |
if ext in formats.keys():
|
|
28 |
- plugin = formats[ext]
|
|
29 |
- if not gst.registry_get_default().find_plugin(plugin):
|
|
30 |
+ plugins = formats[ext]
|
|
31 |
+ found = False
|
|
32 |
+ for p in plugins:
|
|
33 |
+ if gst.registry_get_default().find_plugin(p):
|
|
34 |
+ found = True
|
|
35 |
+ break
|
|
36 |
+
|
|
37 |
+ if found == False:
|
|
38 |
raise Exception(_("You do not have the "
|
|
39 |
"appropriate Gstreamer plugin installed to play "
|
|
40 |
"this file: %(uri)s") % {'uri': uri})
|