m***@gmail.com
2007-09-26 14:24:35 UTC
I have a DirectShow player implemented as an ATL COM object.
The threading model is CComMultiThreadModel.
Whenever the player builds the graph to render a media file, it also
launches a thread which monitors the graph events (IMediaEvent).
The player, as a COM object, exposes an event sync to the C# form is
embedded in.
Whenever the graph triggers an EC_COMPLETE event, the monitoring
thread will notify the form trough the event sync. The form will call
Pause method from the player which is converted in
IMediaControl::Pause().
Sometimes, in this specific scenario, IMediaControl::Pause blocks.
I am wondering what causes and how can I fix this problem.
Any advice is appreciated.
The threading model is CComMultiThreadModel.
Whenever the player builds the graph to render a media file, it also
launches a thread which monitors the graph events (IMediaEvent).
The player, as a COM object, exposes an event sync to the C# form is
embedded in.
Whenever the graph triggers an EC_COMPLETE event, the monitoring
thread will notify the form trough the event sync. The form will call
Pause method from the player which is converted in
IMediaControl::Pause().
Sometimes, in this specific scenario, IMediaControl::Pause blocks.
I am wondering what causes and how can I fix this problem.
Any advice is appreciated.