Examples of RoomClient


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);
     
     
      log.debug("getCurrentRoomClient -#########################- "+currentClient.getRoom_id());
     
      HashMap<String,RoomClient> roomList = this.clientListManager.getClientListByRoomAll(currentClient.getRoom_id());
     
      for (Iterator<String> iter = roomList.keySet().iterator();iter.hasNext();) {
       
        RoomClient rcl = roomList.get(iter.next());
       
        if (rcl.getIsRecording()) {
          return rcl;
        }
       
      }
     
View Full Code Here

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

      for (Iterator<String> iter = MyUserList.keySet().iterator(); iter
          .hasNext();) {
        String key = (String) iter.next();

        RoomClient rcl = MyUserList.get(key);

        String aux = rcl.getSwfurl();

        int init_pos = aux.indexOf("sid=") + 4;
        int end_pos = init_pos + 32;
        if (end_pos > aux.length())
          end_pos = aux.length();
View Full Code Here

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

   */
  public String recordMeetingStream(String conferenceType, Object initwhiteboardvars,
      String roomRecordingsTableString, String comment){
    try {
      IConnection current = Red5.getConnectionLocal();
      RoomClient currentClient = this.clientListManager.getClientByStreamId(current.getClient().getId());
      Long room_id = currentClient.getRoom_id();

      String recordingName = generateFileName(Long.valueOf(currentClient.getBroadCastID()).toString());
      currentClient.setIsRecording(true);
      currentClient.setRoomRecordingName(recordingName);     
      this.clientListManager.updateClientByStreamId(current.getClient().getId(), currentClient);
     
      Date now = new Date();
     
      RoomRecording roomRecording = new RoomRecording();
      roomRecording.setConferenceType(conferenceType);
      roomRecording.setRoom_setup(Roommanagement.getInstance().getRoomById(currentClient.getRoom_id()));
      roomRecording.setRoomRecordingsTableString(roomRecordingsTableString);
      roomRecording.setStarttime(now);
      roomRecording.setComment(comment);
     
      //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.error("is this users still alive? :"+rcl);
              //Check if the Client is in the same room and same domain
              if(room_id.equals(rcl.getRoom_id()) && room_id!=null){
               
                ((IServiceCapableConnection) conn).invoke("startedRecording",new Object[] { currentClient }, this);
               
                String remoteAdress = conn.getRemoteAddress();
                Date startDate = new Date();
               
                //add streamings to record File
                if (!conferenceType.equals("audience") || rcl.getIsMod()){
                 
                  RoomStream roomStream = new RoomStream();
                 
                  String streamName = generateFileName(Long.valueOf(rcl.getBroadCastID()).toString());
                 
                  //if the user does publish av, a, v
                  if (!rcl.getAvsettings().equals("n")){ 
                    recordShow(conn, rcl.getBroadCastID(), streamName);
                  }
                 
                  roomStream.setStreamName(streamName);
                  //stream starting
                  roomStream.setStreamstart(true);
View Full Code Here

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

  }
 
  public Long _stopRecordMeetingStream(String roomrecordingName){
    try {
      IConnection current = Red5.getConnectionLocal();
      RoomClient currentClient = this.clientListManager.getClientByStreamId(current.getClient().getId());

      RoomRecording roomRecording = roomRecordingList.get(roomrecordingName);
      Long room_id = currentClient.getRoom_id()

      String conferenceType = roomRecording.getConferenceType();
     
      //get all stream and stop recording them
      //Todo: Check that nobody does Recording at the same time Issue 253
      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);
              //Check if the Client is in the same room and same domain
              if(room_id.equals(rcl.getRoom_id()) && room_id!=null){
                ((IServiceCapableConnection) conn).invoke("stopedRecording",new Object[] { currentClient }, this);
              }
            }
          }   
        }
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());
              log.debug("is this users still alive? :"+rcl);
              //Check if the Client is in the same room and same domain
              if(room_id.equals(rcl.getRoom_id()) && room_id!=null){
                if (!conferenceType.equals("audience") || rcl.getIsMod()){
                  //stop the recorded flv and add the event to the notifications
                  log.debug("*** sendClientBroadcastNotifications Any Client is Recording - stop that");
                  StreamService._addRoomClientEnterEventFunc(rcl, roomrecordingName, rcl.getUserip(), false);
                  _stopRecordingShowForClient(conn, rcl, roomrecordingName, true);
                }
              }
             
            }
          }
        }
      }       
     
     
      String newRecordFileName = roomRecording.getRoomRecordingsTableString();
      String comment = roomRecording.getComment();
     
      Date starttime = roomRecording.getStarttime();
      Date endtime =  new java.util.Date();
      Long duration = endtime.getTime() - starttime.getTime();
      roomRecording.setEndtime(endtime);
     
      roomRecording.setEnduser(currentClient);
     
      roomRecording.setRecordname(newRecordFileName);
     
      RoomClient startedClient = roomRecording.getStartedby();
      Long recordedby = startedClient.getUser_id();
      Users us = null;
      if (recordedby!=null && recordedby>0){
        us = UsersDaoImpl.getInstance().getUser(recordedby);
      }
     
