Package org.apache.openmeetings.db.entity.record

Examples of org.apache.openmeetings.db.entity.record.FlvRecording


      Client currentClient = sessionManager.getClientByStreamId(current.getClient().getId(), null);
      Long room_id = currentClient.getRoom_id();

      Date now = new Date();

      FlvRecording flvRecording = new FlvRecording();

      flvRecording.setFileHash("");
      flvRecording.setFileName(roomRecordingName);
      flvRecording.setInsertedBy(currentClient.getUser_id());
      flvRecording.setFolder(false);
      flvRecording.setIsImage(false);
      flvRecording.setIsPresentation(false);
      flvRecording.setIsRecording(true);
      flvRecording.setComment(comment);
      flvRecording.setIsInterview(isInterview);

      flvRecording.setRoom_id(room_id);
      flvRecording.setRecordStart(now);

      flvRecording.setWidth(currentClient.getVWidth());
      flvRecording.setHeight(currentClient.getVHeight());

      flvRecording.setOwnerId(currentClient.getUser_id());
      flvRecording.setStatus(FlvRecording.Status.PROCESSING);
      flvRecording = recordingDao.update(flvRecording);
      // Receive flvRecordingId
      Long flvRecordingId = flvRecording.getFlvRecordingId();

      // Update Client and set Flag
      currentClient.setIsRecording(true);
      currentClient.setFlvRecordingId(flvRecordingId);
      sessionManager.updateClientByStreamId(current.getClient().getId(), currentClient, false, null);
View Full Code Here


        currentClient.setIsRecording(false);

        sessionManager.updateClientByStreamId(currentClient.getStreamid(), currentClient, false, null);
        log.debug("flvRecorderConverterTask ", flvRecorderConverterTask);

        FlvRecording flvRecording = flvRecordingDaoImpl.get(flvRecordingId);
        if (flvRecording.getIsInterview() == null || !flvRecording.getIsInterview()) {
          flvRecorderConverterTask.startConversionThread(flvRecordingId);
        } else {
          flvInterviewConverterTask.startConversionThread(flvRecordingId);
        }
      }
