Package org.red5.server.api.service

Examples of org.red5.server.api.service.IServiceCapableConnection


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

    private void createPlayStream( IPendingServiceCallback callback ) {

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


    log.debug("roomJoin : ");
   
    try {
     
      IConnection conn = Red5.getConnectionLocal();
      IServiceCapableConnection service = (IServiceCapableConnection) conn;
      String streamId = client.getId();
     
      log.debug("### Client connected to OpenMeetings, register Client StreamId: "
          + streamId + " scope "+ room.getName() );
     
      //Set StreamId in Client
      service.invoke("setId", new Object[] { streamId },this);

      String swfURL = "";
      if (conn.getConnectParams().get("swfUrl") != null) {
        swfURL = conn.getConnectParams().get("swfUrl").toString();
      }
View Full Code Here

 
  public synchronized Map screenSharerAction(Map map) {
    try {
     
      IConnection current = Red5.getConnectionLocal();
      IServiceCapableConnection service = (IServiceCapableConnection) current;
     
      RoomClient currentClient = this.clientListManager.getClientByStreamId(current.getClient().getId());
     
      Map returnMap = new HashMap();
      returnMap.put("result", "stopAll");
     
     
      log.debug("-----------  ");
     
      if (currentClient != null) {
       
        boolean stopStreaming = Boolean.valueOf(map.get("stopStreaming").toString());
        boolean stopRecording = Boolean.valueOf(map.get("stopRecording").toString());
       
       
        if (stopStreaming) {
         
          log.debug("start streamPublishStart Is Screen Sharing -- Stop ");
         
          //Notify all users of the same Scope
          Collection<Set<IConnection>> conCollection = current.getScope().getConnections();
          for (Set<IConnection> conset : conCollection) {
            for (IConnection conn : conset) {
              if (conn != null) {
                if (conn instanceof IServiceCapableConnection) {
                  if (conn.equals(current)){
                    continue;
                  } else {
                    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 (rcl == null) {
                      //continue;
                    } else if (rcl.getIsScreenClient() != null && rcl.getIsScreenClient()) {
                        //continue;
                      } else {
                      IServiceCapableConnection iStream = (IServiceCapableConnection) conn;
                      //log.info("IServiceCapableConnection ID " + iStream.getClient().getId());
                      iStream.invoke("stopRed5ScreenSharing",new Object[] { currentClient }, this);
                      log.debug("send Notification to");
                    }
                  }
                }
              }
            }
          }
         
          if (currentClient.isStartRecording()) {
           
            returnMap.put("result", "stopSharingOnly");
           
          }
         
          currentClient.setStartStreaming(false);
          currentClient.setScreenPublishStarted(false);
         
          this.clientListManager.updateClientByStreamId(currentClient.getStreamid(), currentClient);
         
        }
       
        if (stopRecording) {
         
          if (currentClient.isStartStreaming()) {
            returnMap.put("result", "stopRecordingOnly");
          }
         
          //Notify all users of the same Scope
          Collection<Set<IConnection>> conCollection = current.getScope().getConnections();
          for (Set<IConnection> conset : conCollection) {
            for (IConnection conn : conset) {
              if (conn != null) {
                if (conn instanceof IServiceCapableConnection) {
                  if (conn.equals(current)){
                    continue;
                  } else {
                    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 (rcl == null) {
                      //continue;
                    } else if (rcl.getIsScreenClient() != null && rcl.getIsScreenClient()) {
                        //continue;
                      } else {
                      IServiceCapableConnection iStream = (IServiceCapableConnection) conn;
                      //log.info("IServiceCapableConnection ID " + iStream.getClient().getId());
                      iStream.invoke("stopRecordingMessage",new Object[] { currentClient }, this);
                      log.debug("send Notification to");
                    }
                  }
                }
              }
View Full Code Here

                    if (rcl == null) {
                      //continue;
                    } else if (rcl.getIsScreenClient() != null && rcl.getIsScreenClient()) {
                        //continue;
                      } else {
                      IServiceCapableConnection iStream = (IServiceCapableConnection) conn;
                      //log.info("IServiceCapableConnection ID " + iStream.getClient().getId());
                      iStream.invoke("newRed5ScreenSharing",new Object[] { currentClient }, this);
                      log.debug("send Notification to");
                    }
                  }
                }
              }
View Full Code Here

                //log.debug("is this users still alive? :"+rcl);
                //Check if the Client is in the same room and same domain
                if (rcl == null) {
                  //continue;
                } else {
                  IServiceCapableConnection iStream = (IServiceCapableConnection) conn;
                  //log.info("IServiceCapableConnection ID " + iStream.getClient().getId());
                  if (rcl.getIsScreenClient() != null && rcl.getIsScreenClient()) {
                      //continue;
                    } else {
                    iStream.invoke("newStream",new Object[] { currentClient }, this);
                  }
                 
                  if (rcl.getIsRecording()){
                    //StreamService.addRecordingByStreamId(current, streamid, currentClient, rcl.getFlvRecordingId());
                    this.flvRecorderService.addRecordingByStreamId(current, streamid, currentClient, rcl.getFlvRecordingId());
View Full Code Here

                  if (rcl.getIsScreenClient() != null && rcl.getIsScreenClient()) {
                      //continue;
                    } else {
                    log.debug("is this users still alive? :"+rcl);
                    //conn.ping();
                    IServiceCapableConnection iStream = (IServiceCapableConnection) conn;
                    //log.info("IServiceCapableConnection ID " + iStream.getClient().getId());
                    iStream.invoke(clientFunction,new Object[] { rc }, this);
                  }
                 
                  log.debug("sending notification to " + conn+" ID: ");
       
                  //if this close stream event then stop the recording of this stream
View Full Code Here

                } else if (rcl.getIsScreenClient() != null && rcl.getIsScreenClient()) {
                    //continue;
                  } else {
                  //log.debug("is this users still alive? :"+rcl);
                  //Check if the Client is in the same room and same domain
                  IServiceCapableConnection iStream = (IServiceCapableConnection) conn;
                  //log.info("IServiceCapableConnection ID " + iStream.getClient().getId());
                  iStream.invoke("newRed5ScreenCursor",new Object[] { cursor }, this);
                  //log.debug("send Notification to");
                }
              }
            }
          }
View Full Code Here

  public boolean roomConnect(IConnection conn, Object[] params) {
    log.debug("roomConnect : ");

    try {

      IServiceCapableConnection service = (IServiceCapableConnection) conn;
      String streamId = conn.getClient().getId();
     
      boolean isAVClient = false;
      if (params.length == 1) {
        isAVClient = Boolean.valueOf("" + params[0]);
      }

      log.debug("### Client connected to OpenMeetings, register Client StreamId: "
          + streamId + " scope " + conn.getScope().getName()+ " isAVClient "+isAVClient);
      log.debug("params "+params);

      // Set StreamId in Client
      service.invoke("setId", new Object[] { streamId }, this);

      String swfURL = "";
      if (conn.getConnectParams().get("swfUrl") != null) {
        swfURL = conn.getConnectParams().get("swfUrl").toString();
      }
View Full Code Here

              if (rcl != null) {
                if (rcl.getIsScreenClient() != null && rcl.getIsScreenClient()) {
                  // continue;
                } else {
                  log.debug("is this users still alive? :" + rcl);
                  IServiceCapableConnection iStream = (IServiceCapableConnection) conn;
                  iStream.invoke(clientFunction, new Object[] { rc }, this);
                }

                log.debug("sending notification to " + conn + " ID: ");

                // if this close stream event then stop the
View Full Code Here

  public boolean roomConnect(IConnection conn, Object[] params) {
    log.debug("roomConnect : ");

    try {

      IServiceCapableConnection service = (IServiceCapableConnection) conn;
      String streamId = conn.getClient().getId();
     
      boolean isAVClient = false;
      if (params.length == 1) {
        isAVClient = Boolean.valueOf("" + params[0]);
      }

      log.debug("### Client connected to OpenMeetings, register Client StreamId: "
          + streamId + " scope " + conn.getScope().getName()+ " isAVClient "+isAVClient);
      log.debug("params "+params);

      // Set StreamId in Client
      service.invoke("setId", new Object[] { streamId }, this);

      String swfURL = "";
      if (conn.getConnectParams().get("swfUrl") != null) {
        swfURL = conn.getConnectParams().get("swfUrl").toString();
      }
View Full Code Here

TOP

Related Classes of org.red5.server.api.service.IServiceCapableConnection

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.