Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Efficient decoding - replace GetMoviePict?



Using the QTVisualContextSetImageAvailableCallback(), you can install a callback to know when an image is available.
Then, you just have to manipulate your movie directly, for example, call SetMovieTime() will move your movie at this time, and your callback will be call when your image is ready.
Each CVImageBufferRef produced by QuickTime contains the timecode of the corresponding frame. You can retreive it using CVBufferGetAttachment() with the kCVBufferMovieTimeKey.




Le 16 juin 08 à 04:02, Russ a écrit :


Thanks, but from what I've seen, this approach is heavily oriented towards vanilla consumer TV-playback applications. QTVisualContextCopyImageForTime is quite specific that only a limited range of frames can be passed in, with no backwards travel. That makes it useless for me----I need (procedural non-event-driven) random access on demand---it's OK to be a bit more efficient for frame-by-frame forward playback, but random frame access is required for pro applications. With an intra-frame codec like ProRes, there should be very little penalty for random access above the disk access time.


Le 14 juin 08 à 19:44, Russ a écrit :

My app retrieves the decompressed images from QT movies as fast as
possible (>realtime), and I have long-standing working code using
GetMoviePict and QDPictDrawToCGContext. However, performance is poor
and when I look at it with Shark it is clear why --- the codec is
only a small portion of the time per frame....

Is there a more efficient access path? Ideally I'd want to be able
to supply recycled storage for the codec to render the image into
directly....



This sample code may give you some starting points about the modern way to extract image from a Movie:

http://developer.apple.com/samplecode/QTPixelBufferVCToCGImage/listing1.html



_______________________________________________
Do not post admin requests to the list. They will be ignored.
QuickTime-API mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quicktime-api/email@hidden

This email sent to email@hidden


Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
QuickTime-API mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quicktime-api/email@hidden

This email sent to email@hidden

References: 
 >Re: Efficient decoding - replace GetMoviePict? (From: Russ <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.