Unable to capture video from webcam in JMF

hi
I am unable to capture video from webcam in an Xlet. I am using Xletview to run Xlet. The method CaptureDeviceManager.getDeviceList(vidformat) returns empty array. Which videoformat should I use and why do I get empty array?

MHP and OCAP only use JMF 1.0, which does not include support for capturing video. You will not be able to do this in any current MHP/OCAP imlementation that I know of.
Steve.

Similar Messages

  • Unable to capture video from webcam in JMF in xlet

    hi
    I am unable to capture video from webcam in an Xlet. I am using Xletview to run Xlet. The method CaptureDeviceManager.getDeviceList(vidformat) returns empty array. Which videoformat should I use and why do I get empty array?
    Thanks
    Rajesh

    MHP and OCAP only use JMF 1.0, which does not include support for capturing video. You will not be able to do this in any current MHP/OCAP imlementation that I know of.
    Steve.

  • Unable to capture video from VHS through DAC-200

    (Running Final Cut Pro 5.1.4)
    I have a DAC-200 to hook up my VCR to my G5 in order to capture video from VHS tapes into Final Cut. I had this set-up working a few months ago, but it was disconnected to rearrange equipment and now I can't get it working again. I have followed the advice from the DAC-200 installation instructions and advice from other forum topics but can't seem to get it to work. I finally was able to get something in the log and capture window besides "preview disabled" and "cannot capture because there is no video." I now can get Final Cut to capture video, however it only captures a blank black screen (and this is all I can see in the preview window).
    I've triple-checked every cable hook-up, the G5 recognizes the converter box, the video tape plays fine to a tv. I've even had our IT-guy here at work come check out my set-up for help and he can't figure out what is wrong either. (He did get my log&capture window to get white fuzz in the black screen at one point though. Does that mean anything?)
    Any help is greatly appreciated! (I'm happy to answer any other questions too.) Thanks!

    I had difficullty with the X.4.10 plus QT7.2 and put my info on the Forum as well as sending feedback to Apple. Shortly afterwards, Apple brought out a short security update which I downloaded and, hey presto, I was then able to use QT7.2 with OSX.4.10. It may be that you missed out on the later small update to QT7.2..... ? Another factor I found was that some little while later I again had a problem so I again installed QT7.2 and over-installed FCP5.1.4 which has resolved my problems for the time being. Worth a try if you still can't get through on the DAC.
    Ron.

  • Unable to capture video from Sony HD HDR-HC7

    I am trying to import video from a Sony HD HDR-HC7 into Final Cut Pro 5.1.1 using the log an capture feature. I have tried most combinations of the presets, but the device is never seen.
    iMove (both iLife8 and the earlier version) has no problem at all seeing the camera. However, I do have to set the camera to HDVout rather than DVout for iMovie to see it.
    Thanks.

    PhotoShoot wrote:
    Don't exactly know what you mean. If you are asking if I did "due diligence" searches, the answer is yes.
    What he means is... click on the search button in his post.
    K

  • Unable to capture video from my Sharp VL-NZ155 camera

    I noticed that is a pretty common statement around,
    even so I couldn't find an answer to my dilemma.
    I have the new Mac 24" (not that new anymore) with
    Firewire 800 cable, and I have Premiere Pro CS4 installed.
    I can control my Sharp VL-NZ155 from the capture
    window, but I can't capture anything, download it to
    the computer.
    Any helpful tips?

    This is it man... I've googled it and you're right,
    it only turns up batteries, but... actually this is the
    camera's model: VL-NZ155... It's a mini DV camera
    that I bought back in 2003... There's a sticker on it
    saying that it's a 10th anniversary Sharp model.

  • Unable to capture video from Sony Handycam

    I am running Premiere CS6 on Win7 Ultimate 64bit. My Handycam is connected via Firewire PCI board. Premiere recognizes the camera, and I am able to use the capture window to move the tape FW and rewind, but when I attempt to play the tape, Premiere bombs and goes to the desktop. I had selected standard capture NTSC since the Handycam isn't HD. I am able to capture the same video without any problems in Vegas and Pinnacle. Is it the settings? Any help would be appreciated!

    I had the earlier PC100 for many years and did occasionally have problems with capture whenever I upgraded my PC (I have built my own for the last 20 years).  Premiere has had issues with certain chipsets on PCI boards for a few years, also the PCI card has to have the correct drivers installed and probably your card let Windows install its own drivers.  The link that Ann posted should have the information to solve your problem, I have looked though it and it uses the same process that I used on my old Win7 PC when a new PCI Firewire card did not work after I fitted it.  If this does not work for you then a new card PCI with Texas chipset may solve your problem

  • Unable to capture video from canon xha1s to final cut pro 6.0. so confused

    hi,
    i purchased a canon xha1s and am simply trying to capture the video onto my macbook pro laptop. i keep getting the error saying my settings are incorrect and am confused as what to put and where. i went to the video/audio settings and put what i believed to be correct (HDV) since my camcorder records in HDV. still that error window pops up when i try to log and capture footage.
    any help would be greatly appreciated!

    Hi .. I had a very similar problem .. if the above fails it may be worth a look at this too..
    http://discussions.apple.com/message.jspa?messageID=10804559#10804559
    Jim

  • Selecting microphone when capturing video from the webcam

    Using Final Cut Pro X
    I want to capture video from my webcam into Final Cut.  I have a USB microphone (Yeti) with which I want to record the audio.  I cannot find an option to select my input source for audio when capturing this footage.  Final Cut seems to default to my microphone on my webcam, which causes echoing and noise. I can select the USB mic when doing a voiceover, but when I capture video I cannot find an option to select my input.  I've made my USB mic my default device in Sys Prefs, but that doesn't work.  Any other ideas?
    Options
    1.  Figure out how to change the default input for webcam capture in Final Cut
    OR
    2.  Use another program.  I've also tried to do the same in both QuickTime and iMovie, and they both capture audio only from the webcam as well.
    Everything I've found online talks about voiceover.  I don't want that.  I want to capture video with it.
    Suggestions are appreciated.  Thank you.

    acyclone wrote:
    Thanks.  Don't know why I didn't see it.  That arrow is pretty small.
    I do still have an issue that I cannot figure out.  I'm using the same mic for webcam recording (now in QT thanks to Luis) and in Final Cut for voiceovers.  Though I'm still on the same Mic the sound is not the same.  It's close, but the sound on the voiceover sounds cleaner and clearer.  I'm sitting in the same spot speaking the same way, but the sound quality difference is noticable.  Not sure why.
    It seems that the difference is in how each software deals with it.
    It may be that QT is sampling audio differently from FCP X somehow, or using a different audio codec or whatever.
    Just guessing, I really have no concrete knowledge.
    Oh, wait: there are a few things that I can notice, after trying a small example: the QT audio is AAC at 44.1 KHz,
    the FCP X is AIFF at 48KHz. Compression and sample rate are different.

  • Webcam Live - Unable to capture Video when "audio" is on

    Unable to capture Video when "audio" is checked.
    Error message "Unable to capture Video - check settings for video compressor and Audio compressor". What are these ??
    I have Plantronics headset and have tried most "8bit, mono settings"
    Capture Video works when audio is not checked.
    Am at latest s/w and driver patch levels.
    HELP !!!

    Addl info
    1) When using Skype, Camera and Mic work fine.
    2) When I get error - the camera view on my screen balcks out

  • Unable to capture video

    I have FCP HD 4.5. I am trying to capture video from a camcorder. I can connect the camera to my iMac via the cameras DV port into the firewire port or by the camera's USB port into the computer's USB. I have tried both ways but the camera is not being recognized. The camera is a Canon Elura 80, mini DV.
    I select Log and Capture and I am told it is "unable to recognize video deck." Then I try Capture Now but it says video device isn't selected. What should I do?
    Thanks

    You have two problems that fold into one another masking the solution.
    1. an intermittant connection between your camera and the computer
    2. a possible conflict between your camera and an external drive.
    Lets take the problems individually.
    1. An intermittant connection. If your camera is not being recognized in system profiler (before trying iMovie or FCP) you have a connection issue. Either the camera settings are wrong, the camera's firewire port is damaged, your firewire cable is flakey and/or your computer firewire port is damaged.
    To test these items individually, you'll need another computer, cable and camera that you know work. If you don't have these things or have access to them, you'll probably need to take your machine to a knowledgable repair shop.
    2. A conflict between the camera and the hard drive. If the camera connects reliably and shows up in system profiler, it should always work with iMovie- even with a hard drive attached. This is the very first test. If it now doesn't work when you try it in FCP with the hard drive attached, you have the firewire bus conflict. Disconnecting all external hard drives from the computer and capturing to an internal drive will solve the conflict problem.
    x

  • View video from webcam while transmitting

    Hi everyone, when I try to use AVTransmit3.java and Clone.java (example from sun) to see video from webcam while transmitting, an error occur:
    {color:#ff0000}+java.lang.NullPointerException+
    at com.sun.media.codec.video.colorspace.RGBConverter.process(RGBConverter.java:352)
    at com.sun.media.BasicFilterModule.process(BasicFilterModule.java:322)
    at com.sun.media.BasicModule.connectorPushed(BasicModule.java:69)
    at com.sun.media.BasicOutputConnector.writeReport(BasicOutputConnector.java:120)
    at com.sun.media.SourceThread.process(BasicSourceModule.java:655)
    at com.sun.media.util.LoopThread.run(LoopThread.java:135){color}
    So I'm only able to see in local my captured video, but cannot transmit.
    I try to debug JMStudio to find how to do this(monitoring transmitted video), but I'm not able to debug it.
    In method private String createProcessor() of AVTransmit3.java I added
    //----------------------------------------------------Start
                clone = Manager.createCloneableDataSource(ds);
                if (clone == null) {
                    System.err.println("Cannot clone the given DataSource");
                    System.exit(0);
                Clone cloneV = new Clone();
                if (!cloneV.open(clone))
                    System.exit(0);             
    //----------------------------------------------------End       
         return null;
        }This is the clone.java from sun
    /* Clone.java
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    *import java.awt.*;
    import javax.media.*;
    import javax.media.protocol.DataSource;
    public class Clone extends Frame implements ControllerListener {
        Player p;
        Object waitSync = new Object();
        boolean stateTransitionOK = true;
         * Given a DataSource, create a player and use that player
         * as a player to playback the media.
        public boolean open(DataSource ds) {
         System.err.println("create player for: " + ds.getContentType());
         try {
             p = Manager.createPlayer(ds);
         } catch (Exception e) {
             System.err.println("Failed to create a player from the given DataSource: " + e);
             return false;
         p.addControllerListener(this);
         // Realize the player.
         p.prefetch();
         if (!waitForState(p.Prefetched)) {
             System.err.println("Failed to realize the player.");
             return false;
         // Display the visual & control component if there's one.
         setLayout(new BorderLayout());
    //     Component cc;
         Component vc;
         if ((vc = p.getVisualComponent()) != null) {
                vc.setSize(176, 144);
             add("Center", vc);
    //     if ((cc = p.getControlPanelComponent()) != null) {
    //         add("South", cc);
         // Start the player.
         p.start();
            this.setSize(176, 144);
         setVisible(true);
         return true;
        public void addNotify() {
         super.addNotify();
         pack();
         * Block until the player has transitioned to the given state.
         * Return false if the transition failed.
        boolean waitForState(int state) {
         synchronized (waitSync) {
             try {
              while (p.getState() < state && stateTransitionOK)
                  waitSync.wait();
             } catch (Exception e) {}
         return stateTransitionOK;
         * Controller Listener.
        public void controllerUpdate(ControllerEvent evt) {
         if (evt instanceof ConfigureCompleteEvent ||
             evt instanceof RealizeCompleteEvent ||
             evt instanceof PrefetchCompleteEvent) {
             synchronized (waitSync) {
              stateTransitionOK = true;
              waitSync.notifyAll();
         } else if (evt instanceof ResourceUnavailableEvent) {
             synchronized (waitSync) {
              stateTransitionOK = false;
              waitSync.notifyAll();
         } else if (evt instanceof EndOfMediaEvent) {
             p.close();
             //System.exit(0);
         } else if (evt instanceof SizeChangeEvent) {
    }Please can you tell me what is wrong?
    thank you in advance

    I post all the class I use in this project.
    Copy and create your own project (SERVER side)
    Then on other pc (CLIENT side) run JMStudio and open RTP transmission: you will receive data but on server you will have a black window.
    I've modified only AVtransmit3.java -> look at Main() and modify dest-ip and port.
    JFrameMain is a class with a button to close the application.
    * @(#)AVTransmit3.java     1.2 01/03/13
    * Copyright (c) 1999-2001 Sun Microsystems, Inc. All Rights Reserved.
    * Sun grants you ("Licensee") a non-exclusive, royalty free, license to use,
    * modify and redistribute this software in source and binary code form,
    * provided that i) this copyright notice and license appear on all copies of
    * the software; and ii) Licensee does not utilize the software in a manner
    * which is disparaging to Sun.
    * This software is provided "AS IS," without a warranty of any kind. ALL
    * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY
    * IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
    * NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE
    * LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
    * OR DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS
    * LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT,
    * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
    * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF
    * OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE
    * POSSIBILITY OF SUCH DAMAGES.
    * This software is not designed or intended for use in on-line control of
    * aircraft, air traffic, aircraft navigation or aircraft communications; or in
    * the design, construction, operation or maintenance of any nuclear
    * facility. Licensee represents and warrants that it will not use or
    * redistribute the Software for such purposes.
    import java.awt.*;
    import java.io.*;
    import java.net.InetAddress;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import javax.media.*;
    import javax.media.protocol.*;
    import javax.media.protocol.DataSource;
    import javax.media.format.*;
    import javax.media.control.TrackControl;
    import javax.media.control.QualityControl;
    import javax.media.rtp.*;
    import javax.media.rtp.rtcp.*;
    import com.sun.media.rtp.*;
    import java.util.Vector;
    public class AVTransmit3 {
        // Input MediaLocator
        // Can be a file or http or capture source
        private MediaLocator locator;
        private String ipAddress;
        private int portBase;
        private Processor processor = null;
        private RTPManager rtpMgrs[];
        private DataSource dataOutput = null;
        private static boolean v = false;  
         private static DataSource ds = null;
            private static DataSource clone;
         private static DataSource cloned;       
        private String VFORMAT = "h263/rtp";   
        private String AFORMAT = "mpegaudio/rtp";   
        public AVTransmit3(MediaLocator locator,
                    String ipAddress,
                    String pb,
                    Format format) {
         this.locator = locator;
         this.ipAddress = ipAddress;
         Integer integer = Integer.valueOf(pb);
         if (integer != null)
             this.portBase = integer.intValue();
         * Starts the transmission. Returns null if transmission started ok.
         * Otherwise it returns a string with the reason why the setup failed.
        public synchronized String start() {
         String result;
         // Create a processor for the specified media locator
         // and program it to output JPEG/RTP
         result = createProcessor();
         if (result != null)
             return result;
         // Create an RTP session to transmit the output of the
         // processor to the specified IP address and port no.
         result = createTransmitter();
         if (result != null) {
             processor.close();
             processor = null;
             return result;
         // Start the transmission
         processor.start();
         return null;
         * Stops the transmission if already started
        public void stop() {
         synchronized (this) {
             if (processor != null) {
              processor.stop();
              processor.close();
              processor = null;
              for (int i = 0; i < rtpMgrs.length; i++) {
                  rtpMgrs.removeTargets( "Session ended.");
              rtpMgrs[i].dispose();
    private String createProcessor() {
         if (locator == null)
         return "Locator is null";
         try {
         ds = javax.media.Manager.createDataSource(locator);
         } catch (Exception e) {
         return "Couldn't create DataSource";
         // Try to create a processor to handle the input media locator
         try {
         processor = javax.media.Manager.createProcessor(ds);
         } catch (NoProcessorException npe) {
         return "Couldn't create processor";
         } catch (IOException ioe) {
         return "IOException creating processor";
         // Wait for it to configure
         boolean result = waitForState(processor, Processor.Configured);
         if (result == false)
         return "Couldn't configure processor";
         // Get the tracks from the processor
         TrackControl [] tracks = processor.getTrackControls();
         // Do we have atleast one track?
         if (tracks == null || tracks.length < 1)
         return "Couldn't find tracks in processor";
         // Set the output content descriptor to RAW_RTP
         // This will limit the supported formats reported from
         // Track.getSupportedFormats to only valid RTP formats.
         ContentDescriptor cd = new ContentDescriptor(ContentDescriptor.RAW_RTP);
         processor.setContentDescriptor(cd);
         Format supported[];
         Format chosen = null;
         boolean atLeastOneTrack = false;
         // Program the tracks.
         for (int i = 0; i < tracks.length; i++)
    AudioFormat aFormat = new AudioFormat(AFORMAT, 22050.00, 16, 1);
         Format format = tracks[i].getFormat();
         if (tracks[i].isEnabled())
              supported = tracks[i].getSupportedFormats();
              // We've set the output content to the RAW_RTP.
              // So all the supported formats should work with RTP.
              // We'll just pick the first one.
              if (supported.length > 0)
    for(int k = 0; k < supported.length; k++)
    if ((supported[k] instanceof VideoFormat) &&
    (supported[k].getEncoding().equalsIgnoreCase(VFORMAT)))
    // For video formats, we should double check the
    // sizes since not all formats work in all sizes.
    // Choose the H263rtp
    chosen = checkForVideoSizes(tracks[i].getFormat(), supported[k]);
    v = true;
    break;
    else if ((supported[k] instanceof AudioFormat) &&
    (supported[k].matches(aFormat)))
    // For audio formats
    // Choose the H263rtp
    // chosen = supported[3];
    chosen = supported[k];
    v = false;
    break;
              tracks[i].setFormat(chosen);
              System.err.println("Track " + i + " is set to transmit as:");
              System.err.println(" " + chosen);
              atLeastOneTrack = true;
              } else
              tracks[i].setEnabled(false);
         } else
              tracks[i].setEnabled(false);
         if (!atLeastOneTrack)
         return "Couldn't set any of the tracks to a valid RTP format";
         // Realize the processor. This will internally create a flow
         // graph and attempt to create an output datasource for JPEG/RTP
         // audio frames.
         result = waitForState(processor, Controller.Realized);
         if (result == false)
         return "Couldn't realize processor";
         // Set the JPEG quality to .5.
         setJPEGQuality(processor, 0.5f);
         // Get the output data source of the processor
         dataOutput = processor.getDataOutput();
         return null;
    * Use the RTPManager API to create sessions for each media
    * track of the processor.
    private String createTransmitter() {
         // Cheated. Should have checked the type.
         PushBufferDataSource pbds = (PushBufferDataSource)dataOutput;
         PushBufferStream pbss[] = pbds.getStreams();
         rtpMgrs = new RTPManager[pbss.length];
         SendStream sendStream;
         int port;
         SourceDescription srcDesList[];
         for (int i = 0; i < pbss.length; i++) {
         try {
              rtpMgrs[i] = RTPManager.newInstance();     
              port = portBase + 2*i;
              // Initialize the RTPManager with the RTPSocketAdapter
              rtpMgrs[i].initialize(new RTPSocketAdapter(
                             InetAddress.getByName(ipAddress),
                             port));
              System.err.println( "Created RTP session: " + ipAddress + " " + port);
              sendStream = rtpMgrs[i].createSendStream(dataOutput, i);          
              sendStream.start();
         } catch (Exception e) {
              return e.getMessage();
         return null;
    * For JPEG and H263, we know that they only work for particular
    * sizes. So we'll perform extra checking here to make sure they
    * are of the right sizes.
    Format checkForVideoSizes(Format original, Format supported) {
         int width, height;
         Dimension size = ((VideoFormat)original).getSize();
         Format jpegFmt = new Format(VideoFormat.JPEG_RTP);
         Format h263Fmt = new Format(VideoFormat.H263_RTP);
         if (supported.matches(jpegFmt)) {
         // For JPEG, make sure width and height are divisible by 8.
         width = (size.width % 8 == 0 ? size.width :
                        (int)(size.width / 8) * 8);
         height = (size.height % 8 == 0 ? size.height :
                        (int)(size.height / 8) * 8);
         } else if (supported.matches(h263Fmt)) {
         // For H.263, we only support some specific sizes.
         if (size.width < 128) {
              width = 128;
              height = 96;
         } else if (size.width < 176) {
              width = 176;
              height = 144;
         } else {
    ///mod          width = 352;
    width = 176;
    ///mod          height = 288;
    height = 144;
         } else {
         // We don't know this particular format. We'll just
         // leave it alone then.
         return supported;
         return (new VideoFormat(null,
                        new Dimension(width, height),
                        Format.NOT_SPECIFIED,
                        null,
                        Format.NOT_SPECIFIED)).intersects(supported);
    * Setting the encoding quality to the specified value on the JPEG encoder.
    * 0.5 is a good default.
    void setJPEGQuality(Player p, float val) {
         Control cs[] = p.getControls();
         QualityControl qc = null;
         VideoFormat jpegFmt = new VideoFormat(VideoFormat.JPEG);
         // Loop through the controls to find the Quality control for
         // the JPEG encoder.
         for (int i = 0; i < cs.length; i++) {
         if (cs[i] instanceof QualityControl &&
              cs[i] instanceof Owned) {
              Object owner = ((Owned)cs[i]).getOwner();
              // Check to see if the owner is a Codec.
              // Then check for the output format.
              if (owner instanceof Codec) {
              Format fmts[] = ((Codec)owner).getSupportedOutputFormats(null);
              for (int j = 0; j < fmts.length; j++) {
                   if (fmts[j].matches(jpegFmt)) {
                   qc = (QualityControl)cs[i];
                   qc.setQuality(val);
                   System.err.println("- Setting quality to " +
                             val + " on " + qc);
                   break;
              if (qc != null)
              break;
    * Convenience methods to handle processor's state changes.
    private Integer stateLock = new Integer(0);
    private boolean failed = false;
    Integer getStateLock() {
         return stateLock;
    void setFailed() {
         failed = true;
    private synchronized boolean waitForState(Processor p, int state) {
         p.addControllerListener(new StateListener());
         failed = false;
         // Call the required method on the processor
         if (state == Processor.Configured) {
         p.configure();
         } else if (state == Processor.Realized) {
         p.realize();
         // Wait until we get an event that confirms the
         // success of the method, or a failure event.
         // See StateListener inner class
         while (p.getState() < state && !failed) {
         synchronized (getStateLock()) {
              try {
              getStateLock().wait();
              } catch (InterruptedException ie) {
              return false;
         if (failed)
         return false;
         else
         return true;
    * Inner Classes
    class StateListener implements ControllerListener {
         public void controllerUpdate(ControllerEvent ce) {
         // If there was an error during configure or
         // realize, the processor will be closed
         if (ce instanceof ControllerClosedEvent)
              setFailed();
         // All controller events, send a notification
         // to the waiting thread in waitForState method.
         if (ce instanceof ControllerEvent) {
              synchronized (getStateLock()) {
              getStateLock().notifyAll();
    * Sample Usage for AVTransmit3 class
    public static void main(String [] args) {
         Format fmt = null;
         int i = 0;
    String title = "Video";
    AVTransmit3 at = new AVTransmit3(new MediaLocator("vfw://0"),
                             "192.168.0.5", "44350", fmt);
    //View GUI
    JFrameMain jfm = new JFrameMain(at);
    jfm.setVisible(true);
    jfm.setTitle(title);
    if(title.equals("Video"))
    jfm.setLocation(jfm.getX()+180, jfm.getY());
         // Start the transmission
         String result = at.start();
         // result will be non-null if there was an error. The return
         // value is a String describing the possible error. Print it.
         if (result != null) {
         System.err.println("Error : " + result);
         System.exit(0);
         System.err.println("Start transmission...");
    try {
    Thread.sleep(2000);
    } catch (InterruptedException ex) {
    Logger.getLogger(AVTransmit3.class.getName()).log(Level.SEVERE, null, ex);
    if(v)
    //----------------------------------------------------Start
    /* Get a clonable version of our datasource */
    clone = Manager.createCloneableDataSource(ds);
    /* Make sure we got a clonable version before we try to clone it */
    if (clone == null) {
    System.err.println("Cannot get a clonable version of the datasource");
    System.exit(0);
    /* Create the clone of our original datasource */
    DataSource dsClone = ((SourceCloneable)clone).createClone();
    /* Make our DS variable a clone too */
    ds = ((SourceCloneable)clone).createClone();
    /* Make sure the clone happened successfully */
    if (dsClone == null) {
    System.err.println("Could not clone our datasource");
    System.exit(0);
    /* Make sure the clone happened successfully */
    if (ds == null) {
    System.err.println("Could not clone our datasource");
    System.exit(0);
    /* Create a new Clone class */
    Clone cloneV = new Clone();
    /* Open our clone class with our datasource clone */
    if (! cloneV.open(dsClone))
    System.exit(0);
    //----------------------------------------------------End
    /* Clone.java
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    import java.awt.*;
    import javax.media.*;
    import javax.media.protocol.DataSource;
    public class Clone extends Frame implements ControllerListener {
    Player p;
    Object waitSync = new Object();
    boolean stateTransitionOK = true;
    * Given a DataSource, create a player and use that player
    * as a player to playback the media.
    public boolean open(DataSource ds) {
         System.err.println("create player for: " + ds.getContentType());
         try {
         p = Manager.createPlayer(ds);
         } catch (Exception e) {
         System.err.println("Failed to create a player from the given DataSource: " + e);
         return false;
         p.addControllerListener(this);
         // Realize the player.
         p.prefetch();
         if (!waitForState(p.Prefetched)) {
         System.err.println("Failed to realize the player.");
         return false;
         // Display the visual & control component if there's one.
         setLayout(new BorderLayout());
    //     Component cc;
         Component vc;
         if ((vc = p.getVisualComponent()) != null) {
    vc.setSize(176, 144);
         add("Center", vc);
    //     if ((cc = p.getControlPanelComponent()) != null) {
    //     add("South", cc);
         // Start the player.
         p.start();
    this.setSize(176, 144);
         setVisible(true);
         return true;
    public void addNotify() {
         super.addNotify();
         pack();
    * Block until the player has transitioned to the given state.
    * Return false if the transition failed.
    boolean waitForState(int state) {
         synchronized (waitSync) {
         try {
              while (p.getState() < state && stateTransitionOK)
              waitSync.wait();
         } catch (Exception e) {}
         return stateTransitionOK;
    * Controller Listener.
    public void controllerUpdate(ControllerEvent evt) {
         if (evt instanceof ConfigureCompleteEvent ||
         evt instanceof RealizeCompleteEvent ||
         evt instanceof PrefetchCompleteEvent) {
         synchronized (waitSync) {
              stateTransitionOK = true;
              waitSync.notifyAll();
         } else if (evt instanceof ResourceUnavailableEvent) {
         synchronized (waitSync) {
              stateTransitionOK = false;
              waitSync.notifyAll();
         } else if (evt instanceof EndOfMediaEvent) {
         p.close();
         //System.exit(0);
         } else if (evt instanceof SizeChangeEvent) {
    * JFrameMain.java
    * Created on 23 maggio 2008, 17.28
    * @author Giovanni
    public class JFrameMain extends javax.swing.JFrame {
    /** Creates new form JFrameMain */
    public JFrameMain(AVTransmit3 avt) {
    avTransmit = avt;
    initComponents();
    /** This method is called from within the constructor to
    * initialize the form.
    * WARNING: Do NOT modify this code. The content of this method is
    * always regenerated by the Form Editor.
    // <editor-fold defaultstate="collapsed" desc="Generated Code">
    private void initComponents() {
    jButtonFine = new javax.swing.JButton();
    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    setResizable(false);
    jButtonFine.setText("Fine Trasmissione");
    jButtonFine.addMouseListener(new java.awt.event.MouseAdapter() {
    public void mousePressed(java.awt.event.MouseEvent evt) {
    jButtonFineMousePressed(evt);
    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
    layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(layout.createSequentialGroup()
    .addContainerGap()
    .addComponent(jButtonFine, javax.swing.GroupLayout.DEFAULT_SIZE, 124, Short.MAX_VALUE)
    .addContainerGap())
    layout.setVerticalGroup(
    layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(layout.createSequentialGroup()
    .addContainerGap()
    .addComponent(jButtonFine, javax.swing.GroupLayout.DEFAULT_SIZE, 32, Short.MAX_VALUE)
    .addContainerGap())
    setBounds(600, 110, 160, 90);
    }// </editor-fold>
    private void jButtonFineMousePressed(java.awt.event.MouseEvent evt) {                                        
    avTransmit.stop();
    System.exit(0);
    * @param args the command line arguments
    public static void main(String args[]) {
    java.awt.EventQueue.invokeLater(new Runnable() {
    public void run() {
    // new JFrameMain().setVisible(true);
    // Variables declaration - do not modify
    private javax.swing.JButton jButtonFine;
    // End of variables declaration
    private AVTransmit3 avTransmit = null;
    * @(#)RTPSocketAdapter.java     1.2 01/03/13
    * Copyright (c) 1999-2001 Sun Microsystems, Inc. All Rights Reserved.
    * Sun grants you ("Licensee") a non-exclusive, royalty free, license to use,
    * modify and redistribute this software in source and binary code form,
    * provided that i) this copyright notice and license appear on all copies of
    * the software; and ii) Licensee does not utilize the software in a manner
    * which is disparaging to Sun.
    * This software is provided "AS IS," without a warranty of any kind. ALL
    * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY
    * IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
    * NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE
    * LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
    * OR DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS
    * LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT,
    * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
    * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF
    * OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE
    * POSSIBILITY OF SUCH DAMAGES.
    * This software is not designed or intended for use in on-line control of
    * aircraft, air traffic, aircraft navigation or aircraft communications; or in
    * the design, construction, operation or maintenance of any nuclear
    * facility. Licensee represents and warrants that it will not use or
    * redistribute the Software for such purposes.
    import java.io.IOException;
    import java.net.InetAddress;
    import java.net.DatagramSocket;
    import java.net.MulticastSocket;
    import java.net.DatagramPacket;
    import java.net.SocketException;
    import javax.media.protocol.DataSource;
    import javax.media.protocol.PushSourceStream;
    import javax.media.protocol.ContentDescriptor;
    import javax.media.protocol.SourceTransferHandler;
    import javax.media.rtp.RTPConnector;
    import javax.media.rtp.OutputDataStream;
    * An implementation of RTPConnector based on UDP sockets.
    public class RTPSocketAdapter implements RTPConnector {
    DatagramSocket dataSock;
    DatagramSocket ctrlSock;
    InetAddress addr;
    int port;
    SockInputStream dataInStrm = null, ctrlInStrm = null;
    SockOutputStream dataOutStrm = null, ctrlOutStrm = null;
    public RTPSocketAdapter(InetAddress addr, int port) throws IOException {
         this(addr, port, 1);
    public RTPSocketAdapter(InetAddress addr, int port, int ttl) throws IOException {
         try {
         if (addr.isMulticastAddress()) {
              dataSock = new MulticastSocket(port);
              ctrlSock = new MulticastSocket(port+1);
              ((MulticastSocket)dataSock).joinGroup(addr);
              ((MulticastSocket)dataSock).setTimeToLive(ttl);
              ((MulticastSocket)ctrlSock).joinGroup(addr);
              ((MulticastSocket)ctrlSock).setTimeToLive(ttl);
         } else {
              dataSock = new DatagramSocket(port, InetAddress.getLocalHost());
              ctrlSock = new DatagramSocket(port+1, InetAddress.getLocalHost());
         } catch (SocketException e) {
         throw new IOException(e.getMessage());
         this.addr = addr;
         this.port = port;
    * Returns an input stream to receive the RTP data.
    public PushSourceStream getDataInputStream() throws IOException {
         if (dataInStrm == null) {
         dataInStrm = new SockInputStream(dataSock, addr, port);
         dataInStrm.start();
         return dataInStrm;
    * Returns an output stream to send the RTP data.
    public OutputDataStream getDataOutputStream() throws IOException {
         if (dataOutStrm == null)
         dataOutStrm = new SockOutputStream(dataSock, addr, port);
         return dataOutStrm;
    * Returns an input stream to receive the RTCP data.
    public PushSourceStream getControlInputStream() throws IOException {
         if (ctrlInStrm == null) {
         ctrlInStrm = new SockInputStream(ctrlSock, addr, port+1);
         ctrlInStrm.start();
         return ctrlInStrm;
    * Returns an output stream to send the RTCP data.
    public OutputDataStream getControlOutputStream() throws IOException {
         if (ctrlOutStrm == null)
         ctrlOutStrm = new SockOutputStream(ctrlSock, addr, port+1);
         return ctrlOutStrm;
    * Close all the RTP, RTCP streams.
    public void close() {
         if (dataInStrm != null)
         dataInStrm.kill();
         if (ctrlInStrm != null)
         ctrlInStrm.kill();
         dataSock.close();
         ctrlSock.close();
    * Set the receive buffer size of the RTP data channel.
    * This is only a hint to the implementation. The actual implementation
    * may not be able to do anything to this.
    public void setReceiveBufferSize( int size) throws IOException {
         dataSock.setReceiveBufferSize(size);
    * Get the receive buffer size set on the RTP data channel.
    * Return -1 if the receive buffer size is not applicable for
    * the implementation.
    public int getReceiveBufferSize() {
         try {
         return dataSock.getReceiveBufferSize();
         } catch (Exception e) {
         return -1;
    * Set the send buffer size of the RTP data channel.
    * This is only a hint to the implementation. The actual implementation
    * may not be able to do anything to this.
    public void setSendBufferSize( int size) throws IOException {
         dataSock.setSendBufferSize(size);
    * Get the send buffer size set on the RTP data channel.
    * Return -1 if the send buffer size is not applicable for
    * the implementation.
    public int getSendBufferSize() {
         try {
         return dataSock.getSendBufferSize();
         } catch (Exception e) {
         return -1;
    * Return the RTCP bandwidth fraction. This value is used to
    * initialize the RTPManager. Check RTPManager for more detauls.
    * Return -1 to use the default values.
    public double getRTCPBandwidthFraction() {
         return -1;
    * Return the RTCP sender bandwidth fraction. This value is used to
    * initialize the RTPManager. Check RTPManager for more detauls.
    * Return -1 to use the default values.
    public double getRTCPSenderBandwidthFraction() {
         return -1;
    * An inner class to implement an OutputDataStream based on UDP sockets.
    class SockOutputStream implements OutputDataStream {
         DatagramSocket sock;
         InetAddress addr;
         int port;
         public SockOutputStream(DatagramSocket sock, InetAddress addr, int port) {
         this.sock = sock;
         this.addr = addr;
         this.port = port;
         public int write(byte data[], int offset, int len) {
         try {
              sock.send(new DatagramPacket(data, offset, len, addr, port));
         } catch (Exception e) {
              return -1;
         return len;
    * An inner class to implement an PushSourceStream based on UDP sockets.
    class SockInputStream extends Thread implements PushSourceStream {
         DatagramSocket sock;
         InetAddress addr;
         int port;
         boolean done = false;
         boolean dataRead = false;
         SourceTransferHandler sth = null;
         public SockInputStream(DatagramSocket sock, InetAddress addr, int port) {
         this.sock = sock;
         this.addr = addr;
         this.port = port;
         public int read(byte buffer[], int offset, int length) {
         DatagramPacket p = new DatagramPacket(buffer, offset, length, addr, port);
         try {
              sock.receive(p);
         } catch (IOException e) {
              return -1;
         synchronized (this) {
              dataRead = true;
              notify();
         return p.getLength();
         public synchronized void start() {
         super.start();
         if (sth != null) {
              dataRead = true;
              notify();
         public synchronized void kill() {
         done = true;
         notify();
         public int getMinimumTransferSize() {
         return 2 * 1024;     // twice the MTU size, just to be safe.
         public synchronized void setTransferHandler(SourceTransferHandler sth) {
         this.sth = sth;
         dataRead = true;
         notify();
         // Not applicable.
         public ContentDescriptor getContentDescriptor() {
         return null;
         // Not applicable.
         public long getContentLength() {
         return LENGTH_UNKNOWN;
         // Not applicable.
         public boolean endOfStream() {
         return false;
         // Not applicable.
         public Object[] getControls() {
         return new Object[0];
         // Not applicable.
         public Object getControl(String type) {
         return null;
         * Loop and notify the transfer handler of new data.
         public void run() {
         while (!done) {
              synchronized (this) {
              while (!dataRead && !done) {
                   try {
                   wait();
                   } catch (InterruptedException e) { }
              dataRead = false;
              if (sth != null && !done) {
              sth.transferData(this);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          

  • Unable to capture data from drop down list in custom added field in migo tcode at item level

    Hi guys,
    need bit help in resolving query related to custom added field in Tcode migo.
    i have added a field in migo at item level ,in this i have used drop down list
    to get data but unable to capture data from drop down list.gown through
    many blogs in scn but unable to resolve.
    Please help me out in this.
    Thanks,
    Umakant.

    Hi,
    U can use following code to fill the list box
    write this code in PBO
    In layout editor please select listbox in dropdown attribute of input field and put some fctcode attribute
    TYPE-POOLS vrm.
      DATA values TYPE vrm_values WITH HEADER LINE.
      TABLES: <ur custom Database table>.
      clear values, values[].
      SELECT * FROM <ur custom Database table>.
        values-text = <TABLE FIELD TO DISPLAY IN DROPDOWN> .
        values-key = <TABLE KEY FIELD TO DISPLAY IN DROPDOWN>.
        APPEND values.
      ENDSELECT.
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          id              = '<SCREEN INPUT FIELD NAME>'
          values          = values[]
        EXCEPTIONS
          id_illegal_name = 1
          OTHERS          = 2.
    Also please define the following before accessing the listbox value
    data: <listbox input field name> type <table field name>,
            <inputfield name where text to display> type string  in top include
    In PAI, select the text from the table into <inputfield name where text to display>  depending on value selected which will be called when enter key is pressed or any vale is selected

  • Help! Unable to capture video.

    I can still take images, but when I click to record I get the following message:Unable to capture video. Please check that you have sufficient space on your hard dri've and the following are setup correctlyVideo CompressorAudio CompressorI certainly have enough hard drive space...44G available. I am a first time user so I need detailed instructions on how to solve this problem. Thanks.

    Model is Creative Live!Cam Voice...all updates performed.
    Thanks.

  • Error- "Unable to capture video..."

    What is the solution to allow video capture in the preferred WMV mode. I know AVI mode works but compression sucks. Plus, my laptop was always able to capture vid in WMV until recently.
    Now i get this error!!!!!!!!!!! Pls advice on this error:
    "Unable to capture video. Pls check hard disk space and the following are set correctly: video/ audio compressor"
    I know I am not the only one with this issue. yes, already tried uninstalling/reinstalling drivers and software fron the Creative website.
    THanks a lot for solutions!

    Addl info
    1) When using Skype, Camera and Mic work fine.
    2) When I get error - the camera view on my screen balcks out

  • Unable to delete videos from my iad

    I am unable to delete videos from my ipad.  When I go to Settings - Usage - Storage; the video section will show up as no data in it even if it has multiple videos downloaded from itunes in it.  I am using iOS 7.0.4 on a new iPad mini Retina 64GB.  I am seeing the same problem on my iPhone 5S. 

    I was puzzled by this since ios7 I waited for  7.1 and thought it was fixed as it seems to go away. Now its back in 8.0 and 8.0.2.
    It seems somewhat related to incomplete accounting of downloaded video and music too on the device and applying to storage left on device as these two icons are not showing up under usage in settings, even with show all selected.
    Here is what I did:
    Go to "Videos" under settings, turn off "show all videos", this will show only videos that presumably are on your device.
    Go to Videos" app and you should see video that is presumably downloaded to device, select the cloud icon and as unintuitive as it seems, download the video as if it is not already on the device.
    When one or all of your videos finish, go to "Settings", "General", "Usage", you will see an increase in available storage.
    While there, select "Manage Storage" and "Videos" should show up in usage and an amount of MB or GB.
    Select "Videos" under storage and your videos will present. Select "Edit" in upper right corner.
    Select red "minus symbol", delete.
    As you do this you will see more and more of your devices storage coming back in available storage.
    This is similar to or is a memory leak issue that needs to be addressed. It apparently hasn't yet.
    The same process works with Music. I haven't seen this as an issue in dealing with apps.
    Mitchell

Maybe you are looking for

  • File Dialog's using Remote Panels (via web server)

    I am aware that the web server remote panel access will not allow us to open a file dialog box on a remote computer.  I have read people comment that you should create your own file dialog box, using LabVIEW to use instead of the file dialog box. Has

  • CE 7.2 Trial Installation

    Hi, I have installed all features related to the CE 7.2 Trial version without errors. After completion of the software updates, I got a message to restart the IDE. Normally, perspectives such as for example "Process Development" would become accessib

  • FRM-40735:KEY-COMMIT  ORA-02291 trigger raised unhandled exception

    FRM-40735:KEY-COMMIT ORA-02291 trigger raised unhandled exception. when i tried to save records. I am using multi record block , 12 records will display at a time, i am trying to save 1st and 5th record which i changed. calling a procedure in key-com

  • Editing xml file inside a Jar

    Hello , After creating my desktop application i created a Jar for it, but when i tried to change my program settings through the jar(Which is set in an xml file), i found that the changes did not happen. After some search i found that i can only edit

  • Replacing the HDD and installing leopard (PLEASE HELP)!!!

    hi there, i currently have a macbook that has just gone out of warranty. i bought a new HDD from WD, installed tiger (using the original discs that come with the mac) and then installed leopard. it seemed to be working fine (apart from a few keyboard