I am using the quick time api within an activex atl component that gets loaded into the browser. Under XP it plays the movie fine. Under Vista I can't see the movie at all and all I hear is audio. I downloaded the latest Vista service pack but still the same problem. Any insights? I have provided some code below.
Code:
bool CPlaybackWindow::OpenMovie( char *pszMovieFile )
{
bool bStatus = false;
FSSpec stFSSpec;
short nMovieRefNum = 0;
Rect rMovieControllerRect;
RECT rWindowRect;
char szMovieFile[MAX_PATH];
gPercentInFromEnd=0.0;
ZeroMemory( szMovieFile, sizeof( szMovieFile ) );
SetGWorld( (CGrafPtr)GetNativeWindowPort( m_hWnd ), NULL );
strcpy( szMovieFile, pszMovieFile );
c2pstr( szMovieFile );
if( FSMakeFSSpec( 0, 0, (unsigned char *)szMovieFile, &stFSSpec ) == noErr )
{
if( OpenMovieFile( &stFSSpec, &nMovieRefNum, fsRdPerm ) == noErr )
{
if( NewMovieFromFile( &m_stMovie, nMovieRefNum, NULL, NULL, newMovieActive, NULL ) == noErr )
{
GetWindowRect( &rWindowRect );
//mdm
rMovieControllerRect.top = rMovieControllerRect.left = 0;
rMovieControllerRect.bottom = (short)rWindowRect.bottom - (short)rWindowRect.top;
rMovieControllerRect.right = (short)rWindowRect.right - (short)rWindowRect.left;
//rMovieControllerRect.top = 368;
//rMovieControllerRect.left = 225;
//rMovieControllerRect.bottom = (short)rWindowRect.bottom - (short)rWindowRect.top + 362;
//rMovieControllerRect.right = (short)rWindowRect.right - (short)rWindowRect.left +225;
if( ( m_stMovieController = NewMovieController( m_stMovie, &rMovieControllerRect, mcNotVisible | mcScaleMovieToFit | mcTopLeftMovie ) ) != NULL )
{
SetMovieSelection( m_stMovie, 0, GetMovieDuration( m_stMovie ) );
MCEnableEditing( m_stMovieController, true );
MCSetActionFilterWithRefCon( m_stMovieController, MCActionFilterProc, (long)this );
bStatus = true;
}
}
CloseMovieFile( nMovieRefNum );
}
}
return bStatus;
}