Examples of RoomClient


Examples of org.openmeetings.app.conference.session.RoomClient

      IConnection current = Red5.getConnectionLocal();
      String streamid = current.getClient().getId();
 
      log.debug("getCurrentRoomClient -2- " + streamid);
 
      RoomClient currentClient = this.clientListManager
          .getClientByStreamId(streamid);
 
      Rooms room = roommanagement.getRoomById(room_id);
 
      if (room.getAppointment() == false) {
        throw new IllegalStateException("Room has no appointment");
      }
   
      Appointment appointment = appointmentLogic
          .getAppointmentByRoom(room_id);

      Map<String, Object> returnMap = new HashMap<String, Object>();

      returnMap.put("appointment", appointment);

      Users us = userManagement.getUserById(currentClient.getUser_id());
      TimeZone timezone = timezoneUtil.getTimezoneByUser(us);

      returnMap.put("appointment", appointment);

      returnMap.put(
View Full Code Here

Examples of org.openmeetings.app.persistence.beans.recording.RoomClient

          boolean userIsInRoom = false;
          boolean doProcess = false;
         
          HashMap<String, RoomClient> clientList = ClientListManager.getInstance().getClientList();
          for (Iterator iter = clientList.keySet().iterator();iter.hasNext();) {
            RoomClient rcl = clientList.get(iter.next());
            if (rcl.getPublicSID().equals(publicSID)) {
              log.debug("found RoomClient");
              if (rcl.getRoom_id() != null && rcl.getRoom_id().toString().equals(room)) {
                log.debug("User is inside Room");
                userIsInRoom = true;
                doProcess = true;
              } else {
                log.debug("User already left room, block Screen - logical Room Leave");
View Full Code Here

Examples of org.openmeetings.app.persistence.beans.recording.RoomClient

        boolean userIsInRoom = false;
        boolean doProcess = false;
     
        HashMap<String, RoomClient> clientList = ClientListManager.getInstance().getClientList();
        for (Iterator iter = clientList.keySet().iterator();iter.hasNext();) {
          RoomClient rcl = clientList.get(iter.next());
          if (rcl.getPublicSID().equals(publicSID)) {
            log.debug("found RoomClient");
            if (rcl.getRoom_id() != null && rcl.getRoom_id().toString().equals(room)) {
              log.debug("User is inside Room");
              userIsInRoom = true;
              doProcess = true;
            } else {
              log.debug("User already left room, block Screen - logical Room Leave");
View Full Code Here

Examples of org.openmeetings.app.persistence.beans.recording.RoomClient

       
        RoomUser[] roomUsers = new RoomUser[map.size()];
       
        int i = 0;
        for (Iterator<String> iter = map.keySet().iterator(); iter.hasNext(); ) {
          RoomClient rcl = map.get(iter.next());
         
          RoomUser roomUser = new RoomUser();
          roomUser.setFirstname(rcl.getFirstname());
          roomUser.setLastname(rcl.getLastname());
          roomUser.setBroadcastId(rcl.getBroadCastID());
          roomUser.setPublicSID(rcl.getPublicSID());
          roomUser.setIsBroadCasting(rcl.getIsBroadcasting());
          roomUser.setAvsettings(rcl.getAvsettings());
         
          roomUsers[i] = roomUser;
         
          i++;
         
View Full Code Here

Examples of org.openmeetings.app.persistence.beans.recording.RoomClient

   
    Iterator<String> iter = viewers.keySet().iterator();
   
    while(iter.hasNext()){
      String clientSID = iter.next();
      RoomClient client = ClientListManager.getInstance().getClientByPublicSID(clientSID);
     
      log.debug("Adding Target for room " +session.getRoom().getRooms_id() + " : " + client.getUserip() + "/" + viewers.get(clientSID));
     
      SessionAddress destAddr = new SessionAddress( InetAddress.getByName(client.getUserip()), viewers.get(clientSID));
      basicManager.addTarget(destAddr);
    }
   
    long then = System.currentTimeMillis();
    long waitingPeriod = 30000// wait for a maximum of 30 secs.
View Full Code Here

Examples of org.openmeetings.app.persistence.beans.recording.RoomClient

    public static RTPScreenSharingSession storeSessionForRoom(String room, Long sharing_user_id, String publicSID, String hostIP, int the_port) throws Exception{
      log.debug("storeSessionForRoom : Room = " + room + ", publicSID : " + publicSID + ", hostIP" + hostIP);
     
      // Defining The IP of the Sharer (Moderator)
      // Should be retrieved via Clientlist to receive the "extern" IP, seen by red5
      RoomClient rcl = ClientListManager.getInstance().getClientByPublicSID(publicSID);
     
     
      if(rcl ==null)
        throw new Exception("Could not retrieve RoomClient for publicSID");
     
     
      RTPScreenSharingSession session = new RTPScreenSharingSession();
     
      if(room == null || room.length() <1)
        throw new Exception("InputVal room not valid");
     
      Long user_level = Usermanagement.getInstance().getUserLevelByID(sharing_user_id);
      Rooms myRoom= Roommanagement.getInstance().getRoomById(user_level, Long.parseLong(room));
     
      if(myRoom == null)
        throw new Exception("no Room for ID " + room);
     
     
      // Define Room
      session.setRoom(myRoom);
     
      // Define User
      Users user = Usermanagement.getInstance().getUserById(sharing_user_id);
     
      if(user == null)
        throw new Exception("No User for id " + sharing_user_id);
     
      log.debug("storeSessionForRoom : User = " + user.getLogin());
     
      session.setSharingUser(user);
     
      // Define Sharers IP
      session.setSharingIpAddress(rcl.getUserip());
      log.debug("storeSessionForRoom : Sharers IP = " + rcl.getUserip());
     
      // Define RTP Port for Sharing User
      int port;
     
      if(the_port < 0)
        port = getNextFreeRTPPort();
      else
        port = the_port;
     
      log.debug("storeSessionForRoom : Incoming RTP Port = " + port);
     
      session.setIncomingRTPPort(port);
     
      // Pre-Define Viewers
      HashMap<String, RoomClient> clientsForRoom = ClientListManager.getInstance().getClientListByRoom(Long.parseLong(room));
     
      Iterator<String> siter = clientsForRoom.keySet().iterator();
     
      HashMap<String, Integer> viewers = new HashMap<String, Integer>();
     
      while(siter.hasNext()){
        String key = siter.next();
        RoomClient client = clientsForRoom.get(key);
       
        int viewerPort = getNextFreeRTPPort();
       
        log.debug("Adding viewer : " + client.getPublicSID() + " - " + viewerPort);
       
        viewers.put(client.getPublicSID(), viewerPort);
       
      }
     
      session.setViewers(viewers);
      log.debug("storeSessionForRoom : Added " + viewers.size() + " Viewers to session");
View Full Code Here

Examples of org.openmeetings.app.persistence.beans.recording.RoomClient

      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();
       
        log.debug("Notifying Client with publicSid = " + publicSIDofViewer);
       
        /** Notify Clients, that user started streaming -> showing users button for Appletstart */
        LinkedHashMap<String,Object> hs = new LinkedHashMap<String,Object>();
        hs.put("message", "startStreaming");
        //Set the User Object
       
        hs.put("publicSID", publicSIDofViewer);
        hs.put("room", rcl.getRoom_id());
       
        hs.put("rcl", rcl);
        //Set the Screen Sharing Object
        hs.put("session", session);
       
View Full Code Here

Examples of org.openmeetings.app.persistence.beans.recording.RoomClient

      IConnection current = Red5.getConnectionLocal();
      String streamid = current.getClient().getId();
     
      log.debug("getCurrentRoomClient -2- "+streamid);
     
      RoomClient currentClient = this.clientListManager.getClientByStreamId(streamid);
     
      HashMap<String,RoomClient> roomClientList = this.clientListManager.getClientListByRoom(currentClient.getRoom_id());
     
      for (Iterator<String> iter = roomClientList.keySet().iterator();iter.hasNext();) {
       
        RoomClient rcl = roomClientList.get(iter.next());
       
        if (rcl.getIsRecording()) {
         
          return rcl;
         
        }
       
View Full Code Here

Examples of org.openmeetings.app.persistence.beans.recording.RoomClient

 
  public String recordMeetingStream(String roomRecordingName, String comment, Boolean isInterview){
    try {
     
      IConnection current = Red5.getConnectionLocal();
      RoomClient currentClient = this.clientListManager.getClientByStreamId(current.getClient().getId());
      Long room_id = currentClient.getRoom_id();

      Date now = new Date();
     
      //Receive flvRecordingId
      Long flvRecordingId = this.flvRecordingDaoImpl.addFlvRecording("", roomRecordingName, null, currentClient.getUser_id(),
                  room_id, now, null, currentClient.getUser_id(), comment, currentClient.getStreamid(),
                  currentClient.getVWidth(),currentClient.getVHeight(), isInterview);
     
      //Update Client and set Flag
      currentClient.setIsRecording(true);
      currentClient.setFlvRecordingId(flvRecordingId);
      this.clientListManager.updateClientByStreamId(current.getClient().getId(), currentClient);
     
      //get all stream and start recording them
      Collection<Set<IConnection>> conCollection = current.getScope().getConnections();
      for (Set<IConnection> conset : conCollection) {
        for (IConnection conn : conset) {
          if (conn != null) {
            if (conn instanceof IServiceCapableConnection) {
              RoomClient rcl = this.clientListManager.getClientByStreamId(conn.getClient().getId());
             
              log.debug("is this users still alive? :"+rcl);
             
              //FIXME: Check if this function is really in use at the moment 
              if (rcl.getIsScreenClient() != null && rcl.getIsScreenClient()) {
                  //continue;
                } else {
                ((IServiceCapableConnection) conn).invoke("startedRecording",new Object[] { currentClient }, this);
              }
             
              //If its the recording client we need another type of Meta Data
              if (rcl.getIsScreenClient()) {
             
                if (rcl.getFlvRecordingId() != null && rcl.getScreenPublishStarted() != null && rcl.getScreenPublishStarted()) {
                 
                  String streamName_Screen = generateFileName(flvRecordingId, rcl.getStreamPublishName().toString());
                 
                  Long flvRecordingMetaDataId = this.flvRecordingMetaDataDaoImpl.addFlvRecordingMetaData(flvRecordingId,
                                      rcl.getFirstname()+" "+rcl.getLastname(), now,
                                            false, false, true, streamName_Screen, rcl.getInterviewPodId());
                 
                  //Start FLV Recording
                  recordShow(conn, rcl.getStreamPublishName(), streamName_Screen, flvRecordingMetaDataId, true, isInterview);
                 
                  //Add Meta Data
                  rcl.setFlvRecordingMetaDataId(flvRecordingMetaDataId);
                 
                  this.clientListManager.updateClientByStreamId(rcl.getStreamid(), rcl);
               
                }
               
              } else if
              //if the user does publish av, a, v
              //But we only record av or a, video only is not interesting
              (rcl.getAvsettings().equals("av") ||
                  rcl.getAvsettings().equals("a") ||
                  rcl.getAvsettings().equals("v")){ 
               
                String streamName = generateFileName(flvRecordingId, String.valueOf(rcl.getBroadCastID()).toString());
               
                //Add Meta Data
                boolean isAudioOnly = false;
                if (rcl.getAvsettings().equals("a")){
                  isAudioOnly = true;
                }
               
                boolean isVideoOnly = false;
                if (rcl.getAvsettings().equals("v")){
                  isVideoOnly = true;
                }
               
                Long flvRecordingMetaDataId = this.flvRecordingMetaDataDaoImpl.addFlvRecordingMetaData(flvRecordingId,
                                  rcl.getFirstname()+" "+rcl.getLastname(), now,
                                        isAudioOnly, isVideoOnly, false, streamName, rcl.getInterviewPodId());
               
                rcl.setFlvRecordingMetaDataId(flvRecordingMetaDataId);
               
                this.clientListManager.updateClientByStreamId(rcl.getStreamid(), rcl);
               
                //Start FLV recording
                recordShow(conn, String.valueOf(rcl.getBroadCastID()).toString(), streamName, flvRecordingMetaDataId, false, isInterview);
               
              }
               
            }
          }
View Full Code Here

Examples of org.openmeetings.app.persistence.beans.recording.RoomClient

      for (Set<IConnection> conset : conCollection) {
        for (IConnection conn : conset) {
          if (conn != null) {
            if (conn instanceof IServiceCapableConnection) {
             
              RoomClient rcl = ClientListManager.getInstance().getClientByStreamId(conn.getClient().getId());
             
              //FIXME: Check if this function is really in use at the moment 
//              if (!rcl.getIsScreenClient()) {
//                ((IServiceCapableConnection) conn).invoke("stoppedRecording",new Object[] { currentClient }, this);
//              }
             
              log.debug("is this users still alive? :"+rcl);
             
              if (rcl.getIsScreenClient()) {
               
                if (rcl.getFlvRecordingId() != null && rcl.getScreenPublishStarted() != null && rcl.getScreenPublishStarted()) {
               
                  //Stop FLV Recording
                  stopRecordingShow(conn, rcl.getStreamPublishName(),rcl.getFlvRecordingMetaDataId());
                 
                  //Update Meta Data
                  this.flvRecordingMetaDataDaoImpl.updateFlvRecordingMetaDataEndDate(rcl.getFlvRecordingMetaDataId(),new Date());
                }
               
              } else if (rcl.getAvsettings().equals("av") ||
                  rcl.getAvsettings().equals("a") ||
                  rcl.getAvsettings().equals("v")){ 
               
                stopRecordingShow(conn, String.valueOf(rcl.getBroadCastID()).toString(), rcl.getFlvRecordingMetaDataId() );
               
                //Update Meta Data
                this.flvRecordingMetaDataDaoImpl.updateFlvRecordingMetaDataEndDate(rcl.getFlvRecordingMetaDataId(),new Date());
               
              }
             
            }
          }
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.