Web Cam applet is not working in great consistency

Hi... My video capturing applet is not working very well.
The image stream is displayed on the web page in JPEG format with 0.5 quality. However, it crashes after a while and the it does not release the vfw resource.
I have to restart my machine in order to execute it again.
Can anyone please help?
Thanks.
Carter

Ok. Thanks.
Sender Applet
import javax.swing.*;
import java.io.*;
import java.util.*;
import java.awt.*;
import java.awt.event.*;
/*<applet code="myGUIApplet.class" width="300" height="300"></applet>*/
public class myGUIApplet extends JApplet implements ActionListener
     private JPanel bottom=new JPanel();
     private JPanel centVisual=new JPanel();
     private JPanel connectionAddress=new JPanel();
     private JButton capture=new JButton("Start Capturing");
     private JButton stops=new JButton("Stop");
     private JMenuBar menubar=new JMenuBar();
     private JMenu file=new JMenu("file");     
     private JMenuItem fileItem1=new JMenuItem("Exit");
     private JLabel serverip=new JLabel("Server IP");
     private JTextField setIP=new JTextField();
     public static JTextField ServerInfo=new JTextField();
     private MyTransmitter mytrans;
     private String ip;
     public static final String DEFAULT_MULTICAST_IP="226.10.10.20";
     public static final String DEFAULT_PORT="80";
     public void init()
          //setSize(400,400);               
          setLayout(new BorderLayout());
          menubar.add(file);
          file.add(fileItem1);
          bottom.setLayout(new BorderLayout());
          bottom.setBackground(Color.black);
          bottom.add("West",capture);
          bottom.add("East",stops);
          connectionAddress.setLayout(new BorderLayout());
          connectionAddress.add("North",serverip);
          connectionAddress.add("South",setIP);
          ServerInfo.setEditable(false);
          connectionAddress.add("Center",ServerInfo);
          setIP.addActionListener(this);
          setIP.setText("");
          capture.setBackground(Color.lightGray);
          capture.addActionListener(this);
          stops.addActionListener(this);
          fileItem1.addActionListener(this);
          add("South",bottom);
          add("North",menubar);     
          add("Center",connectionAddress);          
     public void actionPerformed(ActionEvent ae){
          Object source=ae.getSource();
          if(source==capture){
          if(setIP.getText().equals(""))
                    ip=DEFAULT_MULTICAST_IP;
          else{
               ip=setIP.getText();
               if(mytrans!=null){
                    mytrans.stopTransmitter();
                    mytrans=null;                         
               System.out.println(" - Connecting to "+ip+" port: "+DEFAULT_PORT);
               ServerInfo.setText(" - Connecting to "+ip+" port: "+DEFAULT_PORT);
               mytrans=new MyTransmitter(ip,DEFAULT_PORT,ServerInfo);
               mytrans.start();               
          if(source==stops){
               if(mytrans!=null)
                    mytrans.stopTransmitter();
               System.exit(0);
          if(source==fileItem1){
               if(mytrans!=null)
                    mytrans.stopTransmitter();     
               System.exit(0);
     public void destroy(){
          if(mytrans!=null){
               mytrans.stopTransmitter();
import java.awt.*;
import javax.swing.*;
import java.io.*;
import java.util.*;
import java.net.InetAddress;
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 javax.media.rtp.*;
import java.io.InputStream;
import javax.media.rtp.RTPManager;
public class MyTransmitter extends Thread
     private MediaLocator videoLocator;
     private String ipAddress;
     private int basePort;
     private Integer stateLock=new Integer(0);
     private boolean failure;
     private Processor processor;
     private DataSource videoDataInput,videoDataOutput;
     private RTPManager rtpMgrs[];
     private VideoFormat JPEG_VIDEO=new VideoFormat(VideoFormat.JPEG_RTP);
     private SendStream sendStream;
     private SourceDescription descriptionList[];
     private JTextField infoField;
     public MyTransmitter(String ips,String ports,JTextField ServerInfo){
          infoField=ServerInfo;
          ipAddress=ips;
          Integer bPort=Integer.valueOf(ports);
          if(bPort!=null)
               basePort=bPort.intValue();
     public void run()
          initializeVideo();
          if(videoLocator!=null){
               createMyProcessor();
               createMyManager();
          // May be should put inside the if..else statements
          //createMyTransmitter();
     // Initailize the video
     public void initializeVideo()
          // Stre the devices in a vector
          VideoFormat format=new VideoFormat(VideoFormat.RGB);
          Vector deviceList=CaptureDeviceManager.getDeviceList(format);
          CaptureDeviceInfo deviceInfo=null;
          // If there is more than one device detected
          if(deviceList.size()>0){
               // Set the first device to device Info
               // GEt the media locator of the devie
               deviceInfo=(CaptureDeviceInfo)deviceList.elementAt(0);
               videoLocator=deviceInfo.getLocator();
          }else{
               System.out.println(" --X No device found...");
               infoField.setText(" --X No device found...");
     public void createMyProcessor()
          boolean result=false;
          DataSource ds=null;
          // Check if the media locator is null
          if(videoLocator==null){
               System.out.println(" --X No video locator..");
               infoField.setText(" --X No video locator...");
          System.out.println(" - Trying to create a Processor..");
          infoField.setText(" - Trying to create a Processor..");
          // Attempt to create DataSource from media locator
          try{
               ds=Manager.createDataSource(videoLocator);
          }catch(Exception ex){
               System.out.println(" --X Unable to create dataSource : "+ex.getMessage());
          System.out.println(" - Video data source is created..");
          infoField.setText(" - Video data source is created..");
          // Try to create Processor from DataSource
          try{
               processor=Manager.createProcessor(ds);
          }catch(NoProcessorException npe){
               System.out.println(" --X Unable to create Processor: "+npe.getMessage());
               infoField.setText(" --X Unable to create Processor: "+npe.getMessage());
          catch(IOException ioe){
               System.out.println(" --X IOException creating Processor..");
               infoField.setText(" --X IOException creating Processor..");
          // Wait for the processor to be configured
          result=waitForState(processor,Processor.Configured);
          if(result==false){
               System.out.println(" --X Could not configure processor..");
               infoField.setText(" --X Could not configure processor..");
          // Set the track controls for processor
          TrackControl []tracks=processor.getTrackControls();
          if(tracks==null || tracks.length<1){
               System.err.println(" --X No track is found..");
               infoField.setText(" --X No track is found..");
          // Set the content description of processor to RAW_RTP format
          // This will limit the supported formats to reported from
          // Track.getSupportedFormats() to valid RTP format
          ContentDescriptor cdes=new ContentDescriptor(ContentDescriptor.RAW_RTP);
          processor.setContentDescriptor(cdes);
          Format []supported;
          Format chosen=null;
          boolean atLeastOneTrack=false;
          for(int i=0;i<tracks.length;i++){
               Format format=tracks.getFormat();
               if(tracks[i].isEnabled()){
                    supported=tracks[i].getSupportedFormats();
                    // WE've set the output content to RAW_RTP.
                    // So, all the supporte formats should work with RAW_RTP.
                    // We will pick the first one.
                    if(supported.length>0){
                         if(supported[0] instanceof VideoFormat){                              
                              chosen=checkVideoSize(tracks[i].getFormat(),supported[0]);
                         }else
                              chosen=supported[0];
                         tracks[i].setFormat(chosen);
                         System.out.println(" Track "+i+" is transmitted in "+chosen+" format.. ");
                         infoField.setText(" Track "+i+" is transmitted in "+chosen+" format.. ");
                         atLeastOneTrack=true;
                    }else{
                         // If no format is suitable, track is disabled
                         tracks[i].setEnabled(false);
               }else
                    tracks[i].setEnabled(false);          
          if(!atLeastOneTrack)
               System.out.println("atLeastOneTrack: "+atLeastOneTrack);
               System.out.println(" --X Could Not find track to RTP format..");
               infoField.setText("atLeastOneTrack: "+atLeastOneTrack);
               infoField.setText(" --X Could Not find track to RTP format..");
          result=waitForState(processor,Controller.Realized);
          if(result==false){
               System.out.println(" --X Could NOT realize processor...");
               infoField.setText(" --X Could NOT realize processor...");
          // Set the JPEG Quality to value 0.5
          setJPEGQuality(processor,0.5f);
          // Set the output Data Source
          videoDataOutput=processor.getDataOutput();
          //Start the processor
          processor.start();          
     public void setJPEGQuality(Processor p,float values)
          Control []cs=p.getControls();
          QualityControl qc=null;
          VideoFormat JPEGFmt=new VideoFormat(VideoFormat.JPEG);
          // Loop through the ocntrols 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 if the owner is the Codec
                    // Check the format of output as well
                    if(owner instanceof Codec){
                         Format fmts[]=((Codec)owner).getSupportedOutputFormats(null);
                         // Loop through the supported format and set the quality to 0.5
                         for(int j=0;j<fmts.length;j++){
                              qc=(QualityControl)cs[i];
                              qc.setQuality(values);
                              System.out.println(" - Quality is set to "+values+" on "+qc);
                              infoField.setText(" - Quality is set to "+values+" on "+qc);
                              break;
               if(qc!=null)
                    break;
     public Format checkVideoSize(Format originalFormat,Format supported)
          int width,height;
          Dimension size=((VideoFormat)originalFormat).getSize();     
          Format jpegFormat=new Format(VideoFormat.JPEG_RTP);
          Format h263fmt=new Format(VideoFormat.H263_RTP);
          if(supported.matches(jpegFormat)){
               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)){
               if(size.width<128){
                    width=128;
                    height=96;
               }else if(size.width<176){
                    width=176;
                    height=144;
               }else{
                    width=352;
                    height=288;
          }else{
               // Unknown format, just return it.
               return supported;
          return (new VideoFormat(null,new Dimension(width,height),Format.NOT_SPECIFIED,null,Format.NOT_SPECIFIED)).intersects(supported);
     public boolean waitForState(Processor p,Integer status)
          p.addControllerListener(new StateListener());
          failure=false;
          if(status==Processor.Configured){
               p.configure();               
          }else if(status==Processor.Realized){
               p.realize();
          //Wait until an event that confirms the success of the method, or failure of an event
          while(p.getState()<status && !failure){
               synchronized(getStateLock()){
                    try{
                         // Wait
                         getStateLock().wait();
                    }catch(InterruptedException ie){
                         return false;
          if(failure)
               return false;
          else
               return true;
     public Integer getStateLock(){
          return stateLock;
     public void setFailure(){
          failure=true;
     public void createMyManager()
          SessionAddress destAddress;
          InetAddress ipAddr;
          int port;
          SourceDescription srcDesList[];
          PushBufferDataSource pbds=(PushBufferDataSource)videoDataOutput;
          PushBufferStream pbss[]=pbds.getStreams();          
          rtpMgrs=new RTPManager[pbss.length];          
          for(int a=0;a<pbss.length;a++){
          try{
               // RTP Managers or RTP Manager?????
               rtpMgrs[a]=RTPManager.newInstance();
               port=basePort;
               ipAddr=InetAddress.getByName(ipAddress);
               SessionAddress localAddr=new SessionAddress(InetAddress.getLocalHost(),port+20);
               destAddress=new SessionAddress(ipAddr,port,1);
               Integer myipprefix=Integer.valueOf(ipAddress.substring(0,3));
               if((myipprefix.intValue()>223) && (myipprefix.intValue()<240)){
                    rtpMgrs[a].initialize(destAddress);
               }else{
                    rtpMgrs[a].initialize(localAddr);
               rtpMgrs[a].addTarget(destAddress);
               System.out.println(" Created RTP session: "+ipAddress+" "+port+" to "+destAddress);
               infoField.setText(" Created RTP session: "+ipAddress+" "+port+" to "+destAddress);
               if(videoDataOutput!=null){
                    sendStream=rtpMgrs[a].createSendStream(videoDataOutput,0);
                    sendStream.start();
                    System.out.println(" RTP stream is started..");
                    infoField.setText(" RTP stream is started..");
          }catch(UnsupportedFormatException ex){
               System.out.println(" --X Unsupported Format : "+ex);
               infoField.setText(" --X Unsupported Format : "+ex);
          catch(IOException ioe){
               System.out.println(" --X IOException : "+ioe.getMessage());
               infoField.setText(" --X IOException : "+ioe.getMessage());
          catch(Exception ex){
               System.out.println(" --X Unable to create RTP Manager...");
               System.out.println(ex.getMessage());
               infoField.setText(" --X Unable to create RTP Manager..."+ex.getMessage());
     /*public void createMyTransmitter()
     try{
          if(videoDataOutput!=null){
               sendStream=rtpMgrs[i].createSendStream(videoDataOutput,0);
               sendStream.start();
     }catch(UnsupportedFormatException ex){
               System.out.println(" --X Unsupported Format : "+ex);
               infoField.setText(" --X Unsupported Format : "+ex);
     catch(IOException ioe){
               System.out.println(" --X IOException : "+ioe.getMessage());
               infoField.setText(" --X IOException : "+ioe.getMessage());
     public void stopTransmitter(){
          if(processor!=null){
               processor.stop();
               processor.close();
               processor=null;
               // Loop through RTP Managers and close all managers..
               // Dispose them for garbage collection
               for(int i=0;i<rtpMgrs.length;i++){
                    rtpmgrs[i].removeSendStream(this);
                    rtpMgrs[i].removeTargets("Session ended..");
                    rtpMgrs[i].dispose();
               //rtpMgrs.removeTargets("Session ended..");
               //rtpMgrs.dispose();
     * StateListener class to handle Controller events
     class StateListener implements ControllerListener{
          public void controllerUpdate(ControllerEvent ce){
               if(ce instanceof ControllerClosedEvent){
                    processor.close();
               /* Handle all controller events and notify all
               waiting thread in waitForState method */
               if(ce instanceof ControllerEvent){
                    synchronized(getStateLock()){
                         getStateLock().notifyAll();
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Client Applet
import javax.media.*;
import javax.media.protocol.*;
import javax.media.protocol.DataSource;
import javax.media.control.BufferControl;
import javax.media.control.*;
import javax.media.format.*;
import javax.media.rtp.*;
import javax.media.rtp.rtcp.*;
import javax.media.rtp.event.*;
import com.sun.media.rtp.RTPSessionMgr;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.util.*;
import java.io.*;
import java.net.*;
import java.net.URL;
import java.net.Socket;
/*<applet code="clientPlayerApplet.class" width="400" height="300">
     <param name=ServerIPS value="192.168.0.9">
     <param name=ServerPort value="80">
     <param name=TimeToLive value="1">
     <param name=archive value="clientPlayerApplet.jar">
</applet> */
public class clientPlayerApplet extends JApplet implements ControllerListener, ReceiveStreamListener,SessionListener
     String sessions[]=null;
     RTPManager rtpmgrs[]=null;     
     boolean dataReceived=false;
     Object myDataSync=new Object();
     private Player player;
     //private String serveripadd="226.10.10.20";
     //private int serverPort=2020;
     //private int timeToLive=1;
     private JPanel panel;
     private Vector currentParticipant;
     public void init()
          panel=new JPanel();
          setLayout(new BorderLayout());
          add("Center",panel);
          //String[] urls;
          /*urls[0]=getParameter("ServerIPS");
          urls[1]="/";
          urls[2]=getParameter("ServerPort");*/
          String []urls={new String(getParameter("ServerIPS")+"/"+getParameter("ServerPort")+"/"+getParameter("TimeToLive"))};
          sessions=urls;          
          initializePlayer();
     public void initializePlayer(){
          try{
               InetAddress ipAddr;
               SessionAddress localAddr=new SessionAddress();
               SessionAddress destAddr;
               rtpmgrs=new RTPManager[sessions.length];
               currentParticipant=new Vector();
               //rtpmgrs=new RTPManager();
               SessionLabel session=null;
               //Open RTP session
               for(int i=0;i<sessions.length;i++){
                    try{
                         session=new SessionLabel(sessions[i]);
                         //session=new SessionLabel(sessions);
                    }catch(IllegalArgumentException iae){
                         System.out.println(" --X Unable to parse the sesion address given");     
                    System.out.println(" - Open RTP session for "+session.port);
                    rtpmgrs[i]=(RTPManager) RTPManager.newInstance();               
                    rtpmgrs[i].addSessionListener(this);
                    rtpmgrs[i].addReceiveStreamListener(this);
                    ipAddr=InetAddress.getByName(session.addr);
                    if(ipAddr.isMulticastAddress()){
                         localAddr=new SessionAddress(ipAddr,session.port,session.ttl);
                         destAddr=new SessionAddress(ipAddr,session.port,session.ttl);
                    }else{
                         localAddr=new SessionAddress(InetAddress.getLocalHost(),session.port);     
                         destAddr=new SessionAddress(ipAddr,session.port);
                    rtpmgrs[i].initialize(localAddr);
                    BufferControl bc=(BufferControl)rtpmgrs[i].getControl("javax.media.control.BufferControl");
                    if(bc!=null)
                         bc.setBufferLength(600);
                    rtpmgrs[i].addTarget(destAddr);
          }catch(Exception ex){
               System.out.println(" --X Cannot create RTP Session "+ex.getMessage());
          long currentTime=System.currentTimeMillis();
          long waitingDuration=10000;
          try{
               synchronized(myDataSync){
                    while(!dataReceived && (System.currentTimeMillis() - currentTime < waitingDuration)){
                         if(!dataReceived){
                              myDataSync.wait(1000);
          }catch(Exception ex){
               System.out.println(" --X myDataSync interrupted...");
          if(!dataReceived){
               System.out.println(" No RTP Stream Data is received.." );               
     public void destroy()
          for(int i=0;i<currentParticipant.size();i++){
               //if(player!=null)
                    ((MyPlayList)currentParticipant.elementAt(i)).close();
          // Loop through the RTP Managers
          // -> Remove the stream listener
          // -> Remove the target address
          // -> Dispose the RTP Manager for garbage collection
          currentParticipant.removeAllElements();
          for(int i=0;i<rtpmgrs.length;i++){
               if(rtpmgrs[i]!=null){
                    rtpmgrs[i].removeReceiveStreamListener(this);
                    rtpmgrs[i].removeTargets(" Closing session..");
                    rtpmgrs[i].dispose();
                    rtpmgrs[i]=null;
     MyPlayList find(Player pl){
          for(int i=0;i<currentParticipant.size();i++){
               MyPlayList mpl=(MyPlayList)currentParticipant.elementAt(i);
               if(mpl.clientPlay==pl)
                    return mpl;
          return null;
     MyPlayList find(ReceiveStream rs){
          for(int i=0;i<currentParticipant.size();i++){
               MyPlayList mpl=(MyPlayList)currentParticipant.elementAt(i);
               if(mpl.stream==rs)
                    return mpl;
          return null;
     *     ReceiveStream Listener function                    *
     public synchronized void update(ReceiveStreamEvent rse)
          RTPManager mgr=(RTPManager)rse.getSource();
          ReceiveStream stream=rse.getReceiveStream();
          Participant participant=rse.getParticipant();
          if(rse instanceof RemotePayloadChangeEvent){
               System.out.println(" -- Received Payload Change Event..");
               System.out.println(" Sorry, no payload change is allowed.");               
          }else if(rse instanceof NewReceiveStreamEvent){
               try{
                    // Once the new stream is detected, create the datasource
                    stream=((NewReceiveStreamEvent)rse).getReceiveStream();
                    DataSource outputDS=stream.getDataSource();
                    // Get RTP Controller to find the format
                    RTPControl rtpctl=(RTPControl)outputDS.getControl("javax.media.rtp.RTPControl");
                    if(rtpctl!=null){
                         System.out.println(" -> Received new rtP stream: "+rtpctl.getFormat());
                    }else
                         System.out.println(" -> Received new RTP stream");
                    if(participant!=null){
                         System.out.println(" -> New stream received from: "+participant.getCNAME());
                    }else{
                         System.out.println(" -> New stream detected... ");
                    player=Manager.createPlayer(outputDS);
                    if(player==null)
                         return;
                    System.out.println(" - Player is created...");
                    player.addControllerListener(this);
                    player.realize();
                    // Helper class to identify the player and stream
                    MyPlayList mpl=new MyPlayList(player,stream);
                    // Add the helper class object to Vector
                    currentParticipant.addElement(mpl);
                    // Notify initializePlayer() that a new stream has arrived
                    synchronized(myDataSync){
                         dataReceived=true;
                         myDataSync.notifyAll();
               }catch(Exception ex){
                    System.out.println(" --X NewReceiveStream Exception: "+ex.getMessage());
                    return;
          }else if(rse instanceof ByeEvent){
               System.out.println(" - BYE packet received from "+participant.getCNAME());
               MyPlayList mpls=find(stream);
               if(player!=mpls){
                    mpls.close();
                    currentParticipant.removeElement(mpls);
               if(mgr!=null){
                    mgr.removeReceiveStreamListener(this);
                    mgr.removeTargets(" Closing session..");
                    mgr.dispose();
                    mgr=null;
          }else if(rse instanceof StreamMappedEvent){
               if(stream!=null && stream.getDataSource()!=null){
                    DataSource myds=stream.getDataSource();
                    RTPControl rtpctrl=(RTPControl)myds.getControl("javax.media.rtp.RTPControl");
                    System.out.println(" -> The previously unidentified stream ");
                    if(rtpctrl!=null)
                         System.out.println(" "+rtpctrl.getFormat());
                    System.out.println(" has been identified as sent by :"+participant.getCNAME());
     *           Session Listener
     public void update(SessionEvent sesevt)
          if(sesevt instanceof NewParticipantEvent){
               Participant part=((NewParticipantEvent)sesevt).getParticipant();
               System.out.println(" -> A new partcipant has joined :"+part.getCNAME());
     *     ControllerListener for Players          
     public synchronized void controllerUpdate(ControllerEvent ce)
          Player p=(Player)ce.getSource();
          if(p==null)
               return;
          if(ce instanceof RealizeCompleteEvent){
               MyPlayList mpls=find(p);
               if(mpls!=null){
                    p.start();
                    if(p.getVisualComponent()!=null){
                         panel.add(player.getVisualComponent());
                         panel.validate();
          if(ce instanceof ControllerErrorEvent){
               p.removeControllerListener(this);
               MyPlayList mpls=find(p);
               if(mpls!=null){
                    // Close the player
                    // Remove the player helper class object from the list
                    p.close();
                    currentParticipant.removeElement(mpls);
               System.out.println("Receiver internal error: "+ce);
     class SessionLabel{
          public String addr=null;
          public int port;
          public int ttl;
          SessionLabel(String session) throws IllegalArgumentException
               int off;
               String portStr=null;
               String ttlStr=null;
               if(session!=null && session.length() >0){
                    while(session.length()>1 && session.charAt(0)=='/')
                         session=session.substring(1);
                    off=session.indexOf('/');
                    if(off==-1){
                         if(!session.equals(""))
                              addr=session;
                    }else{
                         addr=session.substring(0,off);
                         session=session.substring(off+1);
                         off=session.indexOf('/');
                         if(off==-1){
                              if(!session.equals(""))
                                   portStr=session;
                         }else{
                              portStr=session.substring(0,off);
                              session=session.substring(off+1);
                              off=session.indexOf('/');
                              if(off==-1){
                                   if(!session.equals(""))
                                        ttlStr=session;
                              }else{
                                   ttlStr=session.substring(0,off);
               if(addr==null)
                    throw new IllegalArgumentException();
               if(portStr!=null)
                    try{
                         Integer ints=Integer.valueOf(portStr);
                         if(ints!=null)
                              port=ints.intValue();
                    }catch(Throwable t){
                         System.out.println(" --X PortStr Error..");
                         throw new IllegalArgumentException();
               }else
                    throw new IllegalArgumentException();
               if(ttlStr!=null){
               try{
                    Integer intsttl=Integer.valueOf(ttlStr);
                    if(intsttl!=null)
                         ttl=intsttl.intValue();
               }catch(Throwable t){
                         System.out.println(" --X PortStr Error..");
                         throw new IllegalArgumentException();
     class MyPlayList{
          Player clientPlay;
          ReceiveStream stream;
          MyPlayList(Player p,ReceiveStream rs){
               clientPlay=p;
               stream=rs;
          public void close()
               clientPlay.close();

Similar Messages

  • Why is photo booth giving a message saying no camera attached when it has a web cam? it did work okay when I bought the computer six months ago?

    Why is "photo booth" giving a message saying "no camera attached" when it has a web cam? it did work okay when I bought the computer six months ago?  

    I have already copied my photographs to the a library manager but when I tried to reuse iphoto and import the photos back into iphoto, it would not let me.
    You can't "copy" your photos to the "library manager", there is just no way to any such thing.
    Option 1
    Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Repair Database. If that doesn't help, then try again, this time using Rebuild Database.
    If that fails:
    Option 2
    Download iPhoto Library Manager and use its rebuild function. (In early versions of Library Manager it's the File -> Rebuild command. In later versions it's under the Library menu.)
    This will create an entirely new library. It will then copy (or try to) your photos and all the associated metadata and versions to this new Library, and arrange it as close as it can to what you had in the damaged Library. It does this based on information it finds in the iPhoto sharing mechanism - but that means that things not shared won't be there, so no slideshows, books or calendars, for instance - but it should get all your events, albums and keywords, faces and places back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one.  
    Regards
    TD

  • HT3964 my built-in isight camera will still not work on my macbook pro after completing smc reset.  The green light comes on but no video.

    my built-in isight camera will still not work on my macbook pro after completing smc reset.  The green light comes on but no video. 
    Any Suggestions?

    Restart the computer.

  • Applet does not work after conversion

    Hi,
    A have an html page on with a use an applet. The applet is downloaded in two cab files for the internet explorer.
    The applet and the download works fine without the java plugin.
    When I convert this page to using the html converter the applet does not work
    The error is
    java.lang.ClassNotFoundException: java.io.IOException: open HTTP connection failed.
         at sun.applet.AppletClassLoader.getBytes(Unknown Source)
         at sun.applet.AppletClassLoader.access$100(Unknown Source)
         at sun.applet.AppletClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at sun.plugin.security.PluginClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClassInternal(Unknown Source)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Unknown Source)
         at oracle.forms.handler.UICommon.instantiate(Unknown Source)
         at oracle.forms.handler.UICommon.onCreate(Unknown Source)
         at oracle.forms.handler.JavaContainer.onCreate(Unknown Source)
         at oracle.forms.engine.Runform.onCreateHandler(Unknown Source)
         at oracle.forms.engine.Runform.processMessage(Unknown Source)
         at oracle.forms.engine.Runform.processSet(Unknown Source)
         at oracle.forms.engine.Runform.onMessageReal(Unknown Source)
         at oracle.forms.engine.Runform.onMessage(Unknown Source)
         at oracle.forms.engine.Runform.sendInitialMessage(Unknown Source)
         at oracle.forms.engine.Runform.startRunform(Unknown Source)
         at oracle.forms.engine.Main.createRunform(Unknown Source)
         at oracle.forms.engine.Main.start(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    I think he fails on the downlad of the second cab file....
    Sombody any ideas,
    Thank
    Tom Van de Velde

    I recently moved to programming applets and this problem gave me many
    headaches. I know that the java compiler is supposed to compile with an
    appropriate version, but I suspect that there may be a few flaws in the
    system.
    Try compiling with a command like this to force a 1.1 compilation:
    "javac -target 1.1 yourfile.java"
    This enabled my applets to load in Netscape 4.6, something they wouldn't do before.
    Installing the java plugin seems to fix the problem on other browsers. This might
    be a new bug introduced by Java 1.4, since I had very few problems with
    Java 1.3...I dunno...that's speculation...

  • My iPhone 5 rear camera was not working, now the rear camera is also not working. I have procured the phone in 2012 from San Fransico. USA Can anyone help me, please?

    My iPhone 5 rear camera was not working, now the rear camera is also not working. I have procured the phone in 2012 from San Fransico. USA Can anyone help me, please?

    No one here can help you. If your phone is no longer under warranty, a third-party repair shop will most likely be your best bet. You can't mail the phone to Apple, in the US, as Apple does not accept international shipments. You could mail it to a friend/relative, in the US, & they could take it to an Apple store for you. Some Apple stores repair iPhones. Otherwise, you're looking at an out of warranty replacement.
    Good luck.

  • Applet is not working and I do not know why it is not working

    I cannot figure out why my applet is not working. Can someone assist me with this problem?
    Here is the code:
    As you will soon find out some of those imports can be ignored.
    import java.lang.Integer;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.font.*;
    import java.awt.geom.*;
    import java.awt.image.*;
    import java.awt.event.ItemListener;
    import java.awt.event.ItemEvent;
    import java.awt.event.ActionListener;
    import java.awt.event.ActionEvent;
    import javax.swing.*;
    import java.awt.Graphics.*;
    import javax.swing.*;
    import java.awt.*;
    import javax.swing.text.*;
    import javax.swing.event.*;
    import java.awt.event.*;
    import javax.swing.JApplet.*;
    import javax.swing.JFrame.*;
    import java.applet.Applet;
    import javax.swing.border.*;
    import javax.swing.Spring.*;
    import java.awt.geom.AffineTransform;
    import java.awt.Graphics2D;
    import java.beans.PropertyChangeListener;
    import java.beans.PropertyChangeEvent;
    import java.math.*;
    public class Test extends JApplet{
    JFormattedTextField Relfield;
    JFormattedTextField Relfield2;
    JFormattedTextField Relfield3;
    GridLayout layout = new GridLayout();
    public void init() {
    Double d = 0.0;
    Double e = 0.0;
    Relfield2 = new JFormattedTextField();
    Relfield3 = new JFormattedTextField();
    Relfield = new JFormattedTextField();
    Relfield.setText(d + "");
    Relfield2.setText(e + "");
    TextFieldHandler handlers = new TextFieldHandler();
    Relfield.addPropertyChangeListener(handlers);
    JButton button1 = new JButton("1");
    JButton button2 = new JButton("2");
    button1.addActionListener(new T5C());
    button2.addActionListener(new T6C());
    Container c = getContentPane();
    c.setLayout(layout);
    c.add(Relfield);
    c.add(Relfield2);
    c.add(button1);
    c.add(button2);
    class T5C implements ActionListener
    public void actionPerformed(ActionEvent e) {
    Double b = (Double)(Double.parseDouble(Relfield.getText())) + 1;
    Relfield.setValue(b + "");
    Relfield2.setValue(b + "");
    class T6C implements ActionListener
    public void actionPerformed(ActionEvent e) {
    Double b = (Double)(Double.parseDouble(Relfield.getText())) - 1;
    Relfield.setValue(b + "");
    Relfield2.setValue(b + "");
    public class TextFieldHandler implements PropertyChangeListener {
    public void propertyChange(PropertyChangeEvent e) {
    Object source = e.getSource();
    if (source == Relfield) {
    Double Rel = ((Double)Relfield.getValue()).doubleValue();
    Relfield.setValue(Rel);
    Relfield2.setValue(Rel);
    //BigDecimal myu = new BigDecimal("Relfield.getValue()");
    public static void main( String[] argv ) {
            JFrame frame = new JFrame( "General Shear Mode Damper Design" );
            frame.addWindowListener( new WindowAdapter(){
                public void windowClosing( WindowEvent e ){
                    System.exit( 0 );
            JApplet applet = new Test();
            frame.getContentPane().add(applet);
            applet.init();
            frame.setSize( 1020, 720);
            frame.setVisible(true);
    }

    The applet is not running at all and I can't figure out the error messages.
    The error messages are below:
    C:\Users\zite.1\Desktop>javac Test.java
    C:\Users\zite.1\Desktop>java Test
    Exception in thread "main" java.lang.NullPointerException
    at Test$TextFieldHandler.propertyChange(Test.java:89)
    at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
    at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
    at java.awt.Component.firePropertyChange(Unknown Source)
    at javax.swing.JComponent.addNotify(Unknown Source)
    at java.awt.Container.addNotify(Unknown Source)
    at javax.swing.JComponent.addNotify(Unknown Source)
    at java.awt.Container.addNotify(Unknown Source)
    at javax.swing.JComponent.addNotify(Unknown Source)
    at java.awt.Container.addNotify(Unknown Source)
    at javax.swing.JComponent.addNotify(Unknown Source)
    at javax.swing.JRootPane.addNotify(Unknown Source)
    at java.awt.Container.addNotify(Unknown Source)
    at java.awt.Panel.addNotify(Unknown Source)
    at java.awt.Container.addNotify(Unknown Source)
    at javax.swing.JComponent.addNotify(Unknown Source)
    at java.awt.Container.addNotify(Unknown Source)
    at javax.swing.JComponent.addNotify(Unknown Source)
    at java.awt.Container.addNotify(Unknown Source)
    at javax.swing.JComponent.addNotify(Unknown Source)
    at javax.swing.JRootPane.addNotify(Unknown Source)
    at java.awt.Container.addNotify(Unknown Source)
    at java.awt.Window.addNotify(Unknown Source)
    at java.awt.Frame.addNotify(Unknown Source)
    at java.awt.Window.show(Unknown Source)
    at java.awt.Component.show(Unknown Source)
    at java.awt.Component.setVisible(Unknown Source)
    at java.awt.Window.setVisible(Unknown Source)
    at Test.main(Test.java:112)

  • My camera  icon is not working on my sms so i cant send picture with sms? what to do?

    My camera  icon is not working on my sms part?
    so i cant send picture with sms? what to do?

    Double tap Home button, delete Camera app in multitask-bar.
    Do a
    Reset: Hold down the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears. Note: You will not lose any data
    By the way, picture go through as MMS not SMS, do you have a SMS/MMS plan with your carrier?
    Have you spoken with them?

  • I have CS5 and a d-600. I would like to use camera raw but not working. I downloaded CR 7.3 and still not working. Do I need to upgrade to CS6 ..or just throw it all out the window and get rid of my d-600 ?

    I have CS5 and a d-600. I would like to use camera raw but not working. I downloaded CR 7.3 and still not working. Do I need to upgrade to CS6 ..or just throw it all out the window and get rid of my d-600 ?

    it allows you to use your cr files, Adobe - Adobe Camera Raw and DNG Converter : For Windows
    Camera Raw: How to use Adobe DNG Converter - YouTube

  • Hi,my name is Hemanth.Im using ipod touch and my ipod is not detecting in itunes  but detecting in my computer.Im using windows7 os.I tried the troubleshooting process given in web but still it not working please help me.

    Hi,my name is Hemanth.Im using ipod touch and my ipod is not detecting in itunes  but detecting in my computer.Im using windows7 os.I tried the troubleshooting process given in web but still it not working please help me.

    Did you try everything here:
    iOS: Device not recognized in iTunes for Windows
    Then try a different computer to help determine if yo have an IPod or computer problem.

  • Camera Raw CS6 not working properly

    I have upagraded from Ps Cs5 to CS6.
    I open a file in CR, and modify the exposition. After that, I modify the clarity: immediatly, the exposition goes back as it was before the modification ...
    After the work on CR, I finish the file and go back to bridge: the image is not modified ! But if I dobble click on the same image in bridge, the file is opening in CR with the modifications: so this modifications are note visble on bridge ...
    Some body can help me ?
    I work with the last version of Br and Ps CS6.
    Thanks,
    Michel,   [email protected]

    Thanks a lot, Adriana, it is working ! You are right, it is the Nike plugins responsibility. Everything is OK now.
    Salutations and many thanks from Guadeloupe, French West Indies
    Michel GOGNY-GOUBERT
    Le 4 mars 2014 à 17:42, adriana ohlmeyer <[email protected]> a écrit :
    Re: Camera Raw CS6 not working properly
    created by adriana ohlmeyer in Adobe Camera Raw - View the full discussion
    If you have Nik plugins installed, please check reply # 8 on this thread:
    http://forums.adobe.com/message/6045415#6045415
    Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/6179192#6179192
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/6179192#6179192
    To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/6179192#6179192. In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in Adobe Camera Raw at Adobe Community
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/thread/416458?tstart=0.

  • Yesterday I was able to take photos but around 9pm last night my rear camera stop working. I have reseted my phone and have also restored it and the camera still is not working. Also I have deleted all apps that can have access to the camera.

    Yesterday I was able to take photos but around 9pm last night my rear camera stop working. I have reseted my phone and have also restored it and the camera still is not working. Also I have deleted all apps that can have access to the camera and i have updated the new IOS.What else should I do ? Is this a hardware problem?

    Looks like a hardware issue that will have to be taken to a store

  • Camera function is not working

    The camera function is not working on my iPhone 5 that was only bought on 19/1/2013.  Whne you click on the photo icon on the screen you just see the pictur of the closed shutter.  Does anyone know how I can fix this or have had this happen to them,  Of course I am now out of the 3 months free phone support.  Thanking you in anticipation.

    Restart iPhone: Hold down the Sleep/Wake button and the home button together until the apple logo appears (ignore the ON/OFF slider) then let both buttons go and wait for phone to restart (no data will be lost).

  • Camera, Browser & Maps Not Working

    Hi,
    It been since yesterday my Z10 camera, broser & maps not working.
    Whenever I click the camera icon, it is not even opening.
    Browser icon had changed, it turned to a triangle square & circle.
    Can anyone help me out.
    Thanks,
    Chris

    The update may not have loaded properly, you can reload this way:   http://btsc.webapps.blackberry.com/btsc/viewdocume​nt.do?externalId=KB34045&sliceId=2&docType=kc&noCo​...
    Or do a Security Wipe (Reset to Factory Settings) this way: 
    http://btsc.webapps.blackberry.com/btsc/viewdocume​nt.do?externalId=KB33591&sliceId=2&docType=kc&noCo​...
    Please read both carefully !

  • Camera raw is not working on my NEF files D600

    camera raw is not working on my NEF files D600.. I ALREADY TRIED all of the updates ( first 7.3, 7.4 even the 8.1) i have the photoshop cs6 and im not finding a way to make it read my files!!! even the DMG converter its not reading them!!

    It might be the way you are downloading them. I believe that Nikon Transfer has been updated to overcome a corruption bug which affects Adobe products.
    If you are using Nikon Transfer, it might be worth updating to the latest version, and downloading your photos again. Or use Adobe Photodownloader instead (I would).
    Also, accepted wisdom is to download photos off the memory card using a card reader, rather than via the camera USB, as it is less prone to problems. YMMV.

  • How can I upload my RAW files from my Nikon D750 to my MAC computer? I now have Camera Raw 8.7.1. and updated my camera and still not working:(

    How can I upload my RAW files from my Nikon D750 to my MAC computer? I now have Camera Raw 8.7.1. and updated my camera and still not working:(

    Which version of mac os x do you have?
    Which version of photoshop are you using?
    Do you get any message when you try to open the files into photoshop?
    Did you use Nikon Transfer to get the files from your camera to computer?
    Did you try the File>Get Photos From Camera in Adobe Bridge?

Maybe you are looking for