[transmageddon] Apply patches from Alberto Ruiz
- From: Christian Fredrik Kalager Schaller <uraeus src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [transmageddon] Apply patches from Alberto Ruiz
- Date: Fri, 14 Mar 2014 16:56:00 +0000 (UTC)
commit 8b323b50d97cdf8498a64b373c86ed6401af7280
Author: Christian Fredrik Kalager Schaller <uraeus linuxrising org>
Date: Fri Mar 14 17:55:25 2014 +0100
Apply patches from Alberto Ruiz
.gitmodules | 2 +-
autogen.sh | 2 +-
profiles/sonys.xml | 4 +-
src/transcoder_engine.py | 4 ++-
src/transmageddon.py | 53 ++++++++++++++++++++++++---------------------
5 files changed, 35 insertions(+), 30 deletions(-)
---
diff --git a/.gitmodules b/.gitmodules
index 01268c0..289a248 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,3 +1,3 @@
[submodule "common"]
path = common
- url = git://git.pitivi.org/git/common.git
+ url = http://anongit.freedesktop.org/git/gstreamer/common.git
diff --git a/autogen.sh b/autogen.sh
index a35f842..e58c20f 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -6,7 +6,7 @@ srcfile=src/transmageddon.py
if test ! -f common/Makefile.am;
then
- rm -R common/
+ #rm -R common/
echo "+ Setting up common submodule"
git submodule init
fi
diff --git a/profiles/sonys.xml b/profiles/sonys.xml
index 2d4e418..f508989 100644
--- a/profiles/sonys.xml
+++ b/profiles/sonys.xml
@@ -15,8 +15,8 @@
<profile>
<name>Normal</name>
- <container>video/x-matroska</container>
- <extension>mkv</extension>
+ <container>video/quicktime,variant=iso</container>
+ <extension>mp4</extension>
<audio>
<name>audio/mpeg,mpegversion=4, base-profile=lc</name>
<channels>1, 2</channels>
diff --git a/src/transcoder_engine.py b/src/transcoder_engine.py
index a12a97b..b9b76a4 100644
--- a/src/transcoder_engine.py
+++ b/src/transcoder_engine.py
@@ -142,6 +142,7 @@ class Transcoder(GObject.GObject):
x=0
self.audioprofilenames=[]
while x < len(self.audiodata):
+ print(self.audiodata)
if self.audiodata[x]['outputaudiocaps'] != (False or "noaud"):
if self.streamdata['container']==False:
self.encodebinprofile = GstPbutils.EncodingAudioProfile.new
(self.audiodata[x]['outputaudiocaps'], audiopreset, Gst.Caps.new_any(), 0)
@@ -149,7 +150,8 @@ class Transcoder(GObject.GObject):
audiopreset=None
self.audioprofile =
GstPbutils.EncodingAudioProfile.new(self.audiodata[x]['outputaudiocaps'], audiopreset, Gst.Caps.new_any(), 0)
self.audioprofilenames.append("audioprofilename"+str(x))
- self.audioprofile.set_name(self.audioprofilenames[x])
+ print(self.audioprofilenames)
+ self.audioprofile.set_name(self.audioprofilenames[-1])
self.encodebinprofile.add_profile(self.audioprofile)
x=x+1
diff --git a/src/transmageddon.py b/src/transmageddon.py
index bcdc207..fd734f6 100644
--- a/src/transmageddon.py
+++ b/src/transmageddon.py
@@ -235,6 +235,8 @@ class TransmageddonUI(Gtk.ApplicationWindow):
self.videorows=[]
self.audiocodecs=[]
self.videocodecs=[]
+ self.dvddevice=[]
+ self.dvdname=[]
# The variables are used for the DVD discovery
self.finder = None
@@ -271,21 +273,18 @@ class TransmageddonUI(Gtk.ApplicationWindow):
#Define functionality of our button and main window
self.box = self.builder.get_object("window")
- self.videoinformation = self.builder.get_object("videoinformation")
- self.audioinformation = self.builder.get_object("audioinformation")
- self.videocodec = self.builder.get_object("videocodec")
- self.audiocodec = self.builder.get_object("audiocodec")
- self.langbutton = self.builder.get_object("langbutton")
+
+ ui_elements = [
+ "videoinformation", "audioinformation",
+ "videocodec", "audiocodec", "langbutton", "CodecBox",
+ "presetchoice", "containerchoice", "rotationchoice", "transcodebutton",
+ "ProgressBar", "cancelbutton", "StatusBar", "table1"]
+
+ for element in ui_elements:
+ setattr(self, element, self.builder.get_object(element))
+
+ self.videobox = dynamic_comboboxes_video(GObject.TYPE_PYOBJECT)
self.videobox = dynamic_comboboxes_video(GObject.TYPE_PYOBJECT)
- self.CodecBox = self.builder.get_object("CodecBox")
- self.presetchoice = self.builder.get_object("presetchoice")
- self.containerchoice = self.builder.get_object("containerchoice")
- self.rotationchoice = self.builder.get_object("rotationchoice")
- self.transcodebutton = self.builder.get_object("transcodebutton")
- self.ProgressBar = self.builder.get_object("ProgressBar")
- self.cancelbutton = self.builder.get_object("cancelbutton")
- self.StatusBar = self.builder.get_object("StatusBar")
- self.table1 = self.builder.get_object("table1")
self.CodecBox.attach(self.videobox, 2, 3, 1, 2, yoptions = Gtk.AttachOptions.SHRINK)
self.CodecBox.show_all()
self.containerchoice.connect("changed", self.on_containerchoice_changed)
@@ -644,7 +643,7 @@ class TransmageddonUI(Gtk.ApplicationWindow):
def dvdreadproperties(self, parent, element):
if self.isdvd:
- element.set_property("device", self.dvddevice)
+ element.set_property("device", self.dvddevice[0])
element.set_property("title", self.streamdata['dvdtitle'])
def succeed(self, discoverer, info, error):
@@ -1284,7 +1283,7 @@ class TransmageddonUI(Gtk.ApplicationWindow):
"""
A video DVD has been found, update the source combo box!
"""
- # print("dvd found")
+ print("dvd found")
if hasattr(self.combo, "get_model"):
model = self.combo.get_model()
for pos, item in enumerate(model):
@@ -1298,7 +1297,7 @@ class TransmageddonUI(Gtk.ApplicationWindow):
"""
A video DVD has been removed, update the source combo box!
"""
- # print("dvd lost")
+ print("dvd lost")
model = self.combo.get_model()
self.setup_source()
@@ -1327,8 +1326,10 @@ class TransmageddonUI(Gtk.ApplicationWindow):
client = GUdev.Client(subsystems=['block'])
for device in client.query_by_subsystem("block"):
if device.has_property("ID_CDROM"):
- self.dvddevice=device.get_device_file()
- self.dvdname=device.get_property("ID_FS_LABEL")
+ print(device.get_property("ID_FS_LABEL"))
+ print(device)
+ self.dvddevice.append(device.get_device_file())
+ self.dvdname.append(device.get_property("ID_FS_LABEL"))
# Setup input source discovery
if not self.finder:
@@ -1341,7 +1342,7 @@ class TransmageddonUI(Gtk.ApplicationWindow):
self.on_disc_lost)
lsdvdexist = which.which("lsdvd")
- if self.dvdname and lsdvdexist: # only use this option is there is a DVD and ldvd is installed
+ if self.dvdname[0] and lsdvdexist: # only use this option is there is a DVD and ldvd is installed
theme = Gtk.IconTheme.get_default()
size= Gtk.icon_size_lookup(Gtk.IconSize.MENU)[1]
cdrom=theme.load_icon(Gtk.STOCK_CDROM, size, 0)
@@ -1351,8 +1352,10 @@ class TransmageddonUI(Gtk.ApplicationWindow):
liststore = Gtk.ListStore(GdkPixbuf.Pixbuf, GObject.TYPE_STRING, GObject.TYPE_STRING,
GObject.TYPE_INT)
liststore.append([None, "", "", 0])
liststore.append([fileopen, "Choose File...", "", 1])
- liststore.append([cdrom, self.dvdname, self.dvddevice, 2])
-
+ x=0
+ while x < len(self.dvdname):
+ liststore.append([cdrom, self.dvdname[x], self.dvddevice[x], 2])
+ x=x+1
self.combo = Gtk.ComboBox(model=liststore)
renderer_text = Gtk.CellRendererText()
@@ -1455,10 +1458,10 @@ class TransmageddonUI(Gtk.ApplicationWindow):
dvd.dvdwindow.run()
self.isdvd=dvd.isdvd
if self.isdvd != False:
- self.streamdata['filename'] = self.dvddevice
- self.streamdata['filechoice'] = "dvd://"+self.dvddevice
+ self.streamdata['filename'] = self.dvddevice[0]
+ self.streamdata['filechoice'] = "dvd://"+self.dvddevice[0]
self.streamdata['dvdtitle']=dvd.dvdtitle
- self.on_filechooser_file_set(self,self.dvddevice)
+ self.on_filechooser_file_set(self,self.dvddevice[0])
def set_source_to_path(self, path):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]