JMF Process Configuration

I am working through the guide on JMF, but one of the examples is giving me problems. The lines of code are as follows:

Processor processor =null;

try

{

processor = Manager.createProcessor(ml);

}

catch (IOException e)

{

System.exit(-1);

}

catch (NoProcessorException e)

{

System.exit(-1);

}

//configure the processor

process.configure();

// block until it has been configured

processor.setContentDescriptor(

new ContentDescriptor( ContentDescriptor.RAW ));

Ok. Here is the problem as I understand it. configure() is an asynchronous method. So when I get down to setContentDescriptor() the process isn't configured yet and it throws this exception:

javax.media.NotConfiguredError: setContentDescriptor cannot be called before configured

I've seen some people using a function called waitForState(), but when I try to us it the compiler calls it an unresolved symbol. Anyone have a solution for this one?

Thanks,

Khanathor

Message was edited by:

khanathor

[1509 byte] By [khanathora] at [2007-11-26 19:51:57]
# 1
Stinking crossposter. http://forum.java.sun.com/thread.jspa?threadID=5141919
warnerjaa at 2007-7-9 22:42:24 > top of Java-index,Java Essentials,Java Programming...
# 2
Sorry about that, warnerja. I overlooked the JMF section of the forums and the fact that I was crossposting completely slipped my mind. It won't happen again.Thanks,Khanathor
khanathora at 2007-7-9 22:42:24 > top of Java-index,Java Essentials,Java Programming...