Examples of RTPScreenSharingSession


Examples of org.openmeetings.app.rtp.RTPScreenSharingSession

        httpServletResponse.setHeader("Content-Disposition","Inline; filename=\"" + requestedFile + "\"");
           
        String template = "rtp_player_applet.vm";
       
        // Retrieve Data from RTPmanager
        RTPScreenSharingSession rsss = RTPStreamingHandler.getSessionForRoom(room, sid, publicSID);
       
        if(rsss == null){
          log.error("no RTPSharingSession available for room " + room);
          return null;
        }
       
        log.debug("Trying to connect on Stream (origin : " + rsss.getSharingIpAddress() + ")");
       
        // Defining Port for Viewer...
        HashMap<String, Integer> preDefindedUsers = rsss.getViewers();
       
        if(preDefindedUsers.size() < 1)
          throw new Exception("No predefined viewers available in RTPSharingSession!!");
       
        Iterator<String> citer = preDefindedUsers.keySet().iterator();

       
        Integer myPort = null;
       
       
        log.debug("Trying to resolve publicSID for sharerApplet : " + publicSID);
       
        log.debug("Dumping Viewers MAP : ");
        log.debug("-------------------------------------");
       
        Iterator<String> testiter = preDefindedUsers.keySet().iterator();
       
        while(testiter.hasNext()){
          String clientPublicSid = testiter.next();
          Integer port = preDefindedUsers.get(clientPublicSid);
         
          log.debug("Viewer : " + clientPublicSid + " : " + port);
         
        }
       
        log.debug("-------------------------------------");
       
        while(citer.hasNext()){
          String myClientSID = citer.next();
          Integer port = preDefindedUsers.get(myClientSID);
         
          log.debug("Trying Client with publicSID " + myClientSID);
         
          if(myClientSID.equals(publicSID)){
            log.debug("HIT!!!");
            myPort = port;
           
            break;
          }
        }
       
       
        // TODO : this would be a valid entrypoint to add a new viewer, if he is part of
        // the conference (check via ClientList per room) and came late ;-)
        if(myPort == null)
          throw new Exception("Predefindes Viewer List does not contain publicSID(" + publicSID +") !");
       
       
        ctx.put("HOST", InetAddress.getLocalHost().getHostAddress());
        ctx.put("PORT", myPort);
        ctx.put("HEIGHT", rsss.getStreamHeight());
        ctx.put("WIDTH", rsss.getStreamWidth());
       
        log.debug("Put Variables to Velocity context : HOST=" + ctx.get("HOST") + ", PORT=" + ctx.get("PORT"));
       
        log.debug("Received PubliSID : " + publicSID );
        //RoomClient rcl = ClientListManager.getInstance().getClientByPublicSID(publicSID);
View Full Code Here

Examples of org.openmeetings.app.rtp.RTPScreenSharingSession

   
      String publicSID = request.getParameter("publicSID");
      if (publicSID == null)
        throw new ServletException("RTPMethodServlet.startStreaming : no parameter publicSID!");
     
      RTPScreenSharingSession session = RTPStreamingHandler.getSessionForRoom(room, sid, publicSID);
     
      session.getReceiver().stop();
     
      /** Notify Clients, that user started streaming -> showing users button for Appletstart */
      LinkedHashMap<String,Object> hs = new LinkedHashMap<String,Object>();
      hs.put("message", "stopStreaming");
      hs.put("session", session);
View Full Code Here

Examples of org.openmeetings.app.rtp.RTPScreenSharingSession

      String sharersPort = request.getParameter("rtpport");
      if(sharersPort == null || sharersPort.length() < 1)
        throw new ServletException("RTPMethodServlet.startStreaming : no parameter rtpport!");
     
     
      RTPScreenSharingSession session = RTPStreamingHandler.getSessionForRoom(room, sid, publicSID);
     
      if(session == null){
        Long users_id = Sessionmanagement.getInstance().checkSession(sid);
        session = RTPStreamingHandler.storeSessionForRoom(room, users_id, publicSID, hostIP, Integer.parseInt(sharersPort));
      }
     
      width=request.getParameter("width");
     
      if(width!= null && width.length() > 0){
        try{
          int width_i = Integer.parseInt(width);
          session.setStreamWidth(width_i);
        }
        catch(NumberFormatException nfe){
          log.error("Invalid parameter width as Servletparameter - ignored!");
        }
      }
     
      height=request.getParameter("height");
     
      if(height!= null && height.length() > 0){
        try{
          int height_i = Integer.parseInt(height);
          session.setStreamHeight(height_i);
        }
        catch(NumberFormatException nfe){
          log.error("Invalid parameter height as Servletparameter - ignored!");
        }
      }
     
      // Starting ReceiverThread
      session.startReceiver();
     
      log.debug("startStreaming values : IPAddress Sharer : " + sharerIP + ", width=" + width + ", height=" + height + ",room=" + room);
      log.debug("startStreaming publicSID=" + publicSID);
     
      //we have to include the publicSID to get the RoomClient Object
      //also the HOST, PORT must be set correctly in the RTPScreenSharingSession-Object
      RoomClient rcl = ClientListManager.getInstance().getClientByPublicSID(publicSID);
     
      HashMap<String, Integer> viewers = session.getViewers();
     
      Iterator<String> iter = viewers.keySet().iterator();
     
      while(iter.hasNext()){
        String publicSIDofViewer = iter.next();
View Full Code Here

Examples of org.openmeetings.app.rtp.RTPScreenSharingSession

              template = "screencast_jrdesktop.vm";
              log.debug("Creating JNLP Template for jrdesktop solution");
            } else if(conf_i == 2){
             
              // Storing Session data
              RTPScreenSharingSession session = RTPStreamingHandler.storeSessionForRoom(room, users_id, publicSID, rtmphostlocal, -1);
             
              // For the RTP Sharer, we need some additional information
              ctx.put("HOST", rtmphostlocal);
              ctx.put("PORT", session.getIncomingRTPPort());
              template = "screencast_rtp.vm";
              log.debug("Creating JNLP Template for RTP solution");
             
              log.debug("Stored RTPSession Data for Room " + room);
             
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.