• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: QTMovie frame looping
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: QTMovie frame looping


  • Subject: Re: QTMovie frame looping
  • From: Steve Christensen <email@hidden>
  • Date: Wed, 21 Mar 2007 23:10:40 -0700

On Mar 21, 2007, at 9:15 PM, email@hidden wrote:

I am attempting to grab the frames out of a QTMovie. The grabbing part
works, but the loop that I have breaks around the last iteration with EXC
BAD ACCESS.


Here is the code:

while (QTTimeCompare([myMovie currentTime], [myMovie duration]) !=
NSOrderedSame)
{
	// I do some stuff with some things
	// Which seems to work fine

	[myMovie stepForward];
}

I believe that -duration is returning the time the movie would have when
it finished, whereas when I reach the last frame -currentTime returns
something like -duration - the_time_a_frame_would_last so my call to
QTTimeCompare never returns true and I loop past the last frame.


My intuition is to look for a way to determine the number of frames in a
QTMovie and the frame that it is currently on, but if there is a better
way to solve the problem, I would love to hear.

Check out <http://developer.apple.com/technotes/tn2005/ tn2138.html#TNTAG12>.


steve

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >QTMovie frame looping (From: email@hidden)

  • Prev by Date: Re: Need help setting up KVO
  • Next by Date: toggle new attribute in range of text (was : exponent action in NSTextView subclass)
  • Previous by thread: QTMovie frame looping
  • Next by thread: toggle new attribute in range of text (was : exponent action in NSTextView subclass)
  • Index(es):
    • Date
    • Thread