Page 2 of 2

Re: Need a little help maybe...

Posted: Tue Oct 25, 2005 4:21 pm
by Softanics
I think the problem is related with GDI leaks. Run your app and see in Task Manager how many GDI objects are creating by the process. If the number of GDI objects is growing up then I'm right. In this case please download last demo version of the DLL and try again your app with this last available version.

Dexy- wrote:Hello, I need a little of help to understand a thing maybe evident...

So, i explain myself, I'm always trying to have a FlashRenderToTexture lib. I did a C version which works great (...).

I take the same application and put it into a C++ class. It works until the 390'th frame in general. From where the FPCM_GET_FRAME_BITMAP give me a NULL hBitmap...

So if you have an idea ?

tx,
I will look further...

Re: Need a little help maybe...

Posted: Tue Oct 25, 2005 4:36 pm
by chossette
Hi, effectivly, GDI object grow up to 426, where the hBitmap start to be NULL.

Using in my C version, GDI object grew up to 26... So my problem seems to came from that..

Thanks for the advise...
I'm going to try to understand why....

Tx

Re: Need a little help maybe...

Posted: Tue Oct 25, 2005 5:18 pm
by chossette
Okay, I forget to do a DeleteObject( hBitmap ) after the GetFrameBitmap...

Tx.
(Copying from DC seems so slow so...... still on work !)

Posted: Tue Nov 01, 2005 10:48 pm
by fnBrit
Could you send me the sample code which renders to a bitmap without creating a window?

Thanks!
fnBrit.

changed in source !

Posted: Wed Nov 02, 2005 9:21 am
by chossette
Back from 4 days of holidays,

I have improve performance by changing things in the source of flashcontrol (I bought them).

It works a little better, !

Making it go faster?

Posted: Fri Nov 04, 2005 6:59 pm
by fnBrit
So I made my own class for getting frames to display in a texture (I couldn't wait for the code you were going to send Dexy!) How much faster were you able to make it go once you had the source to FlashPlayerControl? How did you make it faster? Is there a way to avoid the need for the GetDIBits extra copy & render the frame directly into texture memory?

Simon (fnBrit)

Posted: Mon Nov 07, 2005 9:11 am
by chossette
sorry sorry sorry sorry sorry sorry sorryn got to work out of my office... and getting by time.

I can exactly tell you how performance grow up... but they did. I have to improve some threading latency now.

Yes, I get ride of the GetDIBs, I have done it with the help of the ZFlash program. They use IViewObjectEx. So there is no more GetDibs after that, just getting a BYTE* buffer.

Code: Select all

OnCreate...
// add code le 28/10/2005
   if ( m_pShockwaveFlash8 != NULL ) {
      // on rйcupиre l'interface de vue objet
      hr = m_pShockwaveFlash8->QueryInterface( IID_IViewObjectEx, (void **)&m_pView );
   }
// end code

Then create a buffer
m_hBitmap = CreateDIBSection( m_hdcCompatible, &bInfo, DIB_RGB_COLORS, &m_pFrameBuffer, NULL, 0);
            SelectObject( m_hdcCompatible, m_hBitmap );

            ::SetMapMode( m_hdcCompatible, MM_TEXT);

// to get the buffer
HRESULT hr = m_pView->Draw( DVASPECT_CONTENT, -1, NULL, NULL, NULL, m_hdcCompatible, &m_rectFlash, &m_rectFlash, NULL, NULL );

there still need improve by using events to get new frame....
like DirectShow filter...

Posted: Fri Jan 20, 2006 12:17 pm
by Softanics