[pitivi] settings.py: add copy() method to ExportSettings class
- From: Edward Hervey <edwardrv src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [pitivi] settings.py: add copy() method to ExportSettings class
- Date: Wed, 4 Nov 2009 15:44:03 +0000 (UTC)
commit 71620a56b6af5f4bff820f9edcee50ff812f8d66
Author: Brandon Lewis <brandon_lewis berkeley edu>
Date: Mon Oct 19 09:29:14 2009 -0700
settings.py: add copy() method to ExportSettings class
pitivi/settings.py | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/pitivi/settings.py b/pitivi/settings.py
index 5cadef7..47d527c 100644
--- a/pitivi/settings.py
+++ b/pitivi/settings.py
@@ -469,6 +469,23 @@ class ExportSettings(Signallable, Loggable):
self.aencoders = available_audio_encoders()
self.muxers = available_combinations(self.muxers, self.vencoders, self.aencoders)
+ def copy(self):
+ ret = ExportSettings()
+ ret.videowidth = self.videowidth
+ ret.videoheight = self.videoheight
+ ret.videorate = gst.Fraction(self.videorate.num, self.videorate.denom)
+ ret.videopar = gst.Fraction(self.videopar.num, self.videopar.denom)
+ ret.audiochannels = self.audiochannels
+ ret.audiorate = self.audiorate
+ ret.audiodepth = self.audiodepth
+ ret.vencoder = self.vencoder
+ ret.aencoder = self.aencoder
+ ret.muxer = self.muxer
+ ret.containersettings = dict(self.containersettings)
+ ret.acodecsettings = dict(self.acodecsettings)
+ ret.vcodecsettings = dict(self.vcodecsettings)
+ return ret
+
def __str__(self):
msg = _("Export Settings\n")
msg += _("Video: ") + str(self.videowidth) + " " + str(self.videoheight) +\
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]