FPCN_Paint question

DLL Edition of the F-IN-BOX
jgamble
Posts: 2
Joined: Fri Jun 30, 2006 9:36 pm

FPCN_Paint question

Postby jgamble » Fri Jun 30, 2006 9:43 pm

Hi,

I'm curious if you can answer a question on the behavior of FPCN_UpdateRect/FPCN_Paint notifications for movies playing in hidden windows. Is it the case that these notifications will be sent exactly once for each and every frame that the movie plays? i.e. they are not sent when the movie is not playing, and no frames are skipped or duped, etc..

Thanks for any insight,
-jon

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

Postby Softanics » Sat Jul 01, 2006 8:47 am

Thank you for your question.

The notification FPCN_UPDATE_RECT is sending every time when the movie needs to be updated. In the handler send WM_PAINT to the window. In the handler of WM_PAINT, the notification FPCN_PAINT is sending:

Code: Select all

static
void WINAPI FPCListener(HWND hwndFlashPlayerControl, LPARAM lParam, NMHDR* pNMHDR)
{
   if (FPCN_UPDATE_RECT == pNMHDR->code)
         {
                  SendMessage(hwndFlashPlayerControl, WM_PAINT, 0, 0);
         }
   else if (FPCN_PAINT == pNMHDR->code)
         {
                  SFPCNPaint* pFPCNPaint = (SFPCNPaint*)pNMHDR;
                  LPDWORD lpPixels = pFPCNPaint->lpPixels; // <-- pixels buffer
         }
}
Best regards, Artem A. Razin,
F-IN-BOX support
Ask your question here: http://www.f-in-box.com/support.html

jgamble
Posts: 2
Joined: Fri Jun 30, 2006 9:36 pm

right

Postby jgamble » Mon Jul 03, 2006 5:57 pm

What I'm curious about is if there are situations where multiple FPCN_UpdateRects are sent for a single frame, or if multiple frames can occur without a FPCN_UpdateRect being generated (perhaps because the frames are identical). I'm using FlashPlayerControl to capture frames from a flash movie and encode them into MPEG, WMV, etc. So the FPCN_UpdateRect approach will only be viable for me if there is a guarantee that exactly one FPCN_UpdateRect notification will be generated per frame for movies in a hidden window...

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

Postby Softanics » Mon Jul 03, 2006 6:24 pm

FPCN_UPDATE_RECT is sending when a flash player decide to repaint. Ususally only one notification will be sent for every frame. But if a movie interacts with a user, the movie can contain just one frame. In this case there will many notifications.
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 20 guests

cron