While stepping through sequential code is usually sufficient to understand, it's a bit more challenging with multithreaded code.
ATM, I can't configure out the rationale behind the WaitHandle arguments to Push and Seek of the AviSplitterFilter and the _received field of the EventThread class. Or more generally, how events are supposed to be processed? Some general outline would be helpful.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When the breakEvent argument of the source filter is set, it means you should stop seeking or sending samples and return as fast as possible, happens when stopping the graph or just flushing before seeking to a new position.
EventThread is the same as CAMThread in directshow, basically it has a message queue with one slot, it blocks until the message is replied. _sent signals that there is a new message waiting, _received is set in return when the thread replies something.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
While stepping through sequential code is usually sufficient to understand, it's a bit more challenging with multithreaded code.
ATM, I can't configure out the rationale behind the WaitHandle arguments to Push and Seek of the AviSplitterFilter and the _received field of the EventThread class. Or more generally, how events are supposed to be processed? Some general outline would be helpful.
When the breakEvent argument of the source filter is set, it means you should stop seeking or sending samples and return as fast as possible, happens when stopping the graph or just flushing before seeking to a new position.
EventThread is the same as CAMThread in directshow, basically it has a message queue with one slot, it blocks until the message is replied. _sent signals that there is a new message waiting, _received is set in return when the thread replies something.
OK, I should have thought of that: "When in doubt, check the corresponding DS code".