From ebd88901c95a7ab5de682a4be9e505c543f05c71 Mon Sep 17 00:00:00 2001
From: Dario Casalinuovo <b.vitruvio@gmail.com>
Date: Sun, 15 Feb 2015 23:36:08 +0100
Subject: [PATCH] Set thread_count configuration variable to actual number of
cores. This make the encoder to use a proportional number of threads.
---
src/add-ons/media/plugins/ffmpeg/AVCodecEncoder.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/add-ons/media/plugins/ffmpeg/AVCodecEncoder.cpp b/src/add-ons/media/plugins/ffmpeg/AVCodecEncoder.cpp
index 910b30b..09ba844 100644
a
|
b
|
AVCodecEncoder::AVCodecEncoder(uint32 codecID, int bitRateScale)
|
78 | 78 | fEncodeParameters.avg_field_size = 0; |
79 | 79 | fEncodeParameters.max_field_size = 0; |
80 | 80 | fEncodeParameters.quality = 1.0f; |
| 81 | |
| 82 | system_info info; |
| 83 | get_system_info(&info); |
| 84 | fContext->thread_count = info.cpu_count; |
81 | 85 | } |
82 | 86 | |
83 | 87 | |