Mailing Lists: Apple Mailing Lists

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

SGDataProc leads to error



thanks for all the help so far with SGDataProc. I've updated the SDK, so
now I am able to access the interface.

I followed this advice (adding SGDataProc to the SGCapture2Disk code)
change line

if (mFile != null) {
mGrabber.setDataOutput(mFile,seqGrabToDisk);
mGrabber.startRecord();

to :

if (mFile != null) {
mGrabber.setDataProc(new MyDataProc());
mGrabber.setDataOutput(mFile,seqGrabToDisk);
mGrabber.startRecord();


my SGDataProc is simply :

static class MyDataProc implements SGDataProc
{
public MyDataProc(){
System.out.println("hello world");
}

public int execute(SGChannel chan, QTPointerRef dataToWrite, int
offset, int chRefCon, int time, int writeType)
{
System.out.println("gotem");
return 0;
}
}



after I hit record, this returns :

hello world
quicktime.app.sg.SGDrawer[quicktime.std.sg.SGVideoChannel@980017[type=sgch,subType=vide]],task,unrecoverable=false
quicktime.QTRuntimeException[QTJava:5.0.1g3]-50=paramErr,QT.vers:5028000
at quicktime.app.time.TaskThread.run(Compiled Code)
at java.lang.Thread.run(Thread.java)
quicktime.QTRuntimeException[QTJava:5.0.1g3]-50=paramErr,QT.vers:5028000
at quicktime.app.time.TaskThread.run(Compiled Code)
at java.lang.Thread.run(Thread.java)


If I comment out the setDataProc() line, the code works again.
I am wondering if I am doing something wrong with the mDrawer and
tasking. If I can get data from SGDataProc, I don't really care about
mDrawer. I would like simply to process the data and draw it to screen.
the simplest task would be painting the frame rate on the data ala
minimung.



thanks again!

z a c h




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.