[pitivi] proxy: Allow setting a different max CPU usage
- From: Alexandru Băluț <alexbalut src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] proxy: Allow setting a different max CPU usage
- Date: Sat, 22 Apr 2017 21:13:20 +0000 (UTC)
commit 354e7f461e0657054c5b2d8fd99d1beaa4f73f50
Author: Alexandru Băluț <alexandru balut gmail com>
Date: Sat Mar 18 23:17:59 2017 +0100
proxy: Allow setting a different max CPU usage
Fixes T7731
Reviewed-by: Thibault Saunier <tsaunier gnome org>
Differential Revision: https://phabricator.freedesktop.org/D1699
pitivi/utils/proxy.py | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/pitivi/utils/proxy.py b/pitivi/utils/proxy.py
index 3fdb764..ec307c5 100644
--- a/pitivi/utils/proxy.py
+++ b/pitivi/utils/proxy.py
@@ -50,6 +50,10 @@ GlobalSettings.addConfigOption('numTranscodingJobs',
section='proxy',
key='num-proxying-jobs',
default=4)
+GlobalSettings.addConfigOption("max_cpu_usage",
+ section="proxy",
+ key="max-cpu-usage",
+ default=10)
ENCODING_FORMAT_PRORES = "prores-opus-in-matroska.gep"
@@ -386,7 +390,7 @@ class ProxyManager(GObject.Object, Loggable):
transcoder.props.pipeline.props.video_filter = thumbnailbin
transcoder.props.pipeline.props.audio_filter = waveformbin
- transcoder.set_cpu_usage(10)
+ transcoder.set_cpu_usage(self.app.settings.max_cpu_usage)
transcoder.connect("position-updated",
self.__proxyingPositionChangedCb,
asset)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]