From d2b1eedf497a6d70bd77978ba37e1784ab19b56e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reinhard=20Ni=C3=9Fl?= Date: Sun, 15 Apr 2007 21:23:35 +0200 Subject: Increase priority of video decoder a little bit, to avoid frame drops. When a video out device provides only a little number of video frames, the video decoder should be scheduled immediately to provide a decoded frame as soon as possible. Otherwise, the number of available frames for displaying may go below frame drop limit and thus resulting in unnecessary frame drops. (transplanted from 33960e92decd90e6010d904476f9d45b1173153a) --HG-- extra : transplant_source : 3%96%0E%92%DE%CD%90%E6%01%0D%90Dv%F9%D4%5B%11s%15%3A --- src/xine-engine/video_decoder.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src') diff --git a/src/xine-engine/video_decoder.c b/src/xine-engine/video_decoder.c index c371d7657..c88e01714 100644 --- a/src/xine-engine/video_decoder.c +++ b/src/xine-engine/video_decoder.c @@ -25,6 +25,7 @@ #include #include #include +#include #define XINE_ENGINE_INTERNAL @@ -107,6 +108,15 @@ static void *video_decoder_loop (void *stream_gen) { int prof_video_decode = -1; int prof_spu_decode = -1; uint32_t buftype_unknown = 0; + +#ifndef WIN32 + /* nice(-value) will fail silently for normal users. + * however when running as root this may provide smoother + * playback. follow the link for more information: + * http://cambuca.ldhs.cetuc.puc-rio.br/~miguel/multimedia_sim/ + */ + nice(-1); +#endif /* WIN32 */ if (prof_video_decode == -1) prof_video_decode = xine_profiler_allocate_slot ("video decoder"); -- cgit v1.2.3