Hi,
I have created a windowless activex(using ATL & Visual Studio 2008, not using MFC) and using IE as a container. Here, what i want to display is the video frames.
What i am doing is:
1. After receiving the decoded frame, i am calling ::InvalidateRect(m_hWndIE,
&m_rcPos, FALSE). So, it generates WM_PAINT message to the container window and it calls the OnDraw() on the activex.(i think i cannot use ::FireViewChange(), because i am doing this in another thread).
2. In OnDraw() i am displaying the decoded frame by using DIB function calls.
While using IE as the container, OnDraw() is getting called 4 times(4 times is not the constant, it varies depending on the height of the activex rectangle) for each call of InvalidateRect() or FireViewChange(). Because of this i am getting some performance issue.(If i use MFC dialog as a container OnDraw() is getting called only once for each call of InvalidateRect()).
In windowed mode its taking 44 milli seconds to display a single frame. But in the windowless mode its taking 96 (24*4) milli seconds.(Per OnDraw() it's taking 24 milli seconds.).
And i observed the jerkyness in the video. I didn't understand this, Is it because of more timetaking or drawing block by block??
(In OnDraw i am getting the boundaries as
left - right - top - bottom
1. 0 - 835 - 0 - 470 (1st OnDraw() call)
2. 0 - 835 - (-150) - 320 (2nd OnDraw() call)
3. 0 - 835 - (-300) - 170 (3rd OnDraw() call)
4. 0 - 835 - (-450) - 20 (4th OnDraw() call)
I badly needed windowless activex, because i want to display some text on the top of the video.(i can do this buy using z-index in javascript).
So, is there any wrong in my undsterstanding?? or do i need to proceed differently?
If the IE sends the boundaries as blocks, for optimization, then is there any setting or option to turn it off?
Please let me know.
Thanks in advance.