[pitivi/ges: 43/287] Clean up rendering so we can remove unused code later
- From: Jean-FranÃois Fortin Tam <jfft src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi/ges: 43/287] Clean up rendering so we can remove unused code later
- Date: Thu, 15 Mar 2012 16:29:26 +0000 (UTC)
commit cc266a501fe307a7fc5280c9207f2d1c5d3b1fb3
Author: Thibault Saunier <thibault saunier collabora com>
Date: Mon Oct 3 20:48:25 2011 -0300
Clean up rendering so we can remove unused code later
pitivi/encode.py | 43 +------------------------------------------
pitivi/ui/encodingdialog.py | 14 +++++++++-----
2 files changed, 10 insertions(+), 47 deletions(-)
---
diff --git a/pitivi/encode.py b/pitivi/encode.py
index 9629185..b7a07b5 100644
--- a/pitivi/encode.py
+++ b/pitivi/encode.py
@@ -26,7 +26,7 @@ Encoding-related utilities and classes
import gobject
import gst
import pitivi.log.log as log
-from pitivi.factories.base import OperationFactory, SinkFactory
+from pitivi.factories.base import OperationFactory
from pitivi.factories.operation import TransformFactory, get_modifier_for_stream
@@ -165,47 +165,6 @@ class RenderFactory(OperationFactory):
raise NotImplementedError
-class RenderSinkFactory(SinkFactory):
- """
- Convenience class combining a L{RenderFactory} and a L{SinkFactory}.
-
- @cvar renderfactory: The render factory
- @type renderfactory: L{RenderFactory}
- @cvar sinkfactory: The sink factory
- @type sinkfactory: L{SinkFactory}
- """
-
- def __init__(self, renderfactory, sinkfactory, *args, **kwargs):
- self.renderfactory = renderfactory
- self.sinkfactory = sinkfactory
- SinkFactory.__init__(self, *args, **kwargs)
- for os in self.renderfactory.input_streams:
- self.addInputStream(os)
-
- def _makeBin(self, *args):
- self.debug("Creating bin")
- b = gst.Bin()
- self.debug("Creating renderbin")
- rb = self.renderfactory.makeBin()
- self.debug("Creating sinkbin")
- sf = self.sinkfactory.makeBin()
- b.add(rb, sf)
- self.debug("linking bins")
- rb.link(sf)
- for sinkp in rb.sink_pads():
- name = sinkp.get_name()
- gsink = gst.GhostPad(name, sinkp)
- gsink.set_active(True)
- b.add_pad(gsink)
-
- self.debug("Done")
- return b
-
- def _releaseBin(self, bin):
- for b in bin.elements():
- b.factory.releaseBin(b)
-
-
class NewsegmentEater(gst.BaseTransform):
__gstdetails__ = (
"Description",
diff --git a/pitivi/ui/encodingdialog.py b/pitivi/ui/encodingdialog.py
index a2f9d46..2e34284 100644
--- a/pitivi/ui/encodingdialog.py
+++ b/pitivi/ui/encodingdialog.py
@@ -27,7 +27,6 @@ Render dialog
import os
import gtk
import gst
-import pango
from gettext import gettext as _
from pitivi import configure
@@ -35,7 +34,6 @@ from pitivi.settings import ExportSettings
from pitivi.log.loggable import Loggable
from pitivi.ui.encodingprogress import EncodingProgressDialog
from pitivi.ui.gstwidget import GstElementSettingsDialog
-from pitivi.actioner import Renderer
from pitivi.ui.ripple_update_group import RippleUpdateGroup
from pitivi.ui.common import\
model,\
@@ -108,7 +106,7 @@ def factorylist(factories):
return model(columns, data)
-class EncodingDialog(Renderer, Loggable):
+class EncodingDialog(Loggable):
"""Render dialog box.
@ivar preferred_aencoder: The last audio encoder selected by the user.
@@ -123,6 +121,14 @@ class EncodingDialog(Renderer, Loggable):
Loggable.__init__(self)
self.app = app
+ self.project = project
+ if pipeline != None:
+ self.pipeline = pipeline
+ else:
+ self.pipeline = self.project.pipeline
+
+ self.outfile = None
+ self.settings = project.getSettings()
self.builder = gtk.Builder()
self.builder.add_from_file(os.path.join(configure.get_ui_dir(),
@@ -144,8 +150,6 @@ class EncodingDialog(Renderer, Loggable):
# settings to be used by the Render dialog for rendering.
render_settings = project.getSettings().copy()
# Note: render_settings will end up as self.settings.
- Renderer.__init__(self, project,
- pipeline=pipeline, settings=render_settings)
# Directory and Filename
self.filebutton.set_current_folder(self.app.settings.lastExportFolder)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]