[transmageddon/gtk3] Further fixes to get transmageddon working with GI bindings
- From: Christian Fredrik Kalager Schaller <uraeus src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [transmageddon/gtk3] Further fixes to get transmageddon working with GI bindings
- Date: Fri, 6 Jan 2012 18:41:56 +0000 (UTC)
commit 63fa209712ab0fa557c56b2d4e6e1816a634019c
Author: Christian Fredrik Kalager Schaller <christian schaller collabora co uk>
Date: Fri Jan 6 18:41:31 2012 +0000
Further fixes to get transmageddon working with GI bindings
src/codecfinder.py | 12 ++++++------
src/transmageddon.py | 18 ++++++++++--------
2 files changed, 16 insertions(+), 14 deletions(-)
---
diff --git a/src/codecfinder.py b/src/codecfinder.py
index 1b021cc..3892d2f 100644
--- a/src/codecfinder.py
+++ b/src/codecfinder.py
@@ -122,7 +122,7 @@ def get_muxer_element(containercaps):
to element names. Then return elementname
"""
- flist = Gst.Registry.get_default().get_feature_list(Gst.ElementFactory)
+ flist = Gst.Registry.get().get_feature_list(Gst.ElementFactory)
muxers = []
features = []
elementname = False
@@ -139,7 +139,7 @@ def get_muxer_element(containercaps):
print "containercaps is " + str(containercaps)
for muxer in muxers:
element = muxer
- factory = Gst.Registry.get_default().lookup_feature(str(muxer))
+ factory = Gst.Registry.get().lookup_feature(str(muxer))
sinkcaps = [x.get_caps() for x in factory.get_static_pad_templates() \
if x.direction == Gst.PadDirection.SRC]
print "sinkcaps are " + str(sinkcaps)
@@ -169,7 +169,7 @@ def get_audio_encoder_element(audioencodercaps):
will return False.
"""
- flist = Gst.Registry.get_default().get_feature_list(Gst.ElementFactory)
+ flist = Gst.Registry.get().get_feature_list(Gst.ElementFactory)
encoders = []
features = []
elementname = False
@@ -185,7 +185,7 @@ def get_audio_encoder_element(audioencodercaps):
incomingcaps = audioencodercaps
for x in encoders:
element = x
- factory = Gst.Registry.get_default().lookup_feature(str(x))
+ factory = Gst.Registry.get().lookup_feature(str(x))
sinkcaps = [x.get_caps() for x in factory.get_static_pad_templates() \
if x.direction == Gst.PAD_SRC]
for caps in sinkcaps:
@@ -214,7 +214,7 @@ def get_video_encoder_element(videoencodercaps):
will return False.
"""
- flist = Gst.Registry.get_default().get_feature_list(Gst.ElementFactory)
+ flist = Gst.Registry.get().get_feature_list(Gst.ElementFactory)
encoders = []
features = []
elementname = False
@@ -231,7 +231,7 @@ def get_video_encoder_element(videoencodercaps):
incomingcaps = videoencodercaps
for x in encoders:
element = x
- factory = Gst.Registry.get_default().lookup_feature(str(x))
+ factory = Gst.Registry.get().lookup_feature(str(x))
sinkcaps = [x.get_caps() for x in factory.get_static_pad_templates() \
if x.direction == Gst.PAD_SRC]
for caps in sinkcaps:
diff --git a/src/transmageddon.py b/src/transmageddon.py
index 029bcef..74461db 100644
--- a/src/transmageddon.py
+++ b/src/transmageddon.py
@@ -436,20 +436,22 @@ class TransmageddonUI:
# FORMAT_TIME only value implemented by all plugins used
# a lot of original code from Gst-python synchronizer.py example
def Increment_Progressbar(self):
- print "incrementing progressbar"
+ # print "incrementing progressbar"
if self.start_time == False:
self.start_time = time.time()
try:
- position, format = \
+ success, position = \
self._transcoder.uridecoder.query_position(Gst.Format.TIME)
- # print "position is " + str(position)
+ #print "position is " + str(position)
+ # print "success is " + str(success)
except:
position = Gst.CLOCK_TIME_NONE
try:
- duration, format = \
+ success, duration = \
self._transcoder.uridecoder.query_duration(Gst.Format.TIME)
# print "duration is " + str(duration)
+ # print "success is " + str(success)
except:
duration = Gst.CLOCK_TIME_NONE
if position != Gst.CLOCK_TIME_NONE:
@@ -460,8 +462,8 @@ class TransmageddonUI:
percent = (value*100)
timespent = time.time() - self.start_time
percent_remain = (100-percent)
- # print "percent remain " + str(percent_remain)
- # print "percentage is " + str(percent)
+ #print "percent remain " + str(percent_remain)
+ #print "percentage is " + str(percent)
if percent != 0:
rem = (timespent / percent) * percent_remain
else:
@@ -644,7 +646,7 @@ class TransmageddonUI:
self.containertoggle = True
# self.check_for_elements()
else:
- factory = Gst.Registry.get_default().lookup_feature(containerelement)
+ factory = Gst.Registry.get().lookup_feature(containerelement)
for x in factory.get_static_pad_templates():
if (x.direction == Gst.PadDirection.SINK):
sourcecaps = x.get_caps()
@@ -1112,7 +1114,7 @@ class TransmageddonUI:
os.remove(dotfile)
if os.access(pngfile, os.F_OK):
os.remove(pngfile)
- Gst.DEBUG_BIN_TO_DOT_FILE (self._transcoder.pipeline, \
+ Gst.debug_bin_to_dot_file (self._transcoder.pipeline, \
Gst.DEBUG_GRAPH_SHOW_ALL, 'transmageddon-debug-graph')
# check if graphviz is installed with a simple test
try:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]