I would highly highly highly suggest using a QTOpenGLTextureContext
and insert frames with a CVOpenGLTextureRef, using
QTCaptureVideoPreviewOutput, and using setVisualContext on it. NSImage
is really not the way to go if you are looking to avoid latency.
On Sep 22, 2009, at 10:14 AM, Christopher Wright wrote:
Ah, that does sound promising. I'll try throwing a pre-loaded image
at
the input port when the capture session is stopped, see what happens.
Good idea -- let us know how that goes.
Is adding the CVImageRep to an NSImage then passing that to the
QCRenderer the most efficient way to handle it btw?
You're in tradeoff land here, if QTKit is in fact reclaiming the
texture (still speculative) -- the CVImageRep may be the most
efficient in terms of code, memory usage, and execution speed, but
it's also non-functional with this use case (again, speculatively).
I'm _guessing_ you can keep doing this, but have some method of
cloning the texture when you stop the capture session so that it
doesn't get freed. This should keep stuff running smoothly without
requiring you to change up your pipeline. I don't know how easy/
impossible it is to copy CVImageReps...
Backtrace below (it does appear to crash when setting a port value
within QC - see thread 1).
(note: please include headers when posting crash logs -- a few
weeks ago someone posted a crash log to the QT-dev mailing list, and
the clue was actually in the header (they were using NSOperations on
a 10.5.6 system, and NSOperation had a subtle race condition on x86
processors prior to 10.5.7 that could cause the app to crash with an
unhandled exception -- the actual backtraces weren't useful in that
case))
Looks like a standard message-send-to-a-freed-object crash, so
that's promising.
unrelated: looks like you're building from a flash drive; how has
that worked out for you? are builds noticeably faster/has drive
reliability dropped any? (I do dozens to hundreds of builds a day,
so if it saved a few seconds, and didn't toast the flash drive, I
might consider that for myself... I always hear about how flash can
sustain a bazillion writes now, but I still have my doubts...)
--
[ christopher wright ]
[email protected]
http://kineme.net/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list ([email protected]
)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/doktorp%40mac.com
This email sent to [email protected]
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com
This email sent to [email protected]