Running into kind of a strange problem:
I'm using delphi 6.0 and trying to integrate a third party activex control which connects to a server, streams and renders video (no visibility into this control).
The control has a frame rate setting from 1 - 30 and if i set this to a small value like 1, the VCL thread seems to block for a second every second.
In other words, it seems that when the video rendering is done inside this ActiveX control, it sleeps for the time until it needs to render the next frame, but this is speculation on my part.
Looking into the registry I see that this control is Apartment threading so i thought that the way this must be happening is that i created the control on the VCL thread and thus the rendering thread within the control is marshalled to run on the VCL thread (doesn't actually make much sense for threads internal to the control to be marshalled does it?) as well and due to some sleep logic it causes the VCL thread to block.
Based on this i figured if i created a dedicated thread to create this control (with a hidden window + a message pump), the sleeps would happen on this ActiveXCreatorThread instead of VCL. The activex control is created using CreateParented(Fowner).
Needless to say this didn't work and the VCL thread continues to block in the same way and i'm puzzled. What do you think is causing the original behavior? and why wouldn't my hack have worked?
Thanks!