Exemple #1
0
void QTCode_ForceMovieRedraw(Movie theMovie) 
{
	OSErr 		err = noErr;
	Rect		movieRect;
	RgnHandle	clipRegion = NULL;

	
		if (theMovie == NULL) goto bail;
	
		clipRegion = NewRgn();
		if (clipRegion == NULL) goto bail;
		
		GetClip(clipRegion);
		GetMovieBox(theMovie, &movieRect); 
		ClipRect(&movieRect);
	
		UpdateMovie(theMovie);
		MoviesTask(theMovie, 0);
	
		SetClip(clipRegion);
	
			/* Closure. Clean up if we have handles. */
	bail:	
	
		if	(clipRegion != NULL)
		{
			DisposeRgn(clipRegion);
		}
}
void CMFCMDIPlayerView::OnDraw(CDC* pDC)
{
	Movie	theMovie;
	CMFCMDIPlayerDoc* pDoc = GetDocument();
	ASSERT_VALID(pDoc);

	if (theMovie = pQuickTime->GetMovie())
		UpdateMovie(theMovie);
}
Exemple #3
0
static void playerupdate (void) {
	
	/*
	*/
	
	if (currentmovie == nil)
		return;
		
	BeginUpdate (playerwindow);
	
	UpdateMovie (currentmovie);
	
	EndUpdate (playerwindow);
	
	MoviesTask (nil, 0);
	
	MCIdle (currentcontroller);
	} /*playerupdate*/
Exemple #4
0
void TLevelReader3gp::load(const TRasterP &rasP, int frameIndex, const TPoint &pos, int shrinkX, int shrinkY)
{
	TRaster32P ras = rasP;

	{
		QMutexLocker sl(&m_mutex);
		ras->lock();
		if (m_IOError != QTNoError)
			goto error;

		Rect rect;
		rect.right = pos.x + ras->getLx();
		rect.left = pos.x;
		rect.bottom = pos.y + ras->getLy();
		rect.top = pos.y;

		GWorldPtr offscreenGWorld;
		OSErr err;

#if defined TNZ_MACHINE_CHANNEL_ORDER_BGRM
		OSType pixelFormat = k32BGRAPixelFormat;
#elif defined TNZ_MACHINE_CHANNEL_ORDER_MRGB
		OSType pixelFormat = k32ARGBPixelFormat;
#endif

		err = QTNewGWorldFromPtr(
			&offscreenGWorld, pixelFormat,
			&rect, 0, 0, 0, ras->getRawData(), ras->getWrap() * 4);

		if (err != noErr) {
			m_IOError = QTUnableToCreateResource;
			goto error;
		}

		SetMovieBox(m_movie, &rect);
		err = GetMoviesError();
		if (err != noErr) {
			m_IOError = QTUnableToSetMovieBox;
#if 0
    DisposeGWorld(offscreenGWorld);
#endif
			goto error;
		}

#if 0
  SetMovieGWorld(m_movie, offscreenGWorld, GetGWorldDevice(offscreenGWorld));
#endif
		err = GetMoviesError();
		if (err != noErr) {
			m_IOError = QTUnableToSetMovieGWorld;
#if 0
    DisposeGWorld(offscreenGWorld);
#endif
			goto error;
		}

		TimeValue currentTime = currentTimes[frameIndex];

		SetMovieTimeValue(m_movie, currentTime);

		err = GetMoviesError();
		if (err != noErr) {
			m_IOError = QTUnableToSetTimeValue;
#if 0
    DisposeGWorld(offscreenGWorld);
#endif
			goto error;
		}

		err = UpdateMovie(m_movie);
		if (err != noErr) {
			m_IOError = QTUnableToUpdateMovie;
#if 0
    DisposeGWorld(offscreenGWorld);
#endif
			goto error;
		}

		MoviesTask(m_movie, 0);
		err = GetMoviesError();
		if (err != noErr) {
			m_IOError = QTUnableToDoMovieTask;
#if 0
    DisposeGWorld(offscreenGWorld);
#endif
			goto error;
		}

		SetMovieGWorld(m_movie, 0, 0);
#if 0
  DisposeGWorld(offscreenGWorld);
#endif
		ras->unlock();
	}

	if (m_depth != 32) {
		setMatteAndYMirror(rasP);
	} else {
		rasP->yMirror();
	}

	return;

error:
	ras->unlock();
	throw TImageException(m_path, buildQTErrorString(m_IOError));
}
Exemple #5
0
void quicktime_player::update() {
    if ((m->playing > 0) && (IsMovieDone(m->movie) != 0))
        GoToBeginningOfMovie(m->movie);
    MoviesTask(m->movie, 0);
    UpdateMovie(m->movie);
}