[transmageddon] Update to improve missing codec installation for decoders Code probably not 100% correct
- From: Christian Fredrik Kalager Schaller <uraeus src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [transmageddon] Update to improve missing codec installation for decoders Code probably not 100% correct
- Date: Fri, 28 Sep 2012 22:00:21 +0000 (UTC)
commit f77b624d76e951ad0291b085e3da972e1823cb1c
Author: Christian Schaller <uraeus linuxrising org>
Date: Fri Sep 28 23:58:59 2012 +0200
Update to improve missing codec installation for decoders
Code probably not 100% correct
src/transcoder_engine.py | 11 ++++++-----
src/transmageddon.py | 7 +++++++
2 files changed, 13 insertions(+), 5 deletions(-)
---
diff --git a/src/transcoder_engine.py b/src/transcoder_engine.py
index b680803..387d7e3 100644
--- a/src/transcoder_engine.py
+++ b/src/transcoder_engine.py
@@ -341,11 +341,12 @@ class Transcoder(GObject.GObject):
#self.emit('got-error', err.message)
elif mtype == Gst.MessageType.ELEMENT:
if GstPbutils.is_missing_plugin_message(message):
- self.missingplugin=message
- # output=GstPbutils.missing_plugin_message_get_description(message)
- # print(output)
- # GstPbutils.missing_plugin_message_get_installer_detail(message)
- self.emit('missing-plugin')
+ if self.missingplugin==False: #don't think this is correct if more than one plugin installed
+ self.missingplugin=message
+ #output=GstPbutils.missing_plugin_message_get_description(message)
+ #print(output)
+ # GstPbutils.missing_plugin_message_get_installer_detail(message)
+ self.emit('missing-plugin')
elif mtype == Gst.MessageType.ASYNC_DONE:
self.emit('ready-for-querying')
diff --git a/src/transmageddon.py b/src/transmageddon.py
index 926f26a..d78463d 100644
--- a/src/transmageddon.py
+++ b/src/transmageddon.py
@@ -808,6 +808,7 @@ class TransmageddonUI(Gtk.ApplicationWindow):
return True
def install_plugin(self, signal):
+ # print("install plugin called")
plugin=GstPbutils.missing_plugin_message_get_installer_detail(self._transcoder.missingplugin)
missing = []
missing.append(plugin)
@@ -818,6 +819,7 @@ class TransmageddonUI(Gtk.ApplicationWindow):
self.on_cancelbutton_clicked("click")
def donemessage(self, donemessage, null):
+ # print("donemessage is called")
if donemessage == GstPbutils.InstallPluginsReturn.SUCCESS:
if Gst.update_registry():
print("Plugin registry updated, trying again")
@@ -841,6 +843,9 @@ class TransmageddonUI(Gtk.ApplicationWindow):
self.cancelbutton.set_sensitive(False)
self.transcodebutton.set_sensitive(True)
elif donemessage == GstPbutils.InstallPluginsReturn.USER_ABORT:
+ self._cancel_encoding = \
+ transcoder_engine.Transcoder.Pipeline(self._transcoder,"null")
+ print("user abort")
context_id = self.StatusBar.get_context_id("EOS")
self.StatusBar.push(context_id, _("Codec installation aborted."))
self.FileChooser.set_sensitive(True)
@@ -854,6 +859,7 @@ class TransmageddonUI(Gtk.ApplicationWindow):
def check_for_elements(self):
+ # print("checking for elements")
# this function checks for missing plugins using pbutils
if self.codeccontainer==False:
containerstatus=True
@@ -896,6 +902,7 @@ class TransmageddonUI(Gtk.ApplicationWindow):
missing.append(GstPbutils.missing_encoder_installer_detail_new(x))
context = GstPbutils.InstallPluginsContext ()
context.set_xid(self.window.get_xid())
+ print("async called")
GstPbutils.install_plugins_async (missing, context, \
self.donemessage, "NULL")
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]