diff options
author | Reinhard Nißl <rnissl@gmx.de> | 2007-04-15 21:23:35 +0200 |
---|---|---|
committer | Reinhard Nißl <rnissl@gmx.de> | 2007-04-15 21:23:35 +0200 |
commit | b55b86b40e17a331fe2131ba4e6e3e76d0ba061c (patch) | |
tree | a0a4dd4469f2947e1be3695abbbf417f88ba3103 | |
parent | 3b03ad66fd2d5a475938a28cbcd55ba0319204a9 (diff) | |
download | xine-lib-b55b86b40e17a331fe2131ba4e6e3e76d0ba061c.tar.gz xine-lib-b55b86b40e17a331fe2131ba4e6e3e76d0ba061c.tar.bz2 |
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.
-rw-r--r-- | src/xine-engine/video_decoder.c | 10 |
1 files changed, 10 insertions, 0 deletions
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 <stdio.h> #include <stdlib.h> #include <string.h> +#include <unistd.h> #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"); |