Getting flash bitmap without window

DLL Edition of the F-IN-BOX
Softanics
Site Admin
Posts: 1402
Joined: Sat Sep 18, 2004 3:03 am
Location: Russia, St. Petersburg
Contact:

Re: Need a little help maybe...

Postby Softanics » Tue Oct 25, 2005 4:21 pm

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...
Best regards, Artem A. Razin,
F-IN-BOX support
Ask your question here: http://www.f-in-box.com/support.html

chossette
Posts: 14
Joined: Fri Sep 23, 2005 12:56 pm
Contact:

Re: Need a little help maybe...

Postby chossette » Tue Oct 25, 2005 4:36 pm

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

chossette
Posts: 14
Joined: Fri Sep 23, 2005 12:56 pm
Contact:

Re: Need a little help maybe...

Postby chossette » Tue Oct 25, 2005 5:18 pm

Okay, I forget to do a DeleteObject( hBitmap ) after the GetFrameBitmap...

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

fnBrit
Posts: 4
Joined: Tue Nov 01, 2005 10:43 pm

Postby fnBrit » Tue Nov 01, 2005 10:48 pm

Could you send me the sample code which renders to a bitmap without creating a window?

Thanks!
fnBrit.

chossette
Posts: 14
Joined: Fri Sep 23, 2005 12:56 pm
Contact:

changed in source !

Postby chossette » Wed Nov 02, 2005 9:21 am

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, !

fnBrit
Posts: 4
Joined: Tue Nov 01, 2005 10:43 pm

Making it go faster?

Postby fnBrit » Fri Nov 04, 2005 6:59 pm

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)

chossette
Posts: 14
Joined: Fri Sep 23, 2005 12:56 pm
Contact:

Postby chossette » Mon Nov 07, 2005 9:11 am

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...

Softanics
Site Admin
Posts: 1402
Joined: Sat Sep 18, 2004 3:03 am
Location: Russia, St. Petersburg
Contact:

Postby Softanics » Fri Jan 20, 2006 12:17 pm

Best regards, Artem A. Razin,

F-IN-BOX support

Ask your question here: http://www.f-in-box.com/support.html


Return to “DLL Edition”

Who is online

Users browsing this forum: No registered users and 9 guests

cron