Examples of RTPSessionMgr


Examples of com.sun.media.rtp.RTPSessionMgr

    break;
      }     
  }

  for (int i = 0; i < mgrs.size(); i++) {
      RTPSessionMgr mgr= (RTPSessionMgr) mgrs.elementAt( i);

      SessionAddress addr= mgr.getRemoteSessionAddress();

      String dataPort= addr.getDataPort() + "";
     
            if( addr.getDataHostAddress().equals( address)
    && port.equals( dataPort)) {
   
                mgr.removeTarget( addr, "Closing session from AVReceiver");
                mgr.dispose();

    mgrs.removeElement( mgr);
   
    break;
      }
View Full Code Here

Examples of com.sun.media.rtp.RTPSessionMgr

        System.err.println("      " + ctl.getFormat());
    }
   
    System.err.println("      had now been identified as sent by: " + participant.getCNAME());

    RTPSessionMgr rtpManager= (RTPSessionMgr) evt.getSessionManager();

    SessionAddress addr= rtpManager.getRemoteSessionAddress();

    if( addr != null) {
        PlayerWindow pw = find(stream);   

        pw.setTitle( addr.getDataHostAddress(),
View Full Code Here

Examples of com.sun.media.rtp.RTPSessionMgr

    private SessionManager StartSessionManager(String destaddrstr,
                                                  int port,
                                                  String media){
        // this method create a new RTPSessionMgr and adds this applet
        // as a SessionListener, before calling initSession() and startSession()
        SessionManager mymgr = new RTPSessionMgr();
        if (media.equals("video"))
            videomgr = mymgr;
        if (media.equals("audio"))
            audiomgr = mymgr;
        mymgr.addReceiveStreamListener(this);
        //if (media.equals("audio"))
        //  EncodingUtil.Init((SessionManager)mymgr);
       
        // for initSession() we must generate a CNAME and fill in the
        // RTP Session address and port
        String cname = mymgr.generateCNAME();
        String username = "jmf-user";

        SessionAddress localaddr = new SessionAddress();
       
        try{
            destaddr = InetAddress.getByName(destaddrstr);
        }catch (UnknownHostException e){
            System.err.println("inetaddress " + e.getMessage());
            e.printStackTrace();
        }   
        SessionAddress sessaddr = new SessionAddress(destaddr,
                                                           port,
                                                           destaddr,
                                                           port+1);
       
        SourceDescription[] userdesclist = new SourceDescription[4];
        int i;
        for(i=0; i< userdesclist.length;i++){
            if (i == 0){
                userdesclist[i] = new
                    SourceDescription(SourceDescription.SOURCE_DESC_EMAIL,
                                    "jmf-user@sun.com",
                                    1,
                                    false);
                continue;
            }

            if (i == 1){
                userdesclist[i] = new
              SourceDescription(SourceDescription.SOURCE_DESC_NAME,
                                    username,
                                    1,
                                    false);
                continue;
            }
            if ( i == 2){
                userdesclist[i] = new
                    SourceDescription(SourceDescription.SOURCE_DESC_CNAME,
                                          cname,
                                      1,
                                      false);
                continue;
            }
            if (i == 3){
                userdesclist[i] = new
            SourceDescription(SourceDescription.SOURCE_DESC_TOOL,
                                  "JMF RTP Player v2.0",
                                  1,
                                  false);
                continue;
            }
        }// end of for
       
        // call initSession() and startSession() of the RTPsessionManager
        try{
            mymgr.initSession(localaddr,
                              mymgr.generateSSRC(),
                              userdesclist,
                              0.05,
                              0.25);
            mymgr.startSession(sessaddr,1,null);
        }catch (SessionManagerException e){
          System.err.println("RTPPlayerApplet: RTPSM Exception " + e.getMessage());
          e.printStackTrace();
          return null;
        }catch (IOException e){
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.