{\r
executor_.start();\r
executor_.begin_invoke([this]\r
- {\r
+ { \r
+ SetThreadPriority(GetCurrentThread(), BELOW_NORMAL_PRIORITY_CLASS);\r
window_.Create(sf::VideoMode(600, 1000), "CasparCG Diagnostics");\r
window_.SetPosition(0, 0);\r
window_.SetActive();\r
CASPAR_LOG(info) << "Released ffmpeg tbb context.";\r
}\r
\r
-std::regex get_slice_regex()\r
-{\r
- auto s = env::properties().get("configuration.ffmpeg.slice-threads-regex", "");\r
- boost::algorithm::erase_all(s, " ");\r
- boost::algorithm::erase_all(s, "\n");\r
- return std::regex(s);\r
-}\r
-\r
-bool allow_slice_thread(int id)\r
-{\r
- static std::regex e = get_slice_regex();\r
- return std::regex_match(boost::lexical_cast<std::string>(id), e);\r
-}\r
-\r
int tbb_avcodec_open(AVCodecContext* avctx, AVCodec* codec)\r
{\r
- auto id = codec->id;\r
avctx->thread_count = 1;\r
- if(allow_slice_thread(id) && // Some codecs don't like to have multiple multithreaded decoding instances. Only enable for those we know work.\r
+ // Some codecs don't like to have multiple multithreaded decoding instances. Only enable for those we know work.\r
+ if(codec->id == CODEC_ID_MPEG2VIDEO && \r
(codec->capabilities & CODEC_CAP_SLICE_THREADS) && \r
(avctx->thread_type & FF_THREAD_SLICE))\r
{\r
<diagnostics>\r
<graphs>true</graphs> <!-- [true/false] Displays diagnostics window with real-time graphs. -->\r
</diagnostics>\r
- <ffmpeg>\r
- <slice-threads-regex>\r
- <!-- Use slice threads only for tested codecs. Some codecs do not like to have multiple multithreaded decoders running simultaneously.-->\r
- <!-- Match the provided regex expression against the codec-id.-->\r
- 2 <!-- mpeg2 --> | \r
- 28 <!-- h264 -->\r
- </slice-threads-regex>\r
- </ffmpeg>\r
<channels>\r
<channel>\r
<!--\r