[mythtv] [PATCH] Realtime scheduling of video output thread
John Patrick Poet
john at BlueSkyTours.com
Wed Sep 1 21:53:35 EDT 2004
Doug Larrick wrote:
> The attached patch implements POSIX realtime scheduling of the video
> output thread. This scheduling should allow smoother video output
> under higher loads / less heavyweight systems than is possible with
> the current (default) scheduling.
>
> The patch implements a mechanism whereby mythfrontend (and also the
> 'mythtv' program), if installed SUID root, first spawn a priveleged
> thread and then drop priveleges to continue on as normal. This
> priveleged thread then hangs around to service requests to alter the
> scheduling priority of other threads when requested; it is the only
> part of MythTV that runs with elevated priveleges.
>
> When NuppelVideoPlayer starts up the video output thread, it then
> requests realtime scheduling for it via this new mechanism. If not
> installed SUID root, this operation will fail (with a message) and
> operation will proceed as it always has.
>
> The mechanism is flexible enough to allow performing other priveleged
> operations in future if required. For example, IIRC there's a video
> decoder card (via?) that requires running as root. Instead, this
> priveleged thread could kick off the decoder thread only as root,
> leaving the rest of MythTV running as a normal user.
>
> -Doug
Doug,
I have tried this. Sure does not hurt. I can't really tell if it helps.
I actually have a 3.2GHz HT P4 now, so the impact is probably small for me.
However, the work that you and Bruce have done lately has made a huge
difference. HD video plays nice and smooth -- even troublesome close-up
pans. Thank you both!
Lately I have noticed a non-reproducable hick-up every 5 to 10 minutes.
It is just a quick micro-pause, and then it continues on fine. If I
rewind and play that part of the video again, it does not happen. My
impression is that the frontend is starved for data. I need to check
the log file to see if there are any clues there.
John
More information about the mythtv-dev
mailing list