Jmf detect capture device

hi guys,
why is my deviceList return null?
// Get the CaptureDeviceInfo for the live audio capture device
Vector deviceList = CaptureDeviceManager.getDeviceList(new
                        AudioFormat("linear", 44100, 16, 2));
if (deviceList.size() > 0)
      di = (CaptureDeviceInfo)deviceList.firstElement();
else
// Exit if we can't find a device that does linear, 44100Hz, 16 bit,
// stereo audio.
     System.exit(-1);

Dear andreyvk ,
I've read your post
http://forum.java.sun.com/thread.jspa?threadID=785134&tstart=165
about how to use a single RTP session for both media reception and trasmission (I'm referring to you RTPSocketAdapter modified version), but, at the moment, I'receive a BIND error.
I think that your post is an EXCELLENT solution. I'modified AVReceive3 and AVTransmit3 in order to accept all parameters (Local IP & Port, Remote IP & Port).
Can you please give me a simple scenario so I can understand what the mistake?
I'use AVTransmit3 and AVReceive3 from different prompts and if I run these 2 classes contemporarely both in 2 different PC (172.17.32.27 and 172.17.32.30) I can transmit the media (vfw://0 for example) using AVTransmit3 but I'can't receive nothing if I run also AVReceive3 in the same PC?
What's the problem? Furthermore, If I run first AVReceive3 from a MSDOS Prompt and subsequently I run AVTransmit3 from another prompt I see a BIND error (port already in use).
How can I use your modified RTPSocketAdapter in order to send and receive a single media from the same port (e.g. 7500).
I've used this scenario PC1: IP 172.17.32.30 Local Port 5000 and PC2:IP 172.17.32.27 LocalPort 10000
So in the PC1 I run:
AVTransmit3 vfw://0 <Local IP 172.17.32.30> <5000> <Remote IP 172.17.32.27> <10000>
AVReceive3 <Local IP 172.17.32.30/5000> <Remote IP 172.17.32.27/10000>
and in PC2:
AVTransmit3 vfw://0 <Local IP 172.17.32.27> <10000> <Remote IP 172.17.32.30> <5000>
AVReceive3 <Local IP 172.17.32.27/10000> <Remote IP 172.17.32.30/5000>
I'd like to use the same port 5000 (in PC1) and 10000 (in PC2) in order to transmit and receive rtp packets. How can i do that without receive a Bind Error? How can I receive packets (and playing these media if audio &/or video) from the same port used to send stream over the network?
How can I obtain a RTP Symmetric Transmission/Reception solution?
Please give me an hint. If you can't post this is my email: [email protected]

Similar Messages

  • How detect capture device without jmf&java client pc ??

    hi...
    a computer install jmf & java => detect catpure device
    but... no detect capture device without jmf & java clientpc...
    however solved this problem?
    plz...
    thanks..
    email : [email protected]

    You must hard code a dependent platform code to examine the registry or its similar in linux.

  • How to call "detect capture devices" in my program

    Hi,
    I'd like to develop a webcam program. Is it possible to call jmfregistry's "Detect Capture Devices" in my code? So I don't have to ask the user run jmfregistry.
    Thanks,
    Derek

    detect capture devices is dependent of the plataform. I recommend to look into the source code of JMFRegistry and JMF.

  • JMF Registry Capture Device register a mobile camera(Problem or Impossible)

    Hi all
    I have found some softwares that allows us using mobile phone camera as a web cam and use with skype, yahoo messenger etc... Those allows us use them as wireless web cameras and medium is bluetooth or wifi. So I am wondering whether they can register with JMF capture device registry and using for our java applications?
    Supporting for wireless capability is important if they can registered. Otherwise we have to go for an expensive IP cameraWhat I want to point out is they detect as registered web cameras in skype and yahoo messenger but not with JMF.
    This is the software which I have tried
    [http://www.wwigo.com/home.php]
    Can anyone please answer?
    Edited by: deshan on May 3, 2009 3:33 PM

    JMF will only work with web cameras that are accessible through the DirectShow or VFW interfaces. If the way you're accessing them isn't available through one of those two APIs, then JMF probably won't be able to use the web cam.
    But, of note, JMF doesn't need a web cam to be registered to use it, it simply needs to know the hardware URL of the web cam. Normally this is something like "vfw://0" for the default camera.
    If you could get a URL like that, and use it as a MediaLocator for your DataSource, then you could possibly use your web cam without having to register it.

  • Detecting capture device

    Hi
    How can i detect a capture device in jmf ?
    Is there any listener for this which will raise an event when a new device is
    plugged in while my application is running ?
    Thank you

    public Vector deviceList;
    public  CaptureDeviceInfo di;
    deviceList = CaptureDeviceManager.getDeviceList(new (AudioFormat.LINEAR,44100,16,2);
    for(int i = 0; i<deviceList.size(); i++)
    di = (CaptureDeviceInfo)deviceList.firstElement();
    }

  • JMF Registry Editor reports "Capture device query unsuccesful"

    I am working with JMF. Sometimes (maybe 1/3rd of the time) when I go into JMF Registry Editor, Capture Devices and click "Detect Capture Devices". I get an error that says "Capture device query unsuccesful".
    There is no further information. Nothing is logged in the log file. I can find nothing about this in the documentation, nor can I find this text in the downloadable source. Anyone know what this means?
    Also, as far as I can tell, this has nothing to do with how my device is connected and so on, it will work one time, and not another.
    Thanks,
    Joe Larson

    I am having the same problem, however it never works for me. I noticed that when the JMFInit runs that the program terminates while it is apparently still quering a device. I think that it's a timeout issue. I seems like the device query is not waiting long enough for the devices to respond. I have not found a way to change the timeout value. Any ideas on how to change the timeout value?
    Also, have you had any success in using the JMF for video capture and transmission. I am working on a chat program. For now, it's just for fun, but maybe will will make is a sellable product later.
    Take care,
    John

  • Capture device in use

    Hi,
    I am using jmf to capture device video, How I can test if the video device is in use or no?
    thinks

    I use the following function to create a clone data source.But I have an exception:IOException:capture device in use
    Can u help me?
    public DataSource initDevice()
    Vector formatsCatalog = new Vector();
    Vector audioDevices = new Vector();
    Vector videoDevices = new Vector();
    Vector devices = new Vector();
    // rcupration des priphriques disponibles
    devices = CaptureDeviceManager.getDeviceList (null);
    CaptureDeviceInfo cdi;
    if (devices != null && devices.size() > 0)
    int devicesNum = devices.size();
    Format[] formats;
    for ( int i = 0; i < devicesNum; i++)
    cdi = (CaptureDeviceInfo) devices.elementAt (i);
    formats = cdi.getFormats();
    formatsCatalog.addElement(formats);
    // on spare les periphriques audio et vido
    for (int j = 0; j < formats.length; j++)
    if (formats[j] instanceof AudioFormat)
    audioDevices.addElement(cdi);
    break;
    else if (formats[j] instanceof VideoFormat)
    videoDevices.addElement(cdi);
    break;
    CaptureDeviceInfo cdiVideo;
    // on recupre l'unique device video
    cdiVideo = (CaptureDeviceInfo) (videoDevices).elementAt(0);
    // on recupere les formats disponibles
    Format[] video = cdiVideo.getFormats();
    // on slctionne un format
    format = video[3];
    System.out.println("Type: " + video[3].getEncoding() + " Data: " + video[3].getDataType());
    try {
    // on cr le DataSource
    ds = Manager.createDataSource(cdiVideo.getLocator());
    this.dsclone =(DataSource) Manager.createCloneableDataSource(ds);
    // ds= (DataSource) ((SourceCloneable)ds).createClone();
    return dsclone;
    catch (IOException ioe) {
    System.out.println("Capture device "+ioe);
    System.out.println("Capture device "+ioe.getMessage());
    catch (NoDataSourceException ndse) {
    System.out.println(ndse);
    return null;
    }

  • Detecting Video Capture Devices without Installing JMF

    Hi All,
    I want to detect the video capture devices, without installing the JMF.
    I had included the jmf (windows version) in lib path in netbeans ide. I am able to detect the audio capture device. But unable to detect the video capture devices. But if I install the JMF, I am able to detect the Video Capture devices in My system. Can anyone help me?
    Thanks,
    Vinoth Kumar.

    YES! Please take a look at SIP Communicator project. They have all what u want.
    The main idea is copy all .dll files to System or System32 (Please check files which JMF will copy to ur computer and where).
    U need to have jmf.jar and sound.jar too ( maybe more) in your computer.
    Your program should have DirectSoundAuto.java, JavaSoundAuto.java, JavaSoundDetector.java, JMFInit.java. Those files are in JMStudio source code. They are used to detect all capture devices and register it to JMF, but wait !!! where they will be saved? In order to save information about capture devices which are detected, you should create "jmf.properties" file in the same location with jmf.jar.Therefore, u should modify the JMFInit.java so it can check if the "jmf.properties" exists. If it's not, you have to create it.
    Check SIP Communicator at Folder "media" then "device". They have modified those files I mentioned above and created some new files to SC can detect more devices.
    Edited by: tamngminh on Sep 16, 2008 9:50 AM

  • URGENT- problem in detecting audio device using  JMF in  WIndows7 - 64 bit

    Hi,
    I am trying to detect the audio device in windows 7 -64 bit OS, using JMF API with JRE 1.6.18.But it showing zero device found.below i have mentioned the source code that i have used.please suggest how to solve this , thanks in advance.
    import java.util.ArrayList;
    import java.util.Vector;
    import javax.media.CaptureDeviceInfo;
    import javax.media.CaptureDeviceManager;
    import javax.media.format.AudioFormat;
    import javax.media.format.VideoFormat;
    public class CaptureDeviceFinder {
    //possible audio formats available
    static String audioformats[] = {
    AudioFormat.LINEAR };
    static ArrayList available_audiolist= new ArrayList();
    public static void main(String[] args) {
    findAudioDevices();
    }//main
    public static void findAudioDevices() {
    / Audio capture devices /
    System.out.println("CAPTURE AUDIO FORMATS:");
    for (String format : audioformats) {
    System.out.println("format is :"format);
    Vector<CaptureDeviceInfo> devices = CaptureDeviceManager
    .getDeviceList(new AudioFormat(format));
    System.out.println("devices is"+devices);
    for (CaptureDeviceInfo device : devices) {
    if (!devices.isEmpty()) {
    System.out.println("\tFormat: " format);
    System.out.println("\t\t" device.getName());
    available_audiolist.add(format"|"+device.getName());
    System.out.println("list is :"+available_audiolist);
    Edited by: Saravana4u on Mar 17, 2010 10:39 AM

    almightywiz wrote:
    Well, I don't know if the JMF Studio works on a 64-bit system, but the base java libraries work just as well as on a 32-bit system. I currently use both Windows 7 64-bit and 32-bit version, and I am able to recognize all of my audio input devices.JMF wraps around and makes use of a bunch of native interfaces, all of which are precompiled for 32-bit systems. As such, anything relying upon those 32-bit libraries will not work, and that cuts the functionality down to, essentially, the cross-platform pack stuff.
    JMF's sound infastructure is mostly a wrapper around JavaSound, so as long as JavaSound is working on the JRE, you'll be able to utilize the audio functionality.
    As for device detection, I know at least some of that is native code. I'm not 100% sure, but I'd almost expect the Windows performance pack to never return any devices on a 64-bit system, but the cross-platform back to return audio devices. This is an assumption, but, that's what I would expect.
    In any case, if you're using the Windows performance pack, you'd most likely get better results by switching to the cross-platform pack.

  • Detect whether capture device in use?

    Hi
    I want to detect whether the capture device in use in JMF.
    I looked at the MediaLocator and CaptureDeviceInfo but I can't see any method to do that.
    There is also no exception class for it?
    So my questions are:
    1) Whether we can detect a capture device in use?
    2) Whether we can free the capture device ( The device is used by another thread or program) or to say take control of it.
    Thank you very much.
    Regards
    K.

    1) Whether we can detect a capture device in use? If you know the media locator of the device, and you attempt to use it while it's in use... you'll get an exception thrown. Not sure which one, but I'd imagine an IOException of some sort...
    2) Whether we can free the capture device ( The device is used by another thread or program) or to say take control of it. You cannot.

  • Trouble with detectin IDS Eagle capture device with JMF

    Hi
    I'm having trouble detecting my capture card (IDS Eagle model). Is anyone else having the same problem? I tried using the JMStudio tool but the only capture devices detected are the audio ones.
    I have installed the WDM driver for this card but jmf doesn't detect it.
    Any help will be appreciated. Thank yoU!

    Hello Tania,
    I think if you look at the source code for AVTransmit2.java, which can be downloaded, this will help you. Make sure you use javasound://8000 as one of the parameters when creating the AVTransmit2 object.
    Regards,
    James

  • JMF-based applet can not detect audio devices on Vista (?)

    Hi,
    As many people reported, I encountered the same issue - CaptureDeviceManager.getDeviceList does not detect any audio device on IE/Vista.
    Here is my testing environment:
    HP XW4600, RealTek HD Audio onboard sound card,
    Vista SP1 (Business, Home Premium, and Vista64)
    JRE1.5.0_16, JMF2.1.1e
    A recording Applet runs in IE7 (which works fine on XP and its Java application version always works fine on Vista)
    I have tried a number of things without success:
    1)Use different audio formats as the input parameter for getDeviceList
    2)Try CaptureDeviceManager.getDevice(new String("DirectSoundCapture"))
    3)CaptureDeviceInfo info = new CaptureDeviceInfo(com.sun.media.protocol.dsound.DataSource.NAME,new MediaLocator("dsound://"),null);
    4) Vector devices = (Vector) CaptureDeviceManager.getDeviceList(null).clone();
    5)Uncheck UAC(Vista User Access Control)
    6)Set IE settings least restrictive
    7)Try signed or unsigned recording Applet
    8)Pack the recording Applet to a jar and deploy to JRE\lib\ext
    9)Run JMFInit and copy the files in JMF\Lib to System32 folder
    On a few occasions, audio devices can be detected. For examples,
    10)Upgrading an HP XW4200 (XP machine with AC�97 codecs driver) to Vista,
    11)1/5 chance on the machines with both Sun JRE and MS Java SDK installed.
    12)Trying Item # 9. it worked once on one machine, but after rebuilding the machine, the same trick does not play.
    I am wondering if there is a way to let JMF-based applets detect audio devices on Vista or this is an inherent problem with JMF, IE and Vista.
    I would appreciate it very much if you�d kindly offer any help and suggestions.
    -Belfield

    >
    As many people reported, I encountered the same issue - CaptureDeviceManager.getDeviceList does not detect any audio device on IE/Vista.>(..in an applet)
    >
    I would appreciate it very much if you'd kindly offer any help and suggestions. >I suspect the basic problem here, is the installer that defaults to preventing the applet access to record sound (I am guessing that would 'spill over' into web-cam permissions). A quick test of that is to try the same code as an application.
    If the application works, one possible fix is to launch the application using webstart. Webstart will work from a web page, and offers many other advantages over a standard applet.

  • Javafx use jmf and capture audio device

    Hello, I noticed a problem with the use JavaFX and Java Media Framework (JMF), in a project javafx call Java classes using JMF, but are not recognized PC audio devices, in fact when I executed 's the code CaptureDeviceManager.getDeviceList (null), displays the error: "could not commit protocolPRefixList", without recognizing any audio device. Instead I call if my application using JMF, outside of a JavaFX project, the devices are found and everything works properly, perhaps this problem depends on the security settings of JavaFX, or inability to use JavaFX is that jmf interfaces with audio and video devices?
    thanks for the help

    I'd use jmf and javafx but it was not for capture devices.
    If you use jmf there are native libraries.
    The thing i found was about the java.library.path wich is overriden when you start javafx that jmf can't load approriate libs.
    Try to compare the System.getProperties for java and javafx then you should find where is the problem.

  • No audio capture device detected Osprey 240e

    I have recently installed Adobe Flash Media Encoder (AFME).  I have installed the Osprey 240e video/audio capture card.  At first, the Osprey 240e was detected by the AFME.  Now AFME is telling me there is no audio device detected.  The video part seems to be fine.
    I have:
    1. Rebooted the computer AFME is installed on
    2. Reinstalled AFME
    3. Reinstalled the Osprey 240e drivers (reboot computer again).
    When I start the AFME program, it still indicates not audio capture device detected.  Any ideas on how to resover the issue.

    You may need to open a support case with Viewcast. They have always been very responsive when I have had problems/questions.

  • JMF capture device already in use

    Hi,
    I'm trying to make something like VI or Netmeeting with JMF. The problem is that i can't send over RTP and have a Player with the same MediaLocator.
    error : ...Capture device already in use...
    Does anybody know how to send and play the same media at the same time

    If I send to unicast address ? I wanna find a possibility to use the same medialocator or the same datasource for example. It tell me that the capture device is already in use. How can I capture and send at same time. For example, how can you see wath you're sending with Videotransmit from java.sun.
    Tanks