View Full Code Here

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

  public Long _clientCancelRecording(String roomrecordingName){
    try {
     
      IConnection current = Red5.getConnectionLocal();
      RoomClient currentClient = this.clientListManager.getClientByStreamId(current.getClient().getId());
      Long room_id = currentClient.getRoom_id();
      currentClient.setIsRecording(false);
      currentClient.setRoomRecordingName("");
      this.clientListManager.updateClientByStreamId(current.getClient().getId(), currentClient);
     
      RoomRecording roomRecording = roomRecordingList.get(roomrecordingName);
      String conferenceType = roomRecording.getConferenceType();
     
      //get all stream and stop recording them
      //Todo: Check that nobody does Recording at the same time Issue 253
      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);
              //Check if the Client is in the same room and same domain
              if(room_id.equals(rcl.getRoom_id()) && room_id!=null){
                ((IServiceCapableConnection) conn).invoke("stopedRecording",new Object[] { currentClient }, this);
                if (!conferenceType.equals("audience") || rcl.getIsMod()){
                  //if the user does publish av, a, v
                  if (!rcl.getAvsettings().equals("n")){
                    stopRecordingShow(conn,rcl.getBroadCastID());
                  }
                }
              }
            }
          }
View Full Code Here

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

   * @return
   */
  public RoomClient checkForRecording(){
    try {
      IConnection current = Red5.getConnectionLocal();
      RoomClient currentClient = this.clientListManager.getClientByStreamId(current.getClient().getId());
      Long room_id = currentClient.getRoom_id();
     
      //Check if any client in the same room is recording at the moment
     
      Collection<Set<IConnection>> conCollection = current.getScope().getConnections();
      for (Set<IConnection> conset : conCollection) {
        for (IConnection cons : conset) {
          if (cons != null) {
            if (cons instanceof IServiceCapableConnection) {
              if (!cons.equals(current)){
                log.debug("sending roomDisconnect to " + cons);
                RoomClient rcl = this.clientListManager.getClientByStreamId(cons.getClient().getId());
                //Check if the Client is in the same room and same domain except its the current one
                if(room_id.equals(rcl.getRoom_id()) && room_id!=null){         
                  if (rcl.getIsRecording()){
                    return rcl;
                  }
                }
              }
            }
View Full Code Here

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

  }
 
  public RoomClient getAndAddRoomClientByPublicSID(RoomClient rcl) throws Exception {
    // TODO Auto-generated method stub
   
    RoomClient remoteRcl = this.getRoomClientByPublicSID(rcl.getPublicSID());
    if (remoteRcl == null) {
      if (rcl.getRoomClientId() != null) {
        log.error("###### ERROR IN getRoomClientByPublicSID TRIED TO ADD CLIENT ALREADY EXISTING: "+rcl);
        log.error("###### ERROR IN getRoomClientByPublicSID TRIED TO ADD CLIENT ALREADY EXISTING: "+rcl.getStreamid());
        log.error("###### ERROR IN getRoomClientByPublicSID TRIED TO ADD CLIENT ALREADY EXISTING: "+rcl.getRoomClientId());
View Full Code Here

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

      Query query = session.createQuery(hql);
      query.setParameter("publicSID",publicSID);
     
      log.debug("Number OF Records: "+query.getResultList().size());
     
      RoomClient roomClient = null;
      try {
        roomClient = (RoomClient) query.getSingleResult();
        } catch (NoResultException ex) {
        }
      tx.commit();
View Full Code Here

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

      EntityTransaction tx = session.getTransaction();
      tx.begin();
      Query query = session.createQuery(hql);
      query.setParameter("roomClientId",roomClientId);
     
      RoomClient roomClient = null;
      try {
        roomClient = (RoomClient) query.getSingleResult();
        } catch (NoResultException ex) {
        }
      tx.commit();
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.