Re: DirectShow Thread Priority



On Mon, 04 Apr 2005 21:44:06 -0700, Tim Roberts wrote:

> "gman" <gman@xxxxxxxxxxx> wrote:
>>
>>How can I set the thread priority for a DirectShow Graph? I am using VMR9
>>and I want the video stream I create to have the highest thready priortiy so
>>that the last thing to suffer is my video frame rate.
>>
>>Anyone know how to do this?
>
> It already runs at an elevated priority. However, the renderer does not
> operate in a vacuum. It doesn't matter how high the renderer's priority is
> if the file source cannot feed frames, the compressor cannot decompress
> them, or the color space converter cannot process them.
>
> As a general rule, it is counterproductive to mess with the individual
> thread priorities. A video graph is a relatively balanced process.

I'm not persuaded that it does run at a higher priority. Certainly the
audio renderer does not.

There are two approaches. Quick and dirty simply raises the priority of
your whole app. This is fine if it is interference from 3rd party apps
that is the problem.

The other approach is to enumerate the threads in the process, pause / run
the graph, enumerate the threads again and raise the priority of the new
threads.

Iain
--
Iain Downs (DirectShow MVP)
Software Product Consultant
www.idcl.co.uk
.



Relevant Pages

  • Re: Can someone explain how women work?
    ... VERY TONGUE IN CHEEK RESPONSE (Too true still, ... The other dimensions that have to be added are her priorities. ... original graph impacted positively or negatively the chosen priority. ...
    (sci.physics)
  • Help with 2 values
    ... axis being amount of days and the values on the graph to be the priority. ... I have looked into many functions on how to do this, and can compare 2 ...
    (microsoft.public.excel.worksheet.functions)
  • Re: DirectShow Thread Priority
    ... the users clicks on a video in the list the application loads the video by ... >> I'm not persuaded that it does run at a higher priority. ... > other CPU-intensive tasks going on during video rendering, ... > will take most of the CPU time anyway. ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: Graph priority question
    ... I'm reading 2 MPEG videos and showing a memory base generation of video ... My problem is setting the frame rate of the source filter. ... I'd like to give more priority to the reading threads than the other one. ...
    (microsoft.public.win32.programmer.directx.video)
  • priority of media I/O
    ... I have a thread that is reading video streams for display. ... being sent to the actual driver for the ... If I have the first thread at a higher priority then the ... will the disk reads/writes be prioritized by ...
    (microsoft.public.windowsce.embedded.vc)