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 | d2b1eedf497a6d70bd77978ba37e1784ab19b56e (patch) | |
tree | 94f0d7f8809f18bd21acfc0ffde6f79e34ea27b6 | |
parent | 681321431323a5e6d4f8a9cbaa629f2e963f61a1 (diff) | |
download | xine-lib-d2b1eedf497a6d70bd77978ba37e1784ab19b56e.tar.gz xine-lib-d2b1eedf497a6d70bd77978ba37e1784ab19b56e.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.
(transplanted from 33960e92decd90e6010d904476f9d45b1173153a)
--HG--
extra : transplant_source : 3%96%0E%92%DE%CD%90%E6%01%0D%90Dv%F9%D4%5B%11s%15%3A
-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 c371d7657..c88e01714 100644 --- a/src/xine-engine/video_decoder.c +++ b/src/xine-engine/video_decoder.c @@ -25,6 +25,7 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <unistd.h> #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"); |