View Full Code Here

    }
  }

  public void addRecordingByStreamId(IConnection conn, String streamId, Client rcl, Long flvRecordingId) {
    try {
      FlvRecording flvRecording = flvRecordingDaoImpl.get(flvRecordingId);

      Date now = new Date();

      // If its the recording client we need another type of Meta Data
      if (rcl.getIsScreenClient()) {
        if (rcl.getFlvRecordingId() != null && rcl.isScreenPublishStarted()) {
          String streamName_Screen = generateFileName(flvRecordingId, rcl.getStreamPublishName().toString());

          log.debug("##############  ADD SCREEN OF SHARER :: " + rcl.getStreamPublishName());

          Long flvRecordingMetaDataId = metaDataDao.addFlvRecordingMetaData(flvRecordingId, rcl.getFirstname()
              + " " + rcl.getLastname(), now, false, false, true, streamName_Screen, rcl.getInterviewPodId());

          // Start FLV Recording
          recordShow(conn, rcl.getStreamPublishName(), streamName_Screen, flvRecordingMetaDataId, true,
              flvRecording.getIsInterview());

          // Add Meta Data
          rcl.setFlvRecordingMetaDataId(flvRecordingMetaDataId);

          sessionManager.updateClientByStreamId(rcl.getStreamid(), rcl, false, null);
        }
      } else if (rcl.getIsAVClient()
          && (rcl.getAvsettings().equals("av") || rcl.getAvsettings().equals("a") || rcl.getAvsettings().equals("v"))) {
        // if the user does publish av, a, v
        // But we only record av or a, video only is not interesting

        String streamName = generateFileName(flvRecordingId, String.valueOf(rcl.getBroadCastID()).toString());

        // Add Meta Data
        boolean isAudioOnly = false;
        if (rcl.getAvsettings().equals("a")) {
          isAudioOnly = true;
        }
        boolean isVideoOnly = false;
        if (rcl.getAvsettings().equals("v")) {
          isVideoOnly = true;
        }

        Long flvRecordingMetaDataId = metaDataDao.addFlvRecordingMetaData(flvRecordingId, rcl.getFirstname() + " "
            + rcl.getLastname(), now, isAudioOnly, isVideoOnly, false, streamName, rcl.getInterviewPodId());

        // Start FLV recording
        recordShow(conn, String.valueOf(rcl.getBroadCastID()).toString(), streamName, flvRecordingMetaDataId, false,
            flvRecording.getIsInterview());

        rcl.setFlvRecordingMetaDataId(flvRecordingMetaDataId);

        sessionManager.updateClientByStreamId(rcl.getStreamid(), rcl, false, null);
View Full Code Here

      Long user_level = userManager.getUserLevelByID(users_id);
      if (AuthLevelUtil.checkUserLevel(user_level)) {

        log.debug("updateFileOrFolderName " + flvRecordingId);

        FlvRecording flvRecording = flvRecordingDaoImpl.get(flvRecordingId);

        flvRecording.setPreviewImage(null);

        flvRecording.setProgressPostProcessing(0);

        flvRecordingDaoImpl.update(flvRecording);

        if (flvRecording.getIsInterview() == null || !flvRecording.getIsInterview()) {
          flvRecorderConverterTask.startConversionThread(flvRecordingId);
        } else {
          flvInterviewReConverterTask.startConversionThread(flvRecordingId, leftSideLoud, rightSideLoud, leftSideTime,
              rightSideTime);
        }
View Full Code Here

  public FlvRecording get(Long flvRecordingId) {
    try {
      TypedQuery<FlvRecording> query = em.createNamedQuery("getRecordingById", FlvRecording.class);
      query.setParameter("id", flvRecordingId);

      FlvRecording flvRecording = null;
      try {
        flvRecording = query.getSingleResult();
      } catch (NoResultException ex) {
      }
      return flvRecording;
View Full Code Here

  }

  public void updateFlvRecordingEndTime(Long flvRecordingId, Date recordEnd, Long organization_id) {
    try {

      FlvRecording fId = get(flvRecordingId);

      fId.setProgressPostProcessing(0);
      fId.setRecordEnd(recordEnd);
      fId.setOrganization_id(organization_id);

      update(fId);
    } catch (Exception ex2) {
      log.error("[deleteFileExplorerItem]: ", ex2);
    }
View Full Code Here

   * @param fileExplorerItemId
   */
  public boolean delete(Long flvRecordingId) {
    try {

      FlvRecording f = get(flvRecordingId);
      return delete(f);
    } catch (Exception ex2) {
      log.error("[delete]: ", ex2);
    }

View Full Code Here

  public FlvRecording get(Long flvRecordingId) {
    try {
      TypedQuery<FlvRecording> query = em.createNamedQuery("getRecordingById", FlvRecording.class);
      query.setParameter("id", flvRecordingId);

      FlvRecording flvRecording = null;
      try {
        flvRecording = query.getSingleResult();
      } catch (NoResultException ex) {
      }
      return flvRecording;
View Full Code Here

  public Long addFlvRecording(String fileHash, String fileName, Long fileSize, Long user_id, Long room_id,
      Date recordStart, Date recordEnd, Long ownerId, String comment, String recorderStreamId, Integer width,
      Integer height, Boolean isInterview) {
    try {

      FlvRecording flvRecording = new FlvRecording();

      flvRecording.setDeleted(false);
      flvRecording.setFileHash(fileHash);
      flvRecording.setFileName(fileName);
      flvRecording.setFileSize(fileSize);
      flvRecording.setInsertedBy(user_id);
      flvRecording.setFolder(false);
      flvRecording.setIsImage(false);
      flvRecording.setIsPresentation(false);
      flvRecording.setIsRecording(true);
      flvRecording.setComment(comment);
      flvRecording.setIsInterview(isInterview);

      flvRecording.setRoom_id(room_id);
      flvRecording.setRecordStart(recordStart);
      flvRecording.setRecordEnd(recordEnd);

      flvRecording.setWidth(width);
      flvRecording.setHeight(height);

      flvRecording.setOwnerId(ownerId);

      flvRecording = update(flvRecording);
      return flvRecording.getFlvRecordingId();
    } catch (Exception ex2) {
      log.error("[addFlvRecording]: ", ex2);
    }
    return null;
  }
View Full Code Here

  }

  public void updateFlvRecordingEndTime(Long flvRecordingId, Date recordEnd, Long organization_id) {
    try {

      FlvRecording fId = get(flvRecordingId);

      fId.setProgressPostProcessing(0);
      fId.setRecordEnd(recordEnd);
      fId.setOrganization_id(organization_id);

      update(fId);
    } catch (Exception ex2) {
      log.error("[deleteFileExplorerItem]: ", ex2);
    }
View Full Code Here

TOP

Related Classes of org.apache.openmeetings.db.entity.record.FlvRecording

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.