Package org.red5.io.flv.impl

Examples of org.red5.io.flv.impl.Tag


   * @return
   */
  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());
View Full Code Here


    return null;
  }
 
  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);
              }
            }
          }   
        }
      }
     
      return _stopRecordAndSave(current.getScope(), roomrecordingName, currentClient);
    } catch (Exception err) {
      log.error("[stopRecordAndSave]",err);
    }
    return new Long(-1);
  }
View Full Code Here

 

  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());
View Full Code Here

   * @deprecated
   * @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)){
View Full Code Here

          }
          String scopeName = "hibernate";
          if (rcl.getRoom_id() != null) {
            scopeName = rcl.getRoom_id().toString();
          }
          IScope currentScope = ScopeApplicationAdapter.getInstance()
              .getRoomScope(scopeName);
          ScopeApplicationAdapter.getInstance().roomLeaveByScope(rcl,
              currentScope);

          HashMap<Integer, String> messageObj = new HashMap<Integer, String>();
View Full Code Here

        String scopeName = "hibernate";
        if (rcl.getRoom_id() != null) {
          scopeName = rcl.getRoom_id().toString();
        }
        IScope currentScope = ScopeApplicationAdapter.getInstance()
            .getRoomScope(scopeName);
        ScopeApplicationAdapter.getInstance().roomLeaveByScope(rcl,
            currentScope);

        HashMap<Integer, String> messageObj = new HashMap<Integer, String>();
View Full Code Here

         }
         String scopeName = "hibernate";
         if (rcl.getRoom_id() != null) {
           scopeName = rcl.getRoom_id().toString();
         }
         IScope currentScope = this.scopeApplicationAdapter.getRoomScope(scopeName);
         this.scopeApplicationAdapter.roomLeaveByScope(rcl, currentScope);
        
        
         HashMap<Integer,String> messageObj = new HashMap<Integer,String>();
         messageObj.put(0, "kick");
View Full Code Here

          }
          String scopeName = "hibernate";
          if (rcl.getRoom_id() != null) {
            scopeName = rcl.getRoom_id().toString();
          }
          IScope currentScope = this.scopeApplicationAdapter.getRoomScope(scopeName);
         
          HashMap<Integer,String> messageObj = new HashMap<Integer,String>();
          messageObj.put(0, "kick");
         
          this.scopeApplicationAdapter.sendMessageById(messageObj, rcl.getStreamid(), currentScope);
View Full Code Here

    // ------------------------------------------------------------------------

    private void createPlayStream( IPendingServiceCallback callback ) {

        logger.debug( "create play stream" );
        IPendingServiceCallback wrapper = new CreatePlayStreamCallBack( callback );
        invoke( "createStream", null, wrapper );
    }
View Full Code Here

      if (stream.getStreamListeners() != null) {
       
        for (Iterator<IStreamListener> iter = stream.getStreamListeners().iterator();iter.hasNext();) {
         
          IStreamListener iStreamListener = iter.next();
         
          ListenerAdapter listenerAdapter = (ListenerAdapter) iStreamListener;
         
          log.debug("Stream Closing ?? "+listenerAdapter.getFlvRecordingMetaDataId()+ " " +flvRecordingMetaDataId);
         
View Full Code Here

TOP

Related Classes of org.red5.io.flv.impl.Tag

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.