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.

Similar Messages

  • 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

  • Java.io.IOException: Capture device in use

    I used jmf to create a video server that can send video to several client. when I test program with only client, it's ok. But,if I use more than 1 client, the program generate an exception:
    java.io.IOException: Capture device in use
    best regards

    java_developper wrote:
    I used jmf to create a video server that can send video to several client. when I test program with only client, it's ok. But,if I use more than 1 client, the program generate an exception:
    java.io.IOException: Capture device in useThen you've most likely designed your program wrong.
    If you're using more than one input DataSource in the case when you have more than 1 client, then you're doing it wrong.
    Assuming you're using the proper RTP infastructure, you'll just need to add each client as a target for the RTPManager. If what I just said doesn't make sense, then you're doing it wrong.
    [http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/apidocs/javax/media/rtp/RTPManager.html]
    Please see section 2, "Multi-Unicast Session"

  • 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;
    }

  • Java: Capture Device in use...

    Hello everyone!!!!
    After an effort of two days (almost 20 hours), i couldn't find the solution and finally want any of you to, please solve my problem or guide me.
    I have an application, when i run my application, it shows some GUI, i press Record, and it starts recording video through video cam.
    Now when i stop it and again try to Record, it throws an exception, Capture Device in use.
    I tried,
    p.stop();
    p.deallocate();before closing the recording screen but still there are issues. Can you kindly tell, how to release all the resources from the Processor(p is processor)
    Thanks.

    SOLVED...
    Please lock this thread.

  • "Capture device offline" - using Logitech webcam 9000

    I am wanting to capture video using my Logitech webcam 9000, but I get "Capture device offline" in Adobe Premiere Pro when I attempt to capture video.  Could someone provide some guidance on how to get this to work?
    I used this webcam to capture video in Corel Visual Studio just fine, but I am having issues in Adboe.
    thanks.

    Welcome to the forum.
    Given that hardware, I would just continue using Corel. You can Export from it, or perhaps that would be a Save operation (do not know that software), and then Import those files into PrPro for editing.
    I do not even think that OnLocation will be suitable for the hardware.
    Good luck,
    Hunt

  • 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();
    }

  • I cant locate capture devices!!!! Please HELP!!!

    I am trying to send voice over to another computer but right now I cant get my program to detect my capture device. I looked through the forum for solutions and found 2 solutions- 1 is using the JMF registry editor and click on "connect capture devices"; 2 is using "Vector devices = CaptureDeviceManager.getDeviceList(null);" which gets me the entire list of devices.
    I tried both but nothing happend. I tried a USB microphone/headset, a regular microphone and a normal non-usb microphone/headset. None of them worked for my program. The weird thing is that when I run JMF application and try to use the application for voice capturing those capture devices do work. So basically my program doesnt seem to work... Below is the test class I made. Please help me out! thanks
    import java.io.*;
    import java.util.Vector;
    import javax.media.*;
    import javax.media.format.*;
    public class Devicew {
    public static void main(String [] args) {
         Vector devices = CaptureDeviceManager.getDeviceList(null);
         System.out.println("Number of capture devices: " + devices.size());
         for (int n = 0; n < devices.size(); n++) {
         CaptureDeviceInfo info = (CaptureDeviceInfo) devices.elementAt(n);
    System.out.println("we found something" + n);
         System.out.println(info.toString());
    }

    Hi
    Strictly speaking this doesn't sound like a jmf api problem.
    It sounds like the classpath is not set properly for your app. When you launch the app set the classpath variables to your classes eg
    java -jar -cp path/to/my/classes myapp.jar
    hope helps
    regards

  • Looking for RCA capture device for streaming

    My newspaper does some random video streaming of some events...however, we generally use a Windows PC Laptop (which is less powerful than the MacBook Pro I'm wanting to use, for several reasons such as convinience and well, the better performance).
    We have a RCA capture device that takes video and audio in from a basic Canon video camera and then feed that into Livestream.
    I know Blackmagic Design has a video capture device for Apple, but it's $149. Is there something cheaper out there for Macs? Our RCA capture device we use on Windows will not work on Mac.
    It just takes the RCAs and we plug it into the USB port. A firewire port would be fine too.

    I have read through some more forums and I only found one mention of the Media Manager 'Recomress' function.
    It said:
    "Transcoding with MM (recompress). It preserves timecode/reel name, file names, etc... Except the clip ID, which is used along with reel name and timecode to batch capture from source files (at least for P2)."
    Clip ID is the metadata relyable for the work of batch capture. It seems without it it is impossible to batch capture.
    I wonder why they designed Recompress like that, if it is true?

  • Supported Video Capture Devices?????

    I recently purchased the Adobe Photoshop Elements Premium 8.0.  I am now looking for a VIDEO CAPTURE DEVICE that is supported for use with this software.  Adobe offically only says Matrox brand devices are acceptable but these devices are expensive.
    I've also heard about the Canopus 110 for about $200.
    If anyone can make a suggestion on which Capture Device to use, which ones are recommended or the one that just seems to work best, I would appreciate it.
    Thanks,
    Robert 

    You would get a better answer @ http://forums.adobe.com/community/premiere/premiere_elements

  • Which capture devices work?

    Hi everyone,
    I've never seen such an important detail to be so difficult to find
    I know they say he device must have directshow etc etc but i can't just find a list.
    Can anyone let me know what capture device you use that you know works? Thanks!!
    We are using FMLE for streaming our church services live and I have a deal on a Videonics MX-1 which I am thinking of getting if I can quickly find a device I can go through from the MX-1 to the PC that will work. I have a cheap Video to USB "Easy cap" which I am trying with FMLE but it does not work very well, at least not with the VCR signal I am sending it...
    thanks for your help everyone...

    Pondini,
    Wow, I thought this would be fairly simple!  Turning out to be quite a complicated thing.
    I really need to figure this out...
    Would you say this is a good solution:
    1. Use a Time Capsule as my media storage drive
    2. Attach an external hard drive to the Time Capsule
    3. Use Time Machine to backup my main computer and my Time Capsule to the external hard drive
    If that doesn't work, I'm kind of stumped as to how I would back up my media from a networked drive.
    I like the stability of Apple's Airport Extremes/Time Capsules.  But perhaps I should be looking at another wireless router?
    Thanks again,
    Matthew

  • [b]Capture device problem with JMF[/b]

    Hi,
    I am doing audio and video transmission using the AVTransmit2 program. This program is at the server side. When 1client requests a transmission, it works fine. I am able to receive the audio and video. But when i have more than 1client i get the error: "Capture device in use", "Cannot create data source". I have created 2 players to render the audio and video on the screen.
    Note: I am using an Object Request Broker(Visibroker) to route the client requests to the server and sending the replies back to the clients.
    Please help, it's urgent.
    For any reply e-mail me at: [email protected]
    Thanking you in advance.

    No, sorry. Haven't got an solutions yet........
    However messing around with the permissions and settings in etc/security/console.perms and /etc/udev/50-udev.rules is causing it to not work in root either.....so i think it has something to do with it. However not figured it out yet.
    But these files and setting do not apply to windows.....
    Does anybody hav a solutions for the problem?
    Greeting,
    Olly

  • Capture device screen

    Hi all,
    We need to capture device screen using j2me,similar to Print Scrn key of keyboard.
    can any one help me to do this???
    thanks in advance
    m.raj

    Does the Displayable you want to capture extend Canvas? If so, you could create a mutable image and invoke the paint(...) method with the Graphics context of the image.
    If you're talking about capturing a screen that isn't part of your MIDlet application, AFAIK that can't be done (and shouldn't be allowed).
    db

  • JMF device in use

    Hi guys I'm developing a desktop application with jmf and a web cam, the main problem is when I open for the first time it work ok but when I close and open the form it throws an exception java.io.IOException: Capture device in use so I want to know how to fix this error
    thank you for your time.

    Maybe you're not releasing the resource correctly after use.

  • Transmitting and playing from same capture device simultaneously?

    I am creating a videoconference software. For that I need to display the video from my system and at the same time need to transmit the video to a remote system.
    I have no idea how to do this. I have created a data source for the capturing device and using that for creating player and processor to play and transmit respectively.
    But the problem is the player is stoping when the video is getting transmitted.
    Can some one tell me how can I solve this problem.
    Thanking you in advance,
    R.Ravi Kiran

    Maybe cloning can do some
    Or manually drop data from datasource to each module

Maybe you are looking for

  • Persisting serialized bean in EJB 3.0

    Hello, I'm seeing some surprising results in EJB 3.0 when executing an update to some bean that is unmarshalled from a remote client. Perhaps I'm misunderstanding the API, but I reached the conclusion, from documentation and various online discussion

  • This white spots, and a little magenta line

    I noticed recently that I have a couple of those white spots now on the right, center portion of my screen. I have one of the very first Aluminum PowerBook's, I got it in January 2004 immediately after the Titanium's were replaced. It's one slightly

  • Set Fixed Array Size

    Hello. I am trying to develop a VI for an FPGA target and I'm trying to make it so whoever is using the VI can specify the size of an input array when they instantiate it (such as by having an input to the VI that says "max array size" or something).

  • PDF forms and file uploads

    I realize that FormsCentral does not currently support file uploads (aka attachments) when using a PDF form to submit. In several of this places I've read this, it seems to imply that PDF forms to not support file uploads. I also noticed that when a

  • PDF generation about PO

    Hello, all. Anyone can tell me how to generate PO PDF file, thanks.