Re: Setting (thread) priority of DirectShow Graphs/Filters ?
- From: ziphnor@xxxxxxxxx
- Date: 23 May 2006 15:20:23 -0700
Iain wrote:
create a graph
enumerate the threads in the process
pause the graph (which creates all the stream threads)
enumerate all the threads in the graph
subract the orginal list and uprate the remaining thread priorities
That would work i guess, but its a bit of a hack. The problem is that
the program in question is a HTPC application, so the recorder part of
the program might decide to start a recording graph between the two
enumerations, or an unrelated thread might start(unlikely to occur just
at that point but may happen), which might cause you to change priority
of some threads belonging to another part of the program.
In order for it to work always, you need some means of preventing other
new threads being created by threads other than the current when you
enumerate and pause. I guess a hack would be to raise the current
thread priority temporarily to realtime priority or one could introduce
some kind of locking mechanism but the latter would require excessive
changes throughout the program.
.
- References:
- Setting (thread) priority of DirectShow Graphs/Filters ?
- From: ziphnor
- Re: Setting (thread) priority of DirectShow Graphs/Filters ?
- From: ziphnor
- Re: Setting (thread) priority of DirectShow Graphs/Filters ?
- From: Jeremy Noring
- Re: Setting (thread) priority of DirectShow Graphs/Filters ?
- From: Iain
- Setting (thread) priority of DirectShow Graphs/Filters ?
- Prev by Date: Re: Help writing a new filter
- Next by Date: Re: Setting (thread) priority of DirectShow Graphs/Filters ?
- Previous by thread: Re: Setting (thread) priority of DirectShow Graphs/Filters ?
- Next by thread: Re: Setting (thread) priority of DirectShow Graphs/Filters ?
- Index(es):
Relevant Pages
|