Capture Devices

I have alotts of questions about JMF, so any help would be appreciated. Thx in advance!!!!!!!!!!

Ok, so i'm new to this java media framework and there is one thing that has reallyyyyyyy been bothering me. It's about capture devices.

So, at first i thought i knew what they were. According to sun,

"You can use JMF to capture media data from a capture device such as a microphone or video camera."

This makes me believe that a capture device is a physical device plugged into the computer. Understanding this I looked for some introductory code to record from a microphone, and when i found it it worked fine.

But when I looked for what capture device it was using, it was using JavaSound, not a capture device with a name of 'microphone' or something similar. If I plug in a microphone, shouldn't java then indicate that there was a microphone capture device available? So i guess my questions are these...

1. If capture devices can include non-physical devices like Javasound, then what exactly are capture devices? Are these devices both physically outside the computer and also programs inside of the computer?

2. If I wanted to capture a live video by connecting a cam to the computer via a firewire, how would I know beforehand if the data format sent by the cam was able to be handled by Java?

3. Somewhere, I read that one needed to register a capturiedevice by using JMRegister. Why would i need to do this and how?

thx in advance!

[1513 byte] By [Stegdura] at [2007-11-26 18:50:43]
# 1

Hi,

1. Javasound is just an identifier for a device connected. So, technically if you say you are using javasound for capturing, it would be equal to saying that you are using a microphone for capturing.

2. I have seen JMF detect a DV camera over IEEE1394, but it couldnt use it. I guess DV camera was too hardcore for JMF ;-). Though, you can try again.. Maybe it might work out for you. I And if you get to the point where you can successfully connect DataSource to the firewire device, the it means Java would handle it.

3. JMF does not detect devices automatically. That's why you need to do it. You open JMF Registry and go to Capture Devices tab. From there click on "Detect Capture Devices" button and let JMF detect what you have (btw, JMF will not recognize multiple cameras). After that click "Commit" button and then you can close JMF Registry.

Hope that was clear enough.

andreyvka at 2007-7-9 6:24:46 > top of Java-index,Security,Cryptography...
# 2
can u give the code for storing audio from microphoneI am doing a live conference project...is there no solution rather than storing the audio for few sec and transmitting it...This gives a lag in the conversation
kaleajinkyaa at 2007-7-9 6:24:46 > top of Java-index,Security,Cryptography...
# 3

hi

if (AudioSystem.isFileTypeSupported(AudioFileFormat.Type.AU,

audioInputStream)) {

AudioSystem.write(audioInputStream, AudioFileFormat.Type.AU, file);

}

if u want more explination and full sample source code visit following url

http://javasolution.blogspot.com/2007/04/record-and-save-audio-using-java.html

Arunssofta at 2007-7-9 6:24:46 > top of Java-index,Security,Cryptography...
# 4
http://javasolution.blogspot.com/2007/04/sound-over-ip-with-jmf-rtp.html
Arunssofta at 2007-7-9 6:24:46 > top of Java-index,Security,Cryptography...