Maybe you are looking for

  • XML to database using OracleXML ...

    I am trying to insert xml file into CCX_persons table : I got the error message: C:\XML>java OracleXML putXML -user shrikant/akola@devdb -fileName xmlperson.xml "ccx_persons" oracle.xml.sql.OracleXMLSQLException: java.lang.ClassCastException: oracle.

  • Failed to install python-pip due to unknown signature

    sudo pacman -S python-pip ERROR:python-distribute: signature from "Stéphane Gaudreault <[email protected]>" is unknown trust ERROR:python-pip: signature from "Dan McGee <[email protected]>" is unknown trust I'v tried "sudo pacman-key --init" what wit

  • How to set different renderers to same column

    I am trying to set different renderer to same column. table.getColumn("columnname").setCellRenderer(                FirstCellRenderer); table.getColumn("columnname").setCellRenderer(SecondCellRenderer); I want both to work at the same time. It is tak

  • Keynote with IOS

    HEllo Since last night, I did not install the update keynote iPhone 5C. it crashes with the installation. why? and how? THanks, VInce

  • Could not complete iTunes store purchase

    Trying to make a purchase in itunes Store. Recieved the following message: "We could not complete your Itunes Store Request. An unknown error occurred -45054. There was an error in the Itunes store." Anyone run into this before? What was your solutio