[transmageddon] Implement use of new prs directory function (660760)
- From: Christian Fredrik Kalager Schaller <uraeus src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [transmageddon] Implement use of new prs directory function (660760)
- Date: Fri, 9 Dec 2011 14:12:24 +0000 (UTC)
commit 52d1d457669581f388b67b90220a4146cbe38d88
Author: Christian Fredrik Kalager Schaller <christian schaller collabora co uk>
Date: Fri Dec 9 14:11:43 2011 +0000
Implement use of new prs directory function (660760)
presets/Makefile.am | 2 +-
src/transcoder_engine.py | 5 ++++-
src/utils.py | 2 ++
3 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/presets/Makefile.am b/presets/Makefile.am
index 7a0422f..cc484ba 100755
--- a/presets/Makefile.am
+++ b/presets/Makefile.am
@@ -1,5 +1,5 @@
-presetdir = $(datadir)/gstreamer-0.10/presets
+presetdir = $(datadir)/transmageddon/presets
preset_DATA = ffenc_ac3.prs GstFaac.prs GstVorbisEnc.prs \
ffenc_flv.prs GstLameMP3Enc.prs \
ffenc_h263p.prs GstXvidEnc.prs \
diff --git a/src/transcoder_engine.py b/src/transcoder_engine.py
index c69d88c..b891e3f 100644
--- a/src/transcoder_engine.py
+++ b/src/transcoder_engine.py
@@ -27,6 +27,7 @@ try:
import glib
pygst.require("0.10")
import gst
+
except Exception, e:
print "failed to import required modules"
print e
@@ -56,7 +57,9 @@ class Transcoder(gobject.GObject):
self.containercaps=gst.Caps("application/x-id3")
self.container=gst.Caps("application/x-id3")
-
+ # set preset directory
+ gst.preset_set_app_dir("/usr/share/transmageddon/presets/")
+
# Choose plugin based on Codec Name
# or switch to remuxing mode if any of the values are set to 'pastr'
self.stoptoggle=False
diff --git a/src/utils.py b/src/utils.py
index 416ce12..4351602 100644
--- a/src/utils.py
+++ b/src/utils.py
@@ -28,6 +28,7 @@ import gettext
import logging
import os
import sys
+import xdg.BaseDirectory
_ = gettext.gettext
@@ -39,6 +40,7 @@ def get_search_paths():
@return: A list of paths to search in the order they will be searched
"""
return [
+ xdg.BaseDirectory.save_data_path("transmageddon"),
os.getcwd(),
os.path.join(os.getcwd(), ".."),
os.path.expanduser(os.path.join("~", ".transmageddon")),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]