Package org.red5.server.api.service

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


                    // 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: ");
View Full Code Here


                  // 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

              state.set(State.values.motiondetectwatching, false);
              return;
            }
           
            state.set(State.values.framegrabbusy.name(), true);
            IServiceCapableConnection sc = (IServiceCapableConnection) grabber;
            sc.invoke("framegrabMedium", new Object[] {});
           
            while (state.getBoolean(State.values.framegrabbusy)) {
              int n = 0;
              Thread.sleep(5);
              n++;
View Full Code Here

    if (player != null) {
      pendingplayer = Red5.getConnectionLocal();
      pendingplayerisnull = false;

      if (pendingplayer instanceof IServiceCapableConnection) {
        IServiceCapableConnection sc = (IServiceCapableConnection) pendingplayer;
        String str = "connection PENDING user " + state.get(State.values.pendinguserconnected);
        if (authtoken != null) {
          // System.out.println("sending store cookie");
          str += " storecookie " + authtoken;
          authtoken =  null;
        }
        str += " someonealreadydriving " + state.get(State.values.driver.name());

        // this has to be last to above variables are already set in java script
        sc.invoke("message", new Object[] { null, "green", "multiple", str });
        str = state.get(State.values.pendinguserconnected) + " pending connection from: "
            + pendingplayer.getRemoteAddress();
       
        Util.log("playersignin(): " + str);
        messageGrabber(str, null);
        sc.invoke("videoSoundMode", new Object[] { videosoundmode });
      }
    } else {
      player = Red5.getConnectionLocal();
      state.set(State.values.driver.name(), state.get(State.values.pendinguserconnected));
      state.delete(State.values.pendinguserconnected);
      String str = "connection connected user " + state.get(State.values.driver.name());
      if (authtoken != null) {
        str += " storecookie " + authtoken;
        authtoken = null;
      }
      str += " streamsettings " + streamSettings();
      messageplayer(state.get(State.values.driver.name()) + " connected to OCULUS", "multiple", str);
      initialstatuscalled = false;
     
      str = state.get(State.values.driver.name()) + " connected from: " + player.getRemoteAddress();
      messageGrabber(str, "connection " + state.get(State.values.driver.name()) + " connected");
      Util.log("playersignin(), " + str, this);
      loginRecords.beDriver();
     
      if (settings.getBoolean(GUISettings.loginnotify)) {
        saySpeech("lawg inn " + state.get(State.values.driver));
      }
     
      IServiceCapableConnection sc = (IServiceCapableConnection) player;
      sc.invoke("videoSoundMode", new Object[] { videosoundmode });
      Util.log("player video sound mode = "+videosoundmode, this);
    }
  }
View Full Code Here

          for (Set<IConnection> cc : concollection) {
            for (IConnection con : cc) {
              if (con instanceof IServiceCapableConnection
                  && con != grabber
                  && !(con == pendingplayer && !pendingplayerisnull)) {
                IServiceCapableConnection n = (IServiceCapableConnection) con;
                n.invoke("message", new Object[] {
                    "streaming " + stream, "green",
                    "stream", stream });
                Util.debug("message all players: streaming " + stream +" stream " +stream,this);
              }
            }
View Full Code Here

    if (state.get(State.values.stream) == null) {
      messageplayer("stream control unavailable, server may be in setup mode", null, null);
      return;
    }
   
    IServiceCapableConnection sc = (IServiceCapableConnection) grabber;
    sc.invoke("videoSoundMode", new Object[] { str });
    state.set(State.values.videosoundmode.name(), str);
    Util.log("grabber video sound mode = "+str, this);
  }
View Full Code Here

    }

    try {
      // commands: camandmic camera mic stop
      if (grabber instanceof IServiceCapableConnection) {
        IServiceCapableConnection sc = (IServiceCapableConnection) grabber;
        String current = settings.readSetting("vset");
        String vals[] = (settings.readSetting(current)).split("_");
        int width = Integer.parseInt(vals[0]);
        int height = Integer.parseInt(vals[1]);
        int fps = Integer.parseInt(vals[2]);
        int quality = Integer.parseInt(vals[3]);
        sc.invoke("publish", new Object[] { str, width, height, fps, quality });
        // messageGrabber("stream "+str);
        messageplayer("command received: publish " + str, null, null);
//        state.set(PlayerCommands.publish, str);
//        state.set(State.values.stream, str);
        Util.log("publish: " + str, this);
View Full Code Here

    String stream = state.get(State.values.stream);
    if (grabber == null) return;
    if (stream == null) return;
    if (grabber instanceof IServiceCapableConnection
        && (stream.equals("camandmic") || stream.equals("mic"))) {
      IServiceCapableConnection sc = (IServiceCapableConnection) grabber;
      sc.invoke("muteROVMic", new Object[] {});
    }
  }
View Full Code Here

    String stream = state.get(State.values.stream);
    if (grabber == null) return;
    if (stream == null) return;
    if (grabber instanceof IServiceCapableConnection
        && (stream.equals("camandmic") || stream.equals("mic"))) {
      IServiceCapableConnection sc = (IServiceCapableConnection) grabber;
      sc.invoke("unmuteROVMic", new Object[] {});
    }
  }
View Full Code Here

       messageplayer("stream unavailable or framegrab busy, command dropped", null, null);
       return false;
     }

    if (grabber instanceof IServiceCapableConnection) {
      IServiceCapableConnection sc = (IServiceCapableConnection) grabber;
      sc.invoke("framegrab", new Object[] {});
      state.set(State.values.framegrabbusy.name(), true);
    }
    return true;
  }
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.