From b55b86b40e17a331fe2131ba4e6e3e76d0ba061c 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. --- src/xine-engine/video_decoder.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/xine-engine/video_decoder.c b/src/xine-engine/video_decoder.c index fee75ec76..3d39b4550 100644 --- a/src/xine-engine/video_decoder.c +++ b/src/xine-engine/video_decoder.c @@ -28,6 +28,7 @@ #include #include #include +#include #define XINE_ENGINE_INTERNAL @@ -110,6 +111,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