[transmageddon] Fix tag setting



commit 97ab9d4943d33c5e23b3bce9e52b86ec25fdaa3c
Author: Christian Fredrik Kalager Schaller <uraeus linuxrisin org>
Date:   Sat Jan 12 18:17:16 2013 +0100

    Fix tag setting

 src/transcoder_engine.py |    7 ++++---
 src/transmageddon.py     |    8 ++++----
 2 files changed, 8 insertions(+), 7 deletions(-)
---
diff --git a/src/transcoder_engine.py b/src/transcoder_engine.py
index da0e06a..c535af8 100644
--- a/src/transcoder_engine.py
+++ b/src/transcoder_engine.py
@@ -297,9 +297,9 @@ class Transcoder(GObject.GObject):
            num = self.videodata[0]['videonum']
            denom = self.videodata[0]['videodenom']
 
+       # FIXME Question - should num and denom values be updated in self.videodata?
+
        self.videodata[0]['outputvideocaps']=Gst.caps_from_string(preset.vcodec.name+","+"height="+str(self.videodata[0]['videoheight'])+","+"width="+str(self.videodata[0]['videowidth'])+","+"framerate="+str(num)+"/"+str(denom))
-       # self.videocaps.set_value("pixelaspectratio", pixelaspectratio) this doesn't work due to pixelaspectratio being a fraction, 
-       # needs further investigation
 
    def noMorePads(self, dbin):
        if self.passcounter == int(0):
@@ -416,7 +416,8 @@ class Transcoder(GObject.GObject):
            #print(str(name) + " got GstTagSetter Interface " +str(tagyes))
            if tagyes ==True:
                taglist=Gst.TagList.new_empty()
-               # Gst.TagList.add_value(taglist, Gst.TagMergeMode.APPEND, Gst.TAG_APPLICATION_NAME, "Transmageddon transcoder" tag_setting_element.merge_tags(taglist, Gst.TAG_MERGE_APPEND)
+               taglist.add_value(Gst.TagMergeMode.APPEND, Gst.TAG_APPLICATION_NAME, "Transmageddon transcoder")
+               element.merge_tags(taglist, Gst.TagMergeMode.APPEND)
 
    def Pipeline (self, state):
        if state == ("playing"):
diff --git a/src/transmageddon.py b/src/transmageddon.py
index f29a7d9..9445c28 100644
--- a/src/transmageddon.py
+++ b/src/transmageddon.py
@@ -627,7 +627,6 @@ class TransmageddonUI(Gtk.ApplicationWindow):
                    streamid=i.get_stream_id()
                    if streamid not in self.audiostreamids:
                        self.audiostreamcounter=self.audiostreamcounter+1
-                       # self.inputaudiocaps.append(i.get_caps())
                        self.audiostreamids.append(streamid)
                        self.haveaudio=True
                        self.audiodata.append(self.add_audiodata_row(i.get_channels(), i.get_sample_rate(), i.get_caps(), False, streamid, False, False, i.get_language()))
@@ -686,9 +685,10 @@ class TransmageddonUI(Gtk.ApplicationWindow):
                            self.audioinformation.set_markup("".join(self.markupaudioinfo))
                            x=x+1
 
-               if self.haveaudio==False:
-                       self.audioinformation.set_markup(''.join(('<small>', _("No Audio"), '</small>',"\n", '<small>', "",'</small>')))
-
+           else: # if there is no audio streams
+               self.audioinformation.set_markup(''.join(('<small>', _("No Audio"), '</small>',"\n", '<small>', "",'</small>')))
+               if not self.audiodata: # creates empty data set
+                   self.audiodata.append(self.add_audiodata_row(None, None, None, False, None, False, False, None))
 
            if self.havevideo==True:
                self.videoinformation.set_markup(''.join(('<small>', 'Video width&#47;height: ', str(self.videodata[0]['videowidth']), "x", str(self.videodata[0]['videoheight']), '</small>',"\n", '<small>', 'Video codec: ',  str(GstPbutils.pb_utils_get_codec_description   (self.videodata[0]['inputvideocaps'])), '</small>' )))



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]