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: Unsafe pixel pools - must disable aging!



Russ <email@hidden>
I have a movie-reader baded on the QTPixelBufferVCTToCGImage sample. It works except that it is NOT TIMING-SAFE ---- if buffer processing is delayed, buffers will be overwritten by later images even though they are retained and the address locked! You can get by with that for simple movie players, but it is unacceptable for more complex applications. This is a generic problem for all Quicktime movie- reading applications using this approach.

CVPixelBufferPools should not recycle CVPixelBuffers (or their backing memory) while they are still retained. If you have a reproducible case where this is happening, please write a bug report and attach sources, compiled executable and media that we can reproduce it with.


The problem occurs because the PixelBufferPool used during decompression apparently has an "aging" mechanism controlled by kCVPixelBufferPoolMaximumBufferAgeKey It "ages" the pixel buffer by moving it back into the available-buffer queue even though it is locked. This is a bug.

That's not what the mechanism is for. The aging clock starts when the buffer is released back into the pool. If you retain the buffer, it should not be recycled.


I am looking for help to work around this by disabling the aging mechanism----but I can not see how to get to the pixel buffer pool in order to set the kCVPixelBufferPoolMaximumBufferAgeKey value. (The type of the number to be set is not obvious either even though the value is zero.)

Are you absolutely certain that there isn't a bug in your code that releases the buffers earlier than you intended? It would be a shame to put a lot of energy into working around a bug that you could fix directly.


Sam Bushell
QuickTime Engineering

_______________________________________________
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


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.