Zeratul wrote:Well. It is working good now. Thanks! But about new version of control ? I mean in download section it is still old. When new one will be added ?
Today.
Zeratul wrote:Well. It is working good now. Thanks! But about new version of control ? I mean in download section it is still old. When new one will be added ?
Zeratul wrote:And also, what about function for getting last rendered frame pixel buffer ?
I wrote about this earlier.
Zeratul wrote:It seems that this callback method is working bad with large flash movies, for example 800x600. It is working fine with small flash movies, 200x200 for example. My application freezes when I am trying to play a big movie.
Zeratul wrote:Yes, I tested 3 different movies. One of them was working a bit better then 2 others. One is almost fully freezes application and the other one, freeze application at all.
Zeratul wrote:May be you have an ICQ or AIM account to talk about this problem ?
Softanics wrote:Simple example is GetImagePixels() in the Sample5_SWF2BitmapDlg.cpp.Zeratul wrote:And also, what about function for getting last rendered frame pixel buffer ?
I wrote about this earlier.
tconkling wrote:The example provided (FPCNPaint1) compiles and runs for me, but nothing ever appears on the screen (no window, nothing) -- this makes it difficult for me to figure out which bits of code are important to the problem being solved.
Code: Select all
CSample5_SWF2BitmapDlg* pDlg = new CSample5_SWF2BitmapDlg;
m_pMainWnd = pDlg;
pDlg->Create(CSample5_SWF2BitmapDlg::IDD);
pDlg->ShowWindow(SW_HIDE);
return TRUE;
/*
CSample5_SWF2BitmapDlg dlg;
m_pMainWnd = &dlg;
INT_PTR nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: Place code here to handle when the dialog is
// dismissed with OK
}
else if (nResponse == IDCANCEL)
{
// TODO: Place code here to handle when the dialog is
// dismissed with Cancel
}
//Since the dialog has been closed, return FALSE so that we exit the
// application, rather than start the application's message pump.
return FALSE;
*/
Code: Select all
/*
CSample5_SWF2BitmapDlg* pDlg = new CSample5_SWF2BitmapDlg;
m_pMainWnd = pDlg;
pDlg->Create(CSample5_SWF2BitmapDlg::IDD);
pDlg->ShowWindow(SW_HIDE);
return TRUE;
*/
CSample5_SWF2BitmapDlg dlg;
m_pMainWnd = &dlg;
INT_PTR nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: Place code here to handle when the dialog is
// dismissed with OK
}
else if (nResponse == IDCANCEL)
{
// TODO: Place code here to handle when the dialog is
// dismissed with Cancel
}
//Since the dialog has been closed, return FALSE so that we exit the
// application, rather than start the application's message pump.
return FALSE;
Code: Select all
static
void WINAPI FPCListener(HWND hwndFlashPlayerControl, LPARAM lParam, NMHDR* pNMHDR)
{
if (FPCN_UPDATE_RECT == pNMHDR->code)
{
// This causes FPCN_PAINT will be sent
SendMessage(hwndFlashPlayerControl, WM_PAINT, 0, 0);
}
else if (FPCN_PAINT == pNMHDR->code)
{
SFPCNPaint* pFPCNPaint = (SFPCNPaint*)pNMHDR;
LPDWORD lpPixels = pFPCNPaint->lpPixels; // <-- pixels buffer
ATLTRACE(_T("FPCN_PAINT: 0x%.8x\n"), (DWORD)lpPixels);
RECT rc;
GetClientRect(hwndFlashPlayerControl, &rc);
if (g_size.cx != rc.right || g_size.cy != rc.bottom)
{
if (NULL != g_lpPixels)
delete[] g_lpPixels;
g_size.cx = rc.right;
g_size.cy = rc.bottom;
g_lpPixels = new DWORD[g_size.cx * g_size.cy];
}
CopyMemory(g_lpPixels, lpPixels, g_size.cx * g_size.cy * sizeof(DWORD));
// You can copy lpPixels into internal buffer or create what you want from this buffer (bitmaps, textures, etc.)
// Note that lpPixels is temporary and you shouldn't save this pointer for futher using
}
}
Code: Select all
SendMessage(hwndFlashPlayerControl, WM_PAINT, 0, 0)
Softanics wrote:Yes. The problem is to get a bitmap with alpha channel, we need to paint a flash movie twice. And then calculate alpha component of the color. The problem is to do it quickly.
cvoid wrote:can you please post a basic exemple ( pseudo code )
on how to compare the pixels and calculate the alpha ?
Softanics wrote:cvoid wrote:can you please post a basic exemple ( pseudo code )
on how to compare the pixels and calculate the alpha ?
I'm sorry but I can't post this code because it is a part of library.
Users browsing this forum: No registered users and 17 guests