Package org.openmeetings.app.conference.session

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);

      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


    try {
     
      log.debug(":: recordMeetingStream ::");

      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());

              // Send every user a notification that the recording did start
              if (!rcl.getIsAVClient()) {
                ((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.isScreenPublishStarted()) {

                  String streamName_Screen = generateFileName(
                      flvRecordingId, rcl
                          .getStreamPublishName()
                          .toString());

                  Long flvRecordingMetaDataId = this.flvRecordingMetaDataDao
                      .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.getIsAVClient() &&
                  (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.flvRecordingMetaDataDao
                    .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

      for (Set<IConnection> conset : conCollection) {
        for (IConnection conn : conset) {
          if (conn != null) {
            if (conn instanceof IServiceCapableConnection) {

              RoomClient rcl = clientListManager.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? stop it :" + rcl);

              if (rcl.getIsScreenClient()) {

                if (rcl.getFlvRecordingId() != null
                    && rcl.isScreenPublishStarted()) {

                  // Stop FLV Recording
                  stopRecordingShow(conn,
                      rcl.getStreamPublishName(),
                      rcl.getFlvRecordingMetaDataId());

                  // Update Meta Data
                  this.flvRecordingMetaDataDao
                      .updateFlvRecordingMetaDataEndDate(
                          rcl.getFlvRecordingMetaDataId(),
                          new Date());
                }

              } else if (rcl.getIsAVClient()
                  && (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.flvRecordingMetaDataDao
                    .updateFlvRecordingMetaDataEndDate(
                        rcl.getFlvRecordingMetaDataId(),
                        new Date());

              }

            }
View Full Code Here

      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

        String streamid = current.getClient().getId();
        Collection<Set<IConnection>> conCollection = current.getScope().getConnections();
        for (Set<IConnection> conset : conCollection) {
            for (IConnection conn : conset) {
                if (conn != null) {
                    RoomClient rcl = this.clientListManager
                            .getClientByStreamId(conn
                                    .getClient().getId());
                    if (rcl == null) {
                        // continue;
                    } else if (rcl.getIsScreenClient() != null
                            && rcl.getIsScreenClient()) {
                        // continue;
                    } else {
                        if (!streamid.equals(rcl.getStreamid())) {
                            // It is not needed to send back
                            // that event to the actuall
                            // Moderator
                            // as it will be already triggered
                            // in the result of this Function
                            // in the Client
                            broadcastList.add(Long.valueOf(rcl.getBroadCastID()).intValue());
                        }
                    }
                }
            }
        }
View Full Code Here

   *
   * @return
   */
  public synchronized String getPublicSID() {
    IConnection current = Red5.getConnectionLocal();
    RoomClient currentClient = this.clientListManager
        .getClientByStreamId(current.getClient().getId());
    currentClient.setIsAVClient(false);
    clientListManager.updateClientByStreamId(current.getClient().getId(),
        currentClient);
    return currentClient.getPublicSID();
  }
View Full Code Here

   * @param newPublicSID
   */
  public synchronized Boolean overwritePublicSID(String newPublicSID) {
    try {
      IConnection current = Red5.getConnectionLocal();
      RoomClient currentClient = this.clientListManager
          .getClientByStreamId(current.getClient().getId());
      if (currentClient == null) {
        return false;
      }
      currentClient.setPublicSID(newPublicSID);
      this.clientListManager.updateClientByStreamId(current.getClient()
          .getId(), currentClient);
      return true;
    } catch (Exception err) {
      log.error("[overwritePublicSID]", err);
View Full Code Here

      log.debug("roomLeave " + client.getId() + " "
          + room.getClients().size() + " " + room.getContextPath()
          + " " + room.getName());

      RoomClient currentClient = this.clientListManager
          .getClientByStreamId(client.getId());

      // The Room Client can be null if the Client left the room by using
      // logicalRoomLeave
      if (currentClient != null) {
View Full Code Here

      IConnection current = Red5.getConnectionLocal();
      String streamid = current.getClient().getId();

      log.debug(streamid + " is leaving");

      RoomClient currentClient = this.clientListManager
          .getClientByStreamId(streamid);

      this.roomLeaveByScope(currentClient, current.getScope(), true);

    } catch (Exception err) {
View Full Code Here

                log.debug("sending roomDisconnect to " + cons
                    + " client id "
                    + cons.getClient().getId());

                RoomClient rcl = this.clientListManager
                    .getClientByStreamId(cons.getClient()
                        .getId());

                /*
                 * Check if the Client does still exist on the
                 * list
                 */
                if (rcl != null) {

                  /*
                   * Do not send back to sender, but actually
                   * all other clients should receive this
                   * message swagner 01.10.2009
                   */
                  if (!currentClient.getStreamid().equals(
                      rcl.getStreamid())) {
                   
                    // add Notification if another user isrecording
                    log.debug("###########[roomLeave]");
                    if (rcl.getIsRecording()) {
                      log.debug("*** roomLeave Any Client is Recording - stop that");
                      this.flvRecorderService
                          .stopRecordingShowForClient(
                              cons, currentClient);
                    }
                   
                    //If the user was a avclient, we do not broadcast a message about that to everybody
                    if (currentClient.getIsAVClient()) {
                      continue;
                    }
                   
                    if (rcl.getIsScreenClient() != null && rcl
                        .getIsScreenClient()) {
                      // screen sharing clients do not receive events
                      continue;
                    } else if (rcl.getIsAVClient()) {
                      // AVClients or potential AVClients do not receive events
                      continue;
                    }
                   
                    // Send to all connected users
View Full Code Here

TOP

Related Classes of org.openmeetings.app.conference.session.RoomClient

Copyright © 2018 www.massapicom. 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.