summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Seguin <ixce@ed3n-n.aulo.in>2009-07-19 21:17:20 +0200
committerGuillaume Seguin <ixce@ed3n-n.aulo.in>2009-07-19 21:17:20 +0200
commit1679c096fef3db7a637e41494722e0134bae8100 (patch)
tree222495e6453a574f261a523457a26694869b03fd
parentbcea41367b0b705e725eff65903891611cab5635 (diff)
downloadpylyricsdisplay-1679c096fef3db7a637e41494722e0134bae8100.tar.gz
pylyricsdisplay-1679c096fef3db7a637e41494722e0134bae8100.tar.bz2
Use absolute path when specifying gstreamer uris
-rw-r--r--pylyricsdisplay.py4
-rw-r--r--pylyricsrecord.py5
2 files changed, 5 insertions, 4 deletions
diff --git a/pylyricsdisplay.py b/pylyricsdisplay.py
index 75d27f7..181082d 100644
--- a/pylyricsdisplay.py
+++ b/pylyricsdisplay.py
@@ -29,7 +29,7 @@ import cluttergtk
import clutter
import gobject, gtk
import pango
-import sys
+import os, sys
from datetime import datetime, timedelta
class LyricsDisplay (cluttergtk.Embed):
@@ -163,7 +163,7 @@ class PyLyricsDisplay (object):
vbox.pack_end (self.statusbar, False, False)
self.player = gst.element_factory_make ("playbin", "player")
- self.player.set_property ('uri', "file://" + music_uri)
+ self.player.set_property ('uri', "file://" + os.path.abspath (music_uri))
fakesink = gst.element_factory_make ("fakesink", "fakesink")
self.player.set_property ("video-sink", fakesink)
diff --git a/pylyricsrecord.py b/pylyricsrecord.py
index 806078e..a1d7dd8 100644
--- a/pylyricsrecord.py
+++ b/pylyricsrecord.py
@@ -25,8 +25,9 @@ Authors :
import pygst
pygst.require('0.10')
import gst
-import gobject, gtk, sys
+import gobject, gtk
import pango
+import os, sys
from datetime import datetime, timedelta
class LyricsEditor (gtk.TextView):
@@ -128,7 +129,7 @@ class PyLyricsRecord (object):
vbox.pack_end (self.statusbar, False, False)
self.player = gst.element_factory_make ("playbin", "player")
- self.player.set_property ('uri', "file://" + music_uri)
+ self.player.set_property ('uri', "file://" + os.path.abspath (music_uri))
fakesink = gst.element_factory_make ("fakesink", "fakesink")
self.player.set_property ("video-sink", fakesink)