Marylène,
You're talking about the SGDataProc callback mechanism, correct? If
so, this is expected behavior. Think of the SGDataProc as being the
last stop before bits are actually written to disk. If you're only
doing a preview operation, you still need to call SGIdle several times
a second to give Sequence Grabber idle time to do its work, but the
SGDataProc will not fire, because no data is being written to disk, as
it is in the SGStartRecord operation.
Oh, and BTW, when the documentation says, "After starting a preview or
record operation, the application calls this function [SGIdle] as often
as possible. The sequence grabber component then calls your SGIdle
function.", it's really talking to developers who are writing Sequence
Grabber channel components (we already provide one for video and audio,
but you could imagine someone making a custom SG channel component in
order to do real-time capture of some other media type). The last
sentence means, "It is the app developer's responsibility to call
SGIdle as often as possible (during preview and record operations), and
when they call SGIdle on the sequence grabber component, the sequence
grabber component will turn around and call your sequence grabber
channel's Idle function".
If you want to preview AND still have your data proc get called, a
trick people often use is to set the flag seqGrabDontMakeMovie in the
last parameter of SGSetDataRef/SGSetDataOutput, then call
SGStartRecord. And on the SGChannel that you want to preview, use
SGSetChannelUsage(channel, seqGrabRecord | seqGrabPlayDuringRecord);
This fill force sequence grabber to run the record code (and preview
while recording), but it won't write anything to disk.
HTH
-Brad Ford
QuickTime Engineering
On Dec 15, 2004, at 1:06 PM, Marylene Pinet wrote:
Hello,
I'm displaying the images from my webcam using a timer in which I call
the function SGIdle on my grabber component.
It works if I started my grabber with startRecord, but when I change
it into startPreview, SGIdle is still called but never lead to the
execution of my callback as it does with startRecord.
I don't understand because the QuickTime documentation says : "After
starting a preview or record operation, the application calls this
function [SGIdle] as often as possible. The sequence grabber component
then calls your SGIdle function."
_______________________________________________
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
_______________________________________________
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