Re: QuickTime stops to play
Re: QuickTime stops to play
- Subject: Re: QuickTime stops to play
- From: Greg Hamilton <email@hidden>
- Date: Tue, 16 Sep 2003 11:57:42 +1000
I suspect the NSTimer stops firing during resize. I think this will
also be the case if you display a modal dialog. I solved this problem
by using an NSThread which looped calling MoviesTask() then sleeping
for a fraction of a second.
I'm sure somebody on the Quicktime API mailing list
(email@hidden ) showed me a way to initialize an
NSTimer in such a way that this problem was avoided but I can't find
the code. Perhaps somebody else here knows. List archives?
Greg
On Tuesday, September 16, 2003, at 05:31 AM, Lorenzo wrote:
Hi,
yeah everything works fine, except for while I resize the window the
movie/song pauses. I don't think the problem comes from the "drawing"
because the movie goes really to pause. When I relases the mouse it
continues to play just from the last point it paused. So it's not a
case of
"non-refreshing of the view".
It's not a great problem, but if someone knows how to fix this, I
would be
glad to know.
Thank you so much for your help.
Best Regards
--
Lorenzo
email: email@hidden
From: "Douglas A. Welton" <email@hidden>
Date: Mon, 15 Sep 2003 11:43:42 -0400
To: Lorenzo <email@hidden>, Cocoa Forum
<email@hidden>
Subject: Re: QuickTime stops to play
Lorenzo,
When you call the MoviesTask() function, QuickTime processes the
movie you
are playing and updates the display as appropriate. Check out my
article
"Integrating QuickTime with Cocoa" at O'Reilly's MacDevCenter.com,
which
contains a link to an example project that you might want to take a
look at.
As for the movie stopping during a live resize, I suspect that the
notion of
redrawing the NSMovieView is obscured by the drawing needs of the
resizing... Does any have more definitive knowledge about this than
I do?
If so, please chime in...
later,
douglas
on 9/15/03 9:58 AM, Lorenzo at email@hidden wrote:
Hi,
after so long time, the problem changed.
If my timer fires every 0.1 seconds, the playback works fine,
there are no more breaks.
But in the control panel ([theQTView showController:YES
adjustingSize:YES];)
the thumb of the current frame doesn't move anymore.
If my timer fires every 0.5 seconds, the thumb of the current frame
moves
properly, but sometimes the song/movie stops to play.
You wrote "I call the function MovieTasks() "
So, please what did you mean with MovieTasks()? What does this call
do?
I checked at the SimpleCocoaMovie sample, but it doesn't report any
timer
nor any MovieTasks routine.
I have this timer
-------------------
timerForRefreshingQTView = [[NSTimer
scheduledTimerWithTimeInterval:0.1
target:self selector:@selector(refreshView) userInfo:nil
repeats:YES]
retain];
[[NSRunLoop currentRunLoop] addTimer:timerForRefreshingQTView
forMode:NSModalPanelRunLoopMode];
[[NSRunLoop currentRunLoop] addTimer:timerForRefreshingQTView
forMode:NSEventTrackingRunLoopMode];
and the refresh routine does:
-------------------
- (void)refreshView
{
if([theQTView isPlaying]){
[theQTView setNeedsDisplayInRect:NSMakeRect(0,0,1,1)];
}
}
even with a full bounds rect, it stops to play.
Also, while I am resizing the window, I cannot hear/see the movie
play.
Any help?
Best Regards
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.