[transmageddon] Clean up comment prints and remove dead code



commit e1e020c059fcd96074cbbe66c08177fe9d32abff
Author: Christian Fredrik Kalager Schaller <christian schaller collabora co uk>
Date:   Thu Apr 14 22:14:20 2011 +0100

    Clean up comment prints and remove dead code

 src/transcoder_engine.py |   24 ++----------------------
 src/transmageddon.py     |   34 ----------------------------------
 2 files changed, 2 insertions(+), 56 deletions(-)
---
diff --git a/src/transcoder_engine.py b/src/transcoder_engine.py
index 33a5d3d..596e6c4 100644
--- a/src/transcoder_engine.py
+++ b/src/transcoder_engine.py
@@ -55,7 +55,7 @@ class Transcoder(gobject.GObject):
            if self.audiocaps.intersect(gst.Caps("audio/mpeg, mpegversion=1, layer=3")):
                self.containercaps=gst.Caps("application/x-id3")
                self.container=gst.Caps("application/x-id3")
-               print "self.encodebinprofile is set to id3mux"
+
 
        # Choose plugin based on Codec Name
        # or switch to remuxing mode if any of the values are set to 'pastr'
@@ -67,12 +67,6 @@ class Transcoder(gobject.GObject):
        self.videopasstoggle = VIDEOPASSTOGGLE
        self.inputvideocaps = INPUTVIDEOCAPS
        self.doaudio= False
-       # if self.audiopasstoggle == False:
-       #    self.AudioEncoderPlugin = \
-       #            codecfinder.get_audio_encoder_element(self.audiocaps)
-       # if self.videopasstoggle == False:
-       #    self.VideoEncoderPlugin = \
-       #            codecfinder.get_video_encoder_element(self.videocaps)
        self.preset = PRESET
        self.oheight = OHEIGHT
        self.owidth = OWIDTH
@@ -130,10 +124,8 @@ class Transcoder(gobject.GObject):
            elif self.audiocaps.intersect(gst.Caps("audio/x-flac")):
                self.audiocaps=gst.Caps("audio/x-flac")
        else:
-           print "creating encoderbinprofile with muxer " + str(self.containercaps)
            self.encodebinprofile = gst.pbutils.EncodingContainerProfile ("containerformat", None , self.containercaps, None)
        if self.container==False:
-           print "setting encodebinprofile to audioprofile if no container"
            self.encodebinprofile = gst.pbutils.EncodingAudioProfile (self.audiocaps, None, gst.caps_new_any(), 0)
        else:
            self.audioprofile = gst.pbutils.EncodingAudioProfile (self.audiocaps, None, gst.caps_new_any(), 0)
@@ -142,15 +134,10 @@ class Transcoder(gobject.GObject):
            if (self.videocaps != False):
                self.videoprofile = gst.pbutils.EncodingVideoProfile (self.videocaps, None, gst.caps_new_any(), 0)
                self.encodebinprofile.add_profile(self.videoprofile)
-               print "creating videoprofile with caps " + str(self.videocaps)
        self.encodebin = gst.element_factory_make ("encodebin", None)
        self.encodebin.set_property("profile", self.encodebinprofile)
        self.encodebin.set_property("avoid-reencoding", True)
        self.pipeline.add(self.encodebin)
-      # if self.videocaps=="novid":
-      #     self.fakesink = gst.element_factory_make("fakesink", "fakesink")
-      #     self.fakesink.set_property("sync", True)
-      #     self.pipeline.add(self.fakesink)
 
        self.remuxcaps = gst.Caps()
        if self.audiopasstoggle:
@@ -171,7 +158,6 @@ class Transcoder(gobject.GObject):
 
 
        if (self.audiopasstoggle) or (self.videopasstoggle) or (self.videocaps=="novid"):
-           print "uridecodebin property caps set"
            self.uridecoder.set_property("caps", self.remuxcaps)
  
        self.pipeline.add(self.uridecoder)
@@ -183,11 +169,6 @@ class Transcoder(gobject.GObject):
        self.pipeline.add(self.transcodefileoutput)
        self.encodebin.link(self.transcodefileoutput)
 
-       # print "reached end of first pipeline bulk, next step dynamic
-       # audio/video pads"
-
-       #if self.videocaps=="novid":
-       #    self.fakesink.set_state(gst.STATE_PAUSED)
        self.uridecoder.set_state(gst.STATE_PAUSED)
        self.encodebin.set_state(gst.STATE_PAUSED)
        # print "setting uridcodebin to paused"
@@ -205,7 +186,6 @@ class Transcoder(gobject.GObject):
 
    # Gather preset values and create preset elements
    def provide_presets(self):
-       print "providing presets"
        devices = presets.get()
        device = devices[self.preset]
        preset = device.presets["Normal"]
@@ -234,7 +214,7 @@ class Transcoder(gobject.GObject):
        wmin, wmax  =  preset.vcodec.width
        hmin, hmax = preset.vcodec.height
        width, height = self.owidth, self.oheight
-       # print "owidth is " + str(self.owidth) + " oheight is " + str(self.oheight)
+
        self.vpreset = []       
        voutput = preset.vcodec.presets[0].split(", ")
        for x in voutput:
diff --git a/src/transmageddon.py b/src/transmageddon.py
index 4d03f2c..fb0a0dc 100644
--- a/src/transmageddon.py
+++ b/src/transmageddon.py
@@ -715,14 +715,11 @@ class TransmageddonUI:
            containerchoice = self.builder.get_object ("containerchoice").get_active_text ()
            containerstatus = codecfinder.get_muxer_element(codecfinder.containermap[containerchoice])
            if self.havevideo:
-               print "self.VideoCodec is before test " + str(self.VideoCodec)
                if self.videopasstoggle != True:
                    if self.VideoCodec == "novid":
                        videostatus=True
                    else:
-                       print "self.VideoCodec is " + str(self.VideoCodec)
                        videostatus = codecfinder.get_video_encoder_element(self.VideoCodec)
-                       print "videostatus is " + str(videostatus)
                else:
                    videostatus=True
 
@@ -786,7 +783,6 @@ class TransmageddonUI:
            self.ProgressBar.set_text(_("Pass %(count)d Progress") % {'count': self.passcounter})
        if self.audiodata.has_key("samplerate"):
            self.check_for_elements()
-           print "missingtoggle is " + str(self.missingtoggle)
            if self.missingtoggle==False:
                self._start_transcoding()
        else:
@@ -818,7 +814,6 @@ class TransmageddonUI:
        if self.builder.get_object("containerchoice").get_active()!= -1:
            self.transcodebutton.set_sensitive(True)
            if self.builder.get_object("containerchoice").get_active()==12:
-               print "choosing no container"
                self.container=False
                audio_codecs = [ 'mp3', 'AAC', 'FLAC' ]
                self.audiocodecs =[]
@@ -830,9 +825,7 @@ class TransmageddonUI:
                self.audiorows[0].remove_text(0)
            self.houseclean=False
            if self.usingpreset==True:
-               print "setting preset codec into drop down list"
                self.audiorows[0].append_text(str(gst.pbutils.get_codec_description(self.presetaudiocodec)))
-               print "preset codec name is " + str(gst.pbutils.get_codec_description(self.presetaudiocodec))
                self.audiorows[0].set_active(0)
            else:
                for c in audio_codecs:
@@ -841,11 +834,8 @@ class TransmageddonUI:
                    self.audiorows[0].append_text(c)
                    self.audiorows[0].set_sensitive(True)
                    self.audiorows[0].set_active(0)
-               print "self.audiocodecs has just been populated and is " + str(self.audiocodecs)
            self.oldaudiocodec=audio_codecs
-           print "self.audiocodecs is " + str(self.audiocodecs)
            if self.havevideo==True:
-               print "self.container in have_video is " + str(self.container)
                if self.container != False:
                    self.rotationchoice.set_sensitive(True)
                    video_codecs = supported_video_container_map[self.container]
@@ -855,9 +845,7 @@ class TransmageddonUI:
                        self.videorows[0].remove_text(0)
                    self.houseclean=False
                    if self.usingpreset==True:
-                       print "setting preset codec into drop down list"
                        self.videorows[0].append_text(str(gst.pbutils.get_codec_description(self.presetvideocodec)))
-                       print "preset codec name is " + str(gst.pbutils.get_codec_description(self.presetvideocodec))
                        self.videorows[0].set_active(0)
                    else:
                        for c in video_codecs:
@@ -907,47 +895,25 @@ class TransmageddonUI:
        self.rotationvalue = self.rotationchoice.get_active()
 
    def on_audiocodec_changed(self, widget):
-       print "self.AudioCodec is " + str(self.AudioCodec)
-       print "self.audiorows is " + str(self.audiorows[0].get_active())
-       print "self.audiocodecs is here " + str(self.audiocodecs)
        if (self.houseclean == False and self.usingpreset==False):
            self.AudioCodec = self.audiocodecs[self.audiorows[0].get_active()]
-           print "self.AudioCodec is " + str(self.AudioCodec)
-           print self.audiorows[0].get_active()
-           print "self container is set to and needs to be acted upon " + str(self.container)
            if self.container != False:
                if self.audiorows[0].get_active() ==  self.audiopassmenuno:
                    self.audiopasstoggle=True
-                   print "you choose audio passthrough"
        elif self.usingpreset==True:
            self.AudioCodec = gst.Caps(self.presetaudiocodec)    
-           print "self.AudioCodec is (from preset) " + str(self.AudioCodec)
 
    def on_videocodec_changed(self, widget):
        if (self.houseclean == False and self.usingpreset==False):
-           print "self.container in videocodec changes is " + str(self.container)
            if self.container != False:
                self.VideoCodec = self.videocodecs[self.videorows[0].get_active()]
            else:
                    self.VideoCodec = "novid"
-           print "self.VideoCodec is " + str(self.VideoCodec)
-           print self.videorows[0].get_active()
            if self.videorows[0].get_active() == self.videopassmenuno:
                self.videopasstoggle=True
-               print " you choose video passthrough"
        elif self.usingpreset==True:
            self.VideoCodec = gst.Caps(self.presetvideocodec)
 
-
-   #def on_videobutton_pressed(self, widget, codec):
-   #    self.VideoCodec = codec
-   #    if self.VideoCodec == "Video passthrough":
-   #        self.videopasstoggle=True
-   #        self.rotationchoice.set_sensitive(False)
-   #        self.rotationchoice.set_active(0)
-   #    else:
-   #        self.rotationchoice.set_sensitive(True)
-
    def on_about_dialog_activate(self, widget):
        """
            Show the about dialog.



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