Package com.kurento.kmf.content

Examples of com.kurento.kmf.content.ContentCommandResult


    String cmdData = command.getData();
    getLogger().info("onContentCommand: ({}, {})", cmdType, cmdData);

    if (COMMAND_GET_PARTICIPANTS.equalsIgnoreCase(cmdType)) {
      String json = gson.toJson(participants.values());
      return new ContentCommandResult(json);
    } else if (COMMAND_SELECT.equalsIgnoreCase(cmdType)) {
      return new ContentCommandResult(Boolean.toString(selectParticipant(
          session, cmdData)));
    } else if (COMMAND_CONNECT.equalsIgnoreCase(cmdType)) {
      Type listType = new TypeToken<List<String>>() {
      }.getType();
      List<String> idList = gson.fromJson(cmdData, listType);
      if (idList.size() != 2) {
        return new ContentCommandResult(Boolean.FALSE.toString());
      }
      return new ContentCommandResult(
          Boolean.toString(connectParticipant(idList.get(0),
              idList.get(1))));
    }
    return super.onContentCommand(session, command);
  }
View Full Code Here


    if (contentCommand.getType().equalsIgnoreCase("player1")) {
      mixer.setSource(hubPort1);
    } else if (contentCommand.getType().equalsIgnoreCase("player2")) {
      mixer.setSource(hubPort2);
    }
    return new ContentCommandResult(contentCommand.getData());
  }
View Full Code Here

    } else if ("pause".equalsIgnoreCase(contentCommand.getType())) {
      player.pause();
    } else if ("play".equalsIgnoreCase(contentCommand.getType())) {
      player.play();
    }
    return new ContentCommandResult(contentCommand.getData());
  }
View Full Code Here

      throws Exception {
    if ("changeWidth".equalsIgnoreCase(contentCommand.getType())) {
      plateDetector.setPlateWidthPercentage(Float
          .parseFloat(contentCommand.getData()));
    }
    return new ContentCommandResult(contentCommand.getData());
  }
View Full Code Here

              }
            });
      }
    }

    return new ContentCommandResult(contentCommand.getData());
  }
View Full Code Here

    String cmdData = command.getData();
    getLogger().info("onContentCommand: ({}, {})", cmdType, cmdData);

    if (COMMAND_GET_PARTICIPANTS.equalsIgnoreCase(cmdType)) {
      String json = gson.toJson(participants.values());
      return new ContentCommandResult(json);
    } else if (COMMAND_SELECT.equalsIgnoreCase(cmdType)) {
      return new ContentCommandResult(Boolean.toString(selectParticipant(
          session, cmdData)));
    } else if (COMMAND_CONNECT.equalsIgnoreCase(cmdType)) {
      Type listType = new TypeToken<List<String>>() {
      }.getType();
      List<String> idList = gson.fromJson(cmdData, listType);
      if (idList.size() != 2) {
        return new ContentCommandResult(Boolean.FALSE.toString());
      }
      return new ContentCommandResult(
          Boolean.toString(connectParticipant(idList.get(0),
              idList.get(1))));
    }
    return super.onContentCommand(session, command);
  }
View Full Code Here

TOP

Related Classes of com.kurento.kmf.content.ContentCommandResult

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.