示例#1
0
  public SDKErrorCode setVideoSourceEx(
      String confId, String siteUri, String videoSourceUri, Integer isLock) throws SDKException {
    SDKErrorCode errorCode = new SDKErrorCode();
    if (StringUtils.isEmpty(confId)) {
      errorCode.setErrCode(ErrInfo.CONF_ID_ISNULL_ERRORCODE);
      return errorCode;
    }
    if (!StringUtils.isUintNumber(confId)) {
      errorCode.setErrCode(ErrInfo.CONF_ID_IS_INVALID_ERRORCODE);
      return errorCode;
    }
    if (StringUtils.isEmpty(siteUri) || StringUtils.isEmpty(videoSourceUri)) {
      errorCode.setErrCode(ErrInfo.SITE_URI_ISNULL_ERRORCODE);
      return errorCode;
    }
    Boolean isLck;
    if (null != isLock && 1 == isLock) {
      isLck = true;
    } else if (null != isLock && 0 == isLock) {
      isLck = false;
    } else {
      errorCode.setErrCode(ErrInfo.DATA_ERRORCODE);
      return errorCode;
    }
    HoldingConference holdingConference = new HoldingConference(confId);
    errorCode = holdingConference.setVideoSourceOfSite(siteUri, videoSourceUri, isLck);

    return errorCode;
  }
示例#2
0
  public SDKErrorCode setContinuousPresenceEx(
      String confId, ContinuousPresenceParam continuousPresenceParam) throws SDKException {
    SDKErrorCode result = new SDKErrorCode();
    if (StringUtils.isEmpty(confId)) {
      result.setErrCode(ErrInfo.CONF_ID_ISNULL_ERRORCODE);
      return result;
    }
    if (!StringUtils.isUintNumber(confId)) {
      result.setErrCode(ErrInfo.CONF_ID_IS_INVALID_ERRORCODE);
      return result;
    }

    // DTS2015012306064,target为可选的
    if (null == continuousPresenceParam || null == continuousPresenceParam.getPresenceMode())
    //    || null == continuousPresenceParam.getTarget())
    {
      result.setErrCode(ErrInfo.SDK_PARAM_NOT_COMPLETE_ERRORCODE);
      return result;
    }

    // R5C00屏蔽查询会场和资源的接口,不再需要,性能很差
    // 准备Model
    HoldingConference holdingConference = new HoldingConference(confId);

    // 调用model
    result = holdingConference.setContinuousPresenceEx(continuousPresenceParam);
    return result;
  }
示例#3
0
  public SDKErrorCode setAudioSwitchEx(String confId, Integer isSwitch, Integer swtichGate)
      throws SDKException {
    SDKErrorCode result = new SDKErrorCode();
    boolean enable = false;
    if (StringUtils.isEmpty(confId)) {
      result.setErrCode(ErrInfo.CONF_ID_ISNULL_ERRORCODE);
      return result;
    }
    if (!StringUtils.isUintNumber(confId)) {
      result.setErrCode(ErrInfo.CONF_ID_IS_INVALID_ERRORCODE);
      return result;
    }

    if (null == swtichGate) {
      swtichGate =
          Integer.parseInt(
              ConfigManager.getInstance()
                  .getValue("professional.setAudioSwitch.switchGateDefaultVal"));
    }

    int switchGateMaxVal =
        Integer.parseInt(
            ConfigManager.getInstance().getValue("professional.setAudioSwitch.switchGateMaxVal"));
    int switchGateMinVal =
        Integer.parseInt(
            ConfigManager.getInstance().getValue("professional.setAudioSwitch.switchGateMinVal"));

    if (switchGateMinVal > swtichGate || switchGateMaxVal < swtichGate) {
      result.setErrCode(ErrInfo.PARAM_OUTOFRANGE_ERRORCODE);
      return result;
    }

    if (null == isSwitch) {
      result.setErrCode(ErrInfo.CONTROL_CODE_IS_NULL_ERRORCODE);
      return result;
    }

    if (1 == isSwitch) {
      enable = true;
    } else if (0 == isSwitch) {
      enable = false;
    } else {
      result.setErrCode(ErrInfo.CONTROL_CODE_IS_INCORRECT_ERRORCODE);
      return result;
    }

    // 准备Model
    HoldingConference conferenceAudioSwitch = new HoldingConference(confId);
    // 调用model
    result = conferenceAudioSwitch.setAudioSwitchEX(enable, swtichGate);

    return result;
  }
示例#4
0
  public SDKErrorCode setBroadcastContinuousPresenceEx(String confId, Integer isBroadcast)
      throws SDKException {
    SDKErrorCode result = new SDKErrorCode();

    if (StringUtils.isEmpty(confId)) {
      result.setErrCode(ErrInfo.CONF_ID_ISNULL_ERRORCODE);
      return result;
    }
    if (!StringUtils.isUintNumber(confId)) {
      result.setErrCode(ErrInfo.CONF_ID_IS_INVALID_ERRORCODE);
      return result;
    }
    if (null == isBroadcast) {
      result.setErrCode(ErrInfo.CONTROL_CODE_IS_NULL_ERRORCODE);
      return result;
    }

    HoldingConference holdingConference = new HoldingConference(confId);
    SDKResult<ContinuousPresenceCapability> cpcapaResult =
        holdingConference.getContinuousPresenceInfoEx();

    // 判断会议是否支持多画面
    if (0 != cpcapaResult.getErrCode()) {
      result.setErrCode(cpcapaResult.getErrCode());
      return result;
    }

    if (0 == isBroadcast) {
      result = holdingConference.setBroadcastContinuousPresenceEx();
    } else if (1 == isBroadcast) {
      // edit by gaolinfei
      // 用于取消广播多画面
      result = holdingConference.cancelBroadcastContinuousPresenceEx();
      // edit end
    } else {
      result.setErrCode(ErrInfo.CONTROL_CODE_IS_INCORRECT_ERRORCODE);
    }

    return result;
  }
示例#5
0
  public SDKErrorCode setBroadcastSiteEx(String confId, String siteUri, Integer isBroadcast)
      throws SDKException {
    SDKErrorCode result = new SDKErrorCode();

    if (StringUtils.isEmpty(confId)) {
      result.setErrCode(ErrInfo.CONF_ID_ISNULL_ERRORCODE);
      return result;
    }
    if (!StringUtils.isUintNumber(confId)) {
      result.setErrCode(ErrInfo.CONF_ID_IS_INVALID_ERRORCODE);
      return result;
    }
    if (StringUtils.isEmpty(siteUri)) {
      result.setErrCode(ErrInfo.SITE_URI_ISNULL_ERRORCODE);
      return result;
    }
    if (null == isBroadcast) {
      result.setErrCode(ErrInfo.CONTROL_CODE_IS_NULL_ERRORCODE);
      return result;
    }

    if (0 == isBroadcast) {
      // 准备Model
      HoldingConference holdingConference = new HoldingConference(confId);
      // 调用model 开始广播
      result = holdingConference.setBroadcastSiteEx(siteUri);
    } else if (1 == isBroadcast) {
      // 准备Model
      HoldingConference holdingConference = new HoldingConference(confId);
      // 调用model 开始广播
      result = holdingConference.cancelBroadcastSiteEx(siteUri);
      //            result.setErrCode(ErrInfo.PARAM_IS_RESERVE_ERRORCODE);
    } else {
      result.setErrCode(ErrInfo.CONTROL_CODE_IS_INCORRECT_ERRORCODE);
    }

    return result;
  }