[pitivi] render: Remove one-liner method
- From: Thibault Saunier <tsaunier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] render: Remove one-liner method
- Date: Sun, 30 Aug 2020 21:58:03 +0000 (UTC)
commit 0724c999e992816eff2084a4e16a234d97000097
Author: Alexandru Băluț <alexandru balut gmail com>
Date: Mon Jun 1 22:34:55 2020 +0200
render: Remove one-liner method
pitivi/render.py | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/pitivi/render.py b/pitivi/render.py
index ba0f42e7..2b5fc0ec 100644
--- a/pitivi/render.py
+++ b/pitivi/render.py
@@ -767,22 +767,22 @@ class RenderDialog(Loggable):
self._set_encoding_profile(old_profile, True)
- def factory(x):
- return Encoders().factories_by_name.get(getattr(self.project, x))
-
self.project.set_container_profile(encoding_profile)
self._setting_encoding_profile = True
- if not set_combo_value(self.muxer_combo, factory("muxer")):
+ muxer = Encoders().factories_by_name.get(self.project.muxer)
+ if not set_combo_value(self.muxer_combo, muxer):
rollback()
return
self.update_available_encoders()
self._update_valid_audio_restrictions(Gst.ElementFactory.find(self.project.aencoder))
self._update_valid_video_restrictions(Gst.ElementFactory.find(self.project.vencoder))
+ aencoder = Encoders().factories_by_name.get(self.project.aencoder)
+ vencoder = Encoders().factories_by_name.get(self.project.vencoder)
for i, (combo, name, value) in enumerate([
- (self.audio_encoder_combo, "aencoder", factory("aencoder")),
- (self.video_encoder_combo, "vencoder", factory("vencoder")),
+ (self.audio_encoder_combo, "aencoder", aencoder),
+ (self.video_encoder_combo, "vencoder", vencoder),
(self.sample_rate_combo, "audiorate", self.project.audiorate),
(self.channels_combo, "audiochannels", self.project.audiochannels),
(self.frame_rate_combo, "videorate", self.project.videorate)]):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]