JMF problem

Share

I am trying to compile a sample -elmafrood eno sha3'aal- but when i try it on my machine i got this exception:

java.lang.IllegalArgumentException: Illegal request to write non-integral number of frames (22050 bytes )

at com.sun.media.sound.SimpleInputDevice$InputDeviceDataLine.read(SimpleInputDevice.java:524)

at com.sun.media.protocol.javasound.PushThread.process(JavaSoundSourceStream.java:790)

at com.sun.media.util.LoopThread.run(LoopThread.java:135)

javax.media.NotRealizedError: getDataOutput cannot be called before realized

at com.sun.media.ProcessEngine.getDataOutput(ProcessEngine.java:379)

at com.sun.media.MediaProcessor.getDataOutput(MediaProcessor.java:138)

at Record.run(Record.java:63)

javax.media.NotRealizedError: getDataOutput cannot be called before realized

at com.sun.media.ProcessEngine.getDataOutput(ProcessEngine.java:379)

at com.sun.media.MediaProcessor.getDataOutput(MediaProcessor.java:138)

at Record.run(Record.java:63)

Error: Unable to realize com.sun.media.ProcessEngine@19ce060

So where do u think the problem will be?
The sample is attached

This exception was thrown simply as the format i am using is not supported on my machine so i changed it from mpeglayer3 to mpeg.

Well done.

-------------%%%
__Ahmed Hashim__%%%