You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openmeetings.apache.org by so...@apache.org on 2016/09/18 12:01:46 UTC
svn commit: r1761322 [1/2] - in /openmeetings/application:
branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/converter/
branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/data/file/
branches/3.2.x/open...
Author: solomax
Date: Sun Sep 18 12:01:46 2016
New Revision: 1761322
URL: http://svn.apache.org/viewvc?rev=1761322&view=rev
Log:
[OPENMEETINGS-1457] room foles and recordings seems to work as expected
Removed:
openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/ConferenceService.java
openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/ConferenceService.java
Modified:
openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/converter/FlvExplorerConverter.java
openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/converter/InterviewConverter.java
openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/converter/RecordingConverter.java
openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/data/file/FileProcessor.java
openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/ConferenceLibrary.java
openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java
openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/room/RoomDao.java
openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/file/FileItem.java
openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/file/FileItemLog.java
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/flexibleConferenceRoom/roomSidebar/baseRoomSidebar.lzx
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/base/baseDrawObject.lzx
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/base/whiteboardVideoPlayer.lzx
openmeetings/application/branches/3.2.x/openmeetings-util/src/main/java/org/apache/openmeetings/util/StoredFile.java
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/webapp/WEB-INF/classes/openmeetings-applicationContext.xml
openmeetings/application/branches/3.2.x/openmeetings-webservice/src/main/java/org/apache/openmeetings/webservice/UserWebService.java
openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/converter/FlvExplorerConverter.java
openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/converter/InterviewConverter.java
openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/converter/RecordingConverter.java
openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/data/file/FileProcessor.java
openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/ConferenceLibrary.java
openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java
openmeetings/application/trunk/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/room/RoomDao.java
openmeetings/application/trunk/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/file/FileItem.java
openmeetings/application/trunk/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/file/FileItemLog.java
openmeetings/application/trunk/openmeetings-util/src/main/java/org/apache/openmeetings/util/StoredFile.java
openmeetings/application/trunk/openmeetings-web/src/main/webapp/WEB-INF/classes/openmeetings-applicationContext.xml
openmeetings/application/trunk/openmeetings-webservice/src/main/java/org/apache/openmeetings/webservice/UserWebService.java
Modified: openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/converter/FlvExplorerConverter.java
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/converter/FlvExplorerConverter.java?rev=1761322&r1=1761321&r2=1761322&view=diff
==============================================================================
--- openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/converter/FlvExplorerConverter.java (original)
+++ openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/converter/FlvExplorerConverter.java Sun Sep 18 12:01:46 2016
@@ -18,8 +18,8 @@
*/
package org.apache.openmeetings.core.converter;
-import static org.apache.openmeetings.util.OmFileHelper.EXTENSION_MP4;
import static org.apache.openmeetings.util.OmFileHelper.EXTENSION_JPG;
+import static org.apache.openmeetings.util.OmFileHelper.EXTENSION_MP4;
import static org.apache.openmeetings.util.OpenmeetingsVariables.webAppRootKey;
import java.io.File;
@@ -29,7 +29,6 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.apache.openmeetings.db.dao.file.FileExplorerItemDao;
-import org.apache.openmeetings.db.dao.file.FileItemLogDao;
import org.apache.openmeetings.db.entity.file.FileExplorerItem;
import org.apache.openmeetings.db.entity.file.FileItem.Type;
import org.apache.openmeetings.util.process.ConverterProcessResult;
@@ -45,8 +44,6 @@ public class FlvExplorerConverter extend
// Spring loaded Beans
@Autowired
private FileExplorerItemDao fileDao;
- @Autowired
- private FileItemLogDao fileLogDao;
private static class FlvDimension {
public FlvDimension(int width, int height) {
@@ -58,43 +55,43 @@ public class FlvExplorerConverter extend
}
public List<ConverterProcessResult> convertToMP4(FileExplorerItem f, String ext) {
- List<ConverterProcessResult> returnLog = new ArrayList<ConverterProcessResult>();
+ List<ConverterProcessResult> logs = new ArrayList<ConverterProcessResult>();
try {
File mp4 = f.getFile(EXTENSION_MP4);
f.setType(Type.Video);
+ ConverterProcessResult res;
+ if (EXTENSION_MP4.equals(ext)) {
+ String[] args = new String[] { getPathToFFMPEG(), "-i", f.getFile(ext).getCanonicalPath() };
+ res = ProcessHelper.executeScript("Info ID :: " + f.getId(), args);
+ res.setExitCode(0); //normal code is 1, ffmpeg requires output file
+ } else {
+ String[] args = new String[] { getPathToFFMPEG(), "-y", "-i", f.getFile(ext).getCanonicalPath(),
+ "-c:a", "aac", "-c:v", "h264", mp4.getCanonicalPath() };
+ res = ProcessHelper.executeScript("uploadFLV ID :: " + f.getId(), args);
- String[] argv_fullFLV = new String[] { getPathToFFMPEG(), "-y", "-i", f.getFile(ext).getCanonicalPath(),
- "-c:a", "aac", "-c:v", "h264", mp4.getCanonicalPath() };
-
- ConverterProcessResult returnMapConvertFLV = ProcessHelper.executeScript("uploadFLV ID :: " + f.getId(), argv_fullFLV);
-
+ }
+ logs.add(res);
//Parse the width height from the FFMPEG output
- FlvDimension flvDimension = getFlvDimension(returnMapConvertFLV.getError());
- int flvWidth = flvDimension.width;
- int flvHeight = flvDimension.height;
-
- f.setFlvWidth(flvWidth);
- f.setFlvHeight(flvHeight);
-
- returnLog.add(returnMapConvertFLV);
-
+ FlvDimension dim = getFlvDimension(res.getError());
+ f.setFlvWidth(dim.width);
+ f.setFlvHeight(dim.height);
File jpeg = f.getFile(EXTENSION_JPG);
String[] argv_previewFLV = new String[] { getPathToFFMPEG(), "-y", "-i",
mp4.getCanonicalPath(), "-codec:v", "mjpeg", "-vframes", "1", "-an",
- "-f", "rawvideo", "-s", flvWidth + "x" + flvHeight,
+ "-f", "rawvideo", "-s", dim.width + "x" + dim.height,
jpeg.getCanonicalPath() };
- returnLog.add(ProcessHelper.executeScript("previewUpload ID :: " + f.getId(), argv_previewFLV));
+ logs.add(ProcessHelper.executeScript("previewUpload ID :: " + f.getId(), argv_previewFLV));
fileDao.update(f);
} catch (Exception err) {
log.error("[convertToFLV]", err);
- returnLog.add(new ConverterProcessResult("convertToMP4", err.getMessage(), err));
+ logs.add(new ConverterProcessResult("convertToMP4", err.getMessage(), err));
}
- return returnLog;
+ return logs;
}
private static FlvDimension getFlvDimension(String txt) throws Exception {
Modified: openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/converter/InterviewConverter.java
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/converter/InterviewConverter.java?rev=1761322&r1=1761321&r2=1761322&view=diff
==============================================================================
--- openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/converter/InterviewConverter.java (original)
+++ openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/converter/InterviewConverter.java Sun Sep 18 12:01:46 2016
@@ -29,6 +29,7 @@ import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
+import java.util.UUID;
import org.apache.openmeetings.db.dao.file.FileItemLogDao;
import org.apache.openmeetings.db.dao.record.RecordingDao;
@@ -38,6 +39,7 @@ import org.apache.openmeetings.db.entity
import org.apache.openmeetings.util.OmFileHelper;
import org.apache.openmeetings.util.process.ConverterProcessResult;
import org.apache.openmeetings.util.process.ProcessHelper;
+import org.apache.wicket.util.string.Strings;
import org.red5.logging.Red5LoggerFactory;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
@@ -63,9 +65,9 @@ public class InterviewConverter extends
private String[] mergeAudioToWaves(List<File> waveFiles, File wav,
List<RecordingMetaData> metaDataList, ReConverterParams rcv) throws IOException {
- String[] argv_full_sox = new String[waveFiles.size() + 5];
- argv_full_sox[0] = this.getPathToSoX();
- argv_full_sox[1] = "-m";
+ String[] cmdSox = new String[waveFiles.size() + 5];
+ cmdSox[0] = this.getPathToSoX();
+ cmdSox[1] = "-m";
int counter = 2;
for (File _wav : waveFiles) {
@@ -74,22 +76,22 @@ public class InterviewConverter extends
if (hashFileFullNameStored.equals(_wav.getName())) {
if (metaData.getInteriewPodId() == 1) {
- argv_full_sox[counter] = "-v " + rcv.leftSideLoud;
+ cmdSox[counter] = "-v " + rcv.leftSideLoud;
counter++;
}
if (metaData.getInteriewPodId() == 2) {
- argv_full_sox[counter] = "-v " + rcv.rightSideLoud;
+ cmdSox[counter] = "-v " + rcv.rightSideLoud;
counter++;
}
}
}
- argv_full_sox[counter] = _wav.getCanonicalPath();
+ cmdSox[counter] = _wav.getCanonicalPath();
counter++;
}
- argv_full_sox[counter] = wav.getCanonicalPath();
+ cmdSox[counter] = wav.getCanonicalPath();
- return argv_full_sox;
+ return cmdSox;
}
@Override
@@ -102,15 +104,18 @@ public class InterviewConverter extends
try {
r = recordingDao.get(id);
log.debug("recording " + r.getId());
+ if (Strings.isEmpty(r.getHash())) {
+ r.setHash(UUID.randomUUID().toString());
+ }
r.setStatus(Recording.Status.CONVERTING);
r = recordingDao.update(r);
- List<ConverterProcessResult> returnLog = new ArrayList<>();
+ List<ConverterProcessResult> logs = new ArrayList<>();
List<File> waveFiles = new ArrayList<>();
File streamFolder = getStreamFolder(r);
List<RecordingMetaData> metaDataList = metaDataDao.getAudioMetaDataByRecording(r.getId());
- stripAudioFirstPass(r, returnLog, waveFiles, streamFolder, metaDataList);
+ stripAudioFirstPass(r, logs, waveFiles, streamFolder, metaDataList);
// Merge Wave to Full Length
File streamFolderGeneral = getStreamsHibernateDir();
@@ -128,7 +133,7 @@ public class InterviewConverter extends
argv_full_sox = mergeAudioToWaves(waveFiles, wav);
}
- returnLog.add(ProcessHelper.executeScript("mergeAudioToWaves", argv_full_sox));
+ logs.add(ProcessHelper.executeScript("mergeAudioToWaves", argv_full_sox));
} else {
// create default Audio to merge it.
// strip to content length
@@ -137,9 +142,9 @@ public class InterviewConverter extends
// Calculate delta at beginning
double deltaPadding = diffSeconds(r.getRecordEnd(), r.getRecordStart());
- String[] argv_full_sox = new String[] { getPathToSoX(), outputWav.getCanonicalPath(), wav.getCanonicalPath(), "pad", "0", "" + deltaPadding };
+ String[] cmdSox = new String[] { getPathToSoX(), outputWav.getCanonicalPath(), wav.getCanonicalPath(), "pad", "0", "" + deltaPadding };
- returnLog.add(ProcessHelper.executeScript("generateSampleAudio", argv_full_sox));
+ logs.add(ProcessHelper.executeScript("generateSampleAudio", cmdSox));
}
// Default Image for empty interview video pods
final File defaultInterviewImageFile = new File(streamFolderGeneral, "default_interview_image.png");
@@ -172,7 +177,7 @@ public class InterviewConverter extends
, "-f", "null"
, "file.null"};
ConverterProcessResult res = ProcessHelper.executeScript("checkFlvPod_" + pod , args);
- returnLog.add(res);
+ logs.add(res);
if (res.isOk()) {
//TODO need to remove smallest gap
long diff = diff(meta.getRecordStart(), meta.getRecording().getRecordStart());
@@ -188,7 +193,7 @@ public class InterviewConverter extends
, "-t", formatMillis(diff) //
, "-pix_fmt", "yuv420p" //
, podPB };
- returnLog.add(ProcessHelper.executeScript("blankFlvPod_" + pod , argsPodB));
+ logs.add(ProcessHelper.executeScript("blankFlvPod_" + pod , argsPodB));
//ffmpeg -y -i out.flv -i rec_15_stream_4_2014_07_15_20_41_03.flv -filter_complex '[0:0]setsar=1/1[sarfix];[1:0]scale=320:260,setsar=1/1[scale];[sarfix] [scale] concat=n=2:v=1:a=0 [v]' -map '[v]' output1.flv
File podF = new File(streamFolder, OmFileHelper.getName(meta.getStreamName() + "_pod_" + pod, EXTENSION_FLV));
@@ -199,7 +204,7 @@ public class InterviewConverter extends
, "-filter_complex", String.format("[0:0]setsar=1/1[sarfix];[1:0]scale=%1$d:%2$d,setsar=1/1[scale];[sarfix] [scale] concat=n=2:v=1:a=0 [v]", flvWidth, flvHeight) //
, "-map", "[v]" //
, podP };
- returnLog.add(ProcessHelper.executeScript("shiftedFlvPod_" + pod , argsPod));
+ logs.add(ProcessHelper.executeScript("shiftedFlvPod_" + pod , argsPod));
pods[pod - 1] = podP;
} else {
@@ -213,7 +218,8 @@ public class InterviewConverter extends
ConverterProcessResult res = new ConverterProcessResult();
res.setProcess("CheckFlvFilesExists");
res.setError("No valid pods found");
- returnLog.add(res);
+ res.setExitCode(-1);
+ logs.add(res);
return;
}
boolean shortest = false;
@@ -255,7 +261,7 @@ public class InterviewConverter extends
File flv = r.getFile(EXTENSION_FLV);
args.add(flv.getCanonicalPath());
// TODO additional flag to 'quiet' output should be added
- returnLog.add(ProcessHelper.executeScript("generateFullBySequenceFLV", args.toArray(new String[]{})));
+ logs.add(ProcessHelper.executeScript("generateFullBySequenceFLV", args.toArray(new String[]{})));
r.setFlvWidth(2 * flvWidth);
r.setFlvHeight(flvHeight);
@@ -276,21 +282,21 @@ public class InterviewConverter extends
"-s", (2 * flvWidth) + "x" + flvHeight, //
jpg.getCanonicalPath() };
- returnLog.add(ProcessHelper.executeScript("generateFullFLV", argv_previewFLV));
+ logs.add(ProcessHelper.executeScript("generateFullFLV", argv_previewFLV));
File avi = r.getFile(EXTENSION_AVI);
deleteFileIfExists(avi);
String[] argv_alternateDownload = new String[] { getPathToFFMPEG(), "-y", "-i", flv.getCanonicalPath(), avi.getCanonicalPath() };
- returnLog.add(ProcessHelper.executeScript("alternateDownload", argv_alternateDownload));
+ logs.add(ProcessHelper.executeScript("alternateDownload", argv_alternateDownload));
updateDuration(r);
- convertToMp4(r, returnLog);
+ convertToMp4(r, logs);
r.setStatus(Recording.Status.PROCESSED);
logDao.delete(r);
- for (ConverterProcessResult returnMap : returnLog) {
+ for (ConverterProcessResult returnMap : logs) {
logDao.add("generateFFMPEG", r, returnMap);
}
Modified: openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/converter/RecordingConverter.java
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/converter/RecordingConverter.java?rev=1761322&r1=1761321&r2=1761322&view=diff
==============================================================================
--- openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/converter/RecordingConverter.java (original)
+++ openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/converter/RecordingConverter.java Sun Sep 18 12:01:46 2016
@@ -26,6 +26,7 @@ import static org.apache.openmeetings.ut
import java.io.File;
import java.util.ArrayList;
import java.util.List;
+import java.util.UUID;
import org.apache.openmeetings.db.dao.file.FileItemLogDao;
import org.apache.openmeetings.db.dao.record.RecordingDao;
@@ -36,6 +37,7 @@ import org.apache.openmeetings.db.entity
import org.apache.openmeetings.util.OmFileHelper;
import org.apache.openmeetings.util.process.ConverterProcessResult;
import org.apache.openmeetings.util.process.ProcessHelper;
+import org.apache.wicket.util.string.Strings;
import org.red5.logging.Red5LoggerFactory;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
@@ -54,10 +56,10 @@ public class RecordingConverter extends
private String FFMPEG_MAP_PARAM = ":";
@Override
- public void startConversion(Long recordingId) {
- Recording recording = recordingDao.get(recordingId);
- if (recording == null) {
- log.warn("Conversion is NOT started. Recording with ID {} is not found", recordingId);
+ public void startConversion(Long id) {
+ Recording r = recordingDao.get(id);
+ if (r == null) {
+ log.warn("Conversion is NOT started. Recording with ID {} is not found", id);
return;
}
try {
@@ -65,28 +67,31 @@ public class RecordingConverter extends
FFMPEG_MAP_PARAM = ".";
}
- String finalNamePrefix = recordingFileName + recordingId;
- log.debug("recording " + recording.getId());
+ String finalNamePrefix = recordingFileName + id;
+ log.debug("recording " + r.getId());
- List<ConverterProcessResult> returnLog = new ArrayList<>();
+ List<ConverterProcessResult> logs = new ArrayList<>();
List<File> waveFiles = new ArrayList<>();
- File streamFolder = getStreamFolder(recording);
+ File streamFolder = getStreamFolder(r);
- RecordingMetaData screenMetaData = metaDataDao.getScreenMetaDataByRecording(recording.getId());
+ RecordingMetaData screenMetaData = metaDataDao.getScreenMetaDataByRecording(r.getId());
if (screenMetaData == null) {
- throw new Exception("screenMetaData is Null recordingId " + recording.getId());
+ throw new Exception("screenMetaData is Null recordingId " + r.getId());
}
if (screenMetaData.getStreamStatus() == Status.NONE) {
throw new Exception("Stream has not been started, error in recording");
}
- recording.setStatus(Recording.Status.CONVERTING);
- recording = recordingDao.update(recording);
+ if (Strings.isEmpty(r.getHash())) {
+ r.setHash(UUID.randomUUID().toString());
+ }
+ r.setStatus(Recording.Status.CONVERTING);
+ r = recordingDao.update(r);
screenMetaData = waitForTheStream(screenMetaData.getId());
- stripAudioFirstPass(recording, returnLog, waveFiles, streamFolder);
+ stripAudioFirstPass(r, logs, waveFiles, streamFolder);
// Merge Wave to Full Length
File wav = new File(streamFolder, screenMetaData.getStreamName() + "_FINAL_WAVE.wav");
@@ -96,17 +101,17 @@ public class RecordingConverter extends
} else if (waveFiles.size() > 0) {
String[] argv_full_sox = mergeAudioToWaves(waveFiles, wav);
- returnLog.add(ProcessHelper.executeScript("mergeAudioToWaves", argv_full_sox));
+ logs.add(ProcessHelper.executeScript("mergeAudioToWaves", argv_full_sox));
} else {
// create default Audio to merge it. strip to content length
- String outputWav = new File(getStreamsHibernateDir(), "one_second.wav").getCanonicalPath();
+ String oneSecWav = new File(getStreamsHibernateDir(), "one_second.wav").getCanonicalPath();
// Calculate delta at beginning
- double deltaPadding = diffSeconds(recording.getRecordEnd(), recording.getRecordStart());
+ double duration = diffSeconds(r.getRecordEnd(), r.getRecordStart());
- String[] argv_full_sox = new String[] { getPathToSoX(), outputWav, wav.getCanonicalPath(), "pad", "0", "" + deltaPadding };
+ String[] cmd = new String[] { getPathToSoX(), oneSecWav, wav.getCanonicalPath(), "pad", "0", "" + duration };
- returnLog.add(ProcessHelper.executeScript("generateSampleAudio", argv_full_sox));
+ logs.add(ProcessHelper.executeScript("generateSampleAudio", cmd));
}
screenMetaData.setFullWavAudioData(wav.getName());
metaDataDao.update(screenMetaData);
@@ -115,15 +120,15 @@ public class RecordingConverter extends
String inputScreenFullFlv = new File(streamFolder, OmFileHelper.getName(screenMetaData.getStreamName(), EXTENSION_FLV)).getCanonicalPath();
- File flv = recording.getFile(EXTENSION_FLV);
+ File flv = r.getFile(EXTENSION_FLV);
// ffmpeg -vcodec flv -qscale 9.5 -r 25 -ar 22050 -ab 32k -s 320x240
// -i 65318fb5c54b1bc1b1bca077b493a914_28_12_2009_23_38_17_FINAL_WAVE.wav
// -i 65318fb5c54b1bc1b1bca077b493a914_28_12_2009_23_38_17.flv
// final1.flv
- int flvWidth = recording.getWidth();
- int flvHeight = recording.getHeight();
+ int flvWidth = r.getWidth();
+ int flvHeight = r.getHeight();
log.debug("flvWidth -1- " + flvWidth);
log.debug("flvHeight -1- " + flvHeight);
@@ -134,11 +139,11 @@ public class RecordingConverter extends
log.debug("flvWidth -2- " + flvWidth);
log.debug("flvHeight -2- " + flvHeight);
- recording.setFlvWidth(flvWidth);
- recording.setFlvHeight(flvHeight);
+ r.setFlvWidth(flvWidth);
+ r.setFlvHeight(flvHeight);
- String[] argv_fullFLV = new String[] { getPathToFFMPEG(), "-y",//
- "-itsoffset", formatMillis(diff(screenMetaData.getRecordStart(), recording.getRecordStart())),
+ String[] cmdFlv = new String[] { getPathToFFMPEG(), "-y",//
+ "-itsoffset", formatMillis(diff(screenMetaData.getRecordStart(), r.getRecordStart())),
"-i", inputScreenFullFlv, "-i", wav.getCanonicalPath(), "-ar", "22050", //
"-acodec", "libmp3lame", //
"-ab", "32k", //
@@ -148,41 +153,39 @@ public class RecordingConverter extends
"-map", "1" + FFMPEG_MAP_PARAM + "0", //
flv.getCanonicalPath() };
- returnLog.add(ProcessHelper.executeScript("generateFullFLV", argv_fullFLV));
-
- recording.setHash(flv.getName());
+ logs.add(ProcessHelper.executeScript("generateFullFLV", cmdFlv));
// Extract first Image for preview purpose
// ffmpeg -i movie.flv -vcodec mjpeg -vframes 1 -an -f rawvideo -s
// 320x240 movie.jpg
- File outPutJpeg = new File(getStreamsHibernateDir(), finalNamePrefix + ".jpg");
+ File jpg = new File(getStreamsHibernateDir(), finalNamePrefix + ".jpg");
- String[] argv_previewFLV = new String[] { //
+ String[] cmdJpg = new String[] { //
getPathToFFMPEG(), "-y",//
"-i", flv.getCanonicalPath(), //
"-vcodec", "mjpeg", //
"-vframes", "1", "-an", //
"-f", "rawvideo", //
"-s", flvWidth + "x" + flvHeight, //
- outPutJpeg.getCanonicalPath() };
+ jpg.getCanonicalPath() };
- returnLog.add(ProcessHelper.executeScript("previewFullFLV", argv_previewFLV));
+ logs.add(ProcessHelper.executeScript("previewFullFLV", cmdJpg));
- File alternateDownload = new File(getStreamsHibernateDir(), finalNamePrefix + ".avi");
+ File avi = new File(getStreamsHibernateDir(), finalNamePrefix + ".avi");
- String[] argv_alternateDownload = new String[] { getPathToFFMPEG(), "-y", "-i", flv.getCanonicalPath(), "-vcodec",
- "copy", alternateDownload.getCanonicalPath() };
+ String[] cmdAvi = new String[] { getPathToFFMPEG(), "-y", "-i", flv.getCanonicalPath(), "-vcodec",
+ "copy", avi.getCanonicalPath() };
- returnLog.add(ProcessHelper.executeScript("alternateDownload", argv_alternateDownload));
+ logs.add(ProcessHelper.executeScript("alternateDownload", cmdAvi));
- updateDuration(recording);
- convertToMp4(recording, returnLog);
- recording.setStatus(Recording.Status.PROCESSED);
+ updateDuration(r);
+ convertToMp4(r, logs);
+ r.setStatus(Recording.Status.PROCESSED);
- logDao.delete(recording);
- for (ConverterProcessResult returnMap : returnLog) {
- logDao.add("generateFFMPEG", recording, returnMap);
+ logDao.delete(r);
+ for (ConverterProcessResult returnMap : logs) {
+ logDao.add("generateFFMPEG", r, returnMap);
}
// Delete Wave Files
@@ -194,8 +197,8 @@ public class RecordingConverter extends
} catch (Exception err) {
log.error("[startConversion]", err);
- recording.setStatus(Recording.Status.ERROR);
+ r.setStatus(Recording.Status.ERROR);
}
- recordingDao.update(recording);
+ recordingDao.update(r);
}
}
Modified: openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/data/file/FileProcessor.java
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/data/file/FileProcessor.java?rev=1761322&r1=1761321&r2=1761322&view=diff
==============================================================================
--- openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/data/file/FileProcessor.java (original)
+++ openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/data/file/FileProcessor.java Sun Sep 18 12:01:46 2016
@@ -19,11 +19,17 @@
package org.apache.openmeetings.core.data.file;
import static org.apache.openmeetings.util.OmFileHelper.thumbImagePrefix;
+import static org.apache.openmeetings.util.OmFileHelper.EXTENSION_JPG;
+import static org.apache.openmeetings.util.OmFileHelper.EXTENSION_MP4;
import static org.apache.openmeetings.util.OpenmeetingsVariables.webAppRootKey;
import java.io.File;
import java.io.InputStream;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashSet;
import java.util.List;
+import java.util.Set;
import java.util.UUID;
import org.apache.commons.transaction.util.FileHelper;
Modified: openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/ConferenceLibrary.java
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/ConferenceLibrary.java?rev=1761322&r1=1761321&r2=1761322&view=diff
==============================================================================
--- openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/ConferenceLibrary.java (original)
+++ openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/ConferenceLibrary.java Sun Sep 18 12:01:46 2016
@@ -19,7 +19,6 @@
package org.apache.openmeetings.core.remote;
import static org.apache.openmeetings.util.OmFileHelper.EXTENSION_MP4;
-import static org.apache.openmeetings.util.OmFileHelper.WB_VIDEO_FILE_PREFIX;
import static org.apache.openmeetings.util.OpenmeetingsVariables.webAppRootKey;
import java.io.File;
@@ -228,7 +227,7 @@ public class ConferenceLibrary implement
File targetFolder = OmFileHelper.getStreamsSubDir(roomId);
- File target = new File(targetFolder, OmFileHelper.getName(WB_VIDEO_FILE_PREFIX + fileId, EXTENSION_MP4));
+ File target = new File(targetFolder, mp4.getName());
if (mp4.exists() && !target.exists()) {
FileHelper.copy(mp4, target);
}
Modified: openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java?rev=1761322&r1=1761321&r2=1761322&view=diff
==============================================================================
--- openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java (original)
+++ openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java Sun Sep 18 12:01:46 2016
@@ -1394,7 +1394,7 @@ public class ScopeApplicationAdapter ext
type // 0
, url // urlname
, "--dummy--" // baseurl
- , fi.getHash() // fileName //3
+ , fi.getName() // fileName //3
, "--dummy--" // moduleName //4
, "--dummy--" // parentPath //5
, "--dummy--" // room //6
@@ -1433,7 +1433,7 @@ public class ScopeApplicationAdapter ext
, size.x // 4: 416
, size.y // 5: 240
, 0 // 6: 1 // z-index
- , null // 7: null //TODO
+ , fi.getHash() // 7: null //TODO
, 0 // 8: 0 //TODO // counter
, 0 // 9: 0 //TODO // x
, 0 // 10: 0 //TODO // y
Modified: openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/room/RoomDao.java
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/room/RoomDao.java?rev=1761322&r1=1761321&r2=1761322&view=diff
==============================================================================
--- openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/room/RoomDao.java (original)
+++ openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/room/RoomDao.java Sun Sep 18 12:01:46 2016
@@ -222,7 +222,7 @@ public class RoomDao implements IDataPro
}
public Room getUserRoom(Long ownerId, Room.Type type, String name) {
- log.debug("getRoomByOwnerAndTypeId : " + ownerId + " || " + type);
+ log.debug("getUserRoom : " + ownerId + " || " + type);
Room room = null;
List<Room> ll = em.createNamedQuery("getRoomByOwnerAndTypeId", Room.class).setParameter("ownerId", ownerId).setParameter("type", type).getResultList();
if (ll.size() > 0) {
Modified: openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/file/FileItem.java
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/file/FileItem.java?rev=1761322&r1=1761321&r2=1761322&view=diff
==============================================================================
--- openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/file/FileItem.java (original)
+++ openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/file/FileItem.java Sun Sep 18 12:01:46 2016
@@ -22,6 +22,9 @@ import static org.apache.openmeetings.ut
import static org.apache.openmeetings.util.OmFileHelper.EXTENSION_MP4;
import static org.apache.openmeetings.util.OmFileHelper.EXTENSION_SWF;
import static org.apache.openmeetings.util.OmFileHelper.EXTENSION_WML;
+import static org.apache.openmeetings.util.OmFileHelper.getStreamsHibernateDir;
+import static org.apache.openmeetings.util.OmFileHelper.getUploadFilesDir;
+import static org.apache.openmeetings.util.OmFileHelper.getUploadWmlDir;
import java.io.File;
import java.util.Date;
@@ -35,7 +38,6 @@ import javax.persistence.Transient;
import javax.xml.bind.annotation.XmlType;
import org.apache.openmeetings.db.entity.IDataProviderEntity;
-import org.apache.openmeetings.util.OmFileHelper;
import org.simpleframework.xml.Element;
@MappedSuperclass
@@ -218,15 +220,17 @@ public abstract class FileItem implement
public final File getFile(String ext) {
File f = null;
if (getHash() != null) {
- File d = new File(OmFileHelper.getUploadFilesDir(), getHash());
+ File d = new File(getUploadFilesDir(), getHash());
switch (getType()) {
case WmlFile:
- f = new File(OmFileHelper.getUploadWmlDir(), String.format("%s.%s", getHash(), ext == null ? EXTENSION_WML : ext));
+ f = new File(getUploadWmlDir(), String.format("%s.%s", getHash(), ext == null ? EXTENSION_WML : ext));
break;
case Image:
f = new File(d, String.format("%s.%s", getHash(), ext == null ? EXTENSION_JPG : ext));
break;
case Recording:
+ f = new File(getStreamsHibernateDir(), String.format("%s.%s", getHash(), ext == null ? EXTENSION_MP4 : ext));
+ break;
case Video:
f = new File(d, String.format("%s.%s", getHash(), ext == null ? EXTENSION_MP4 : ext));
break;
Modified: openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/file/FileItemLog.java
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/file/FileItemLog.java?rev=1761322&r1=1761321&r2=1761322&view=diff
==============================================================================
--- openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/file/FileItemLog.java (original)
+++ openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/file/FileItemLog.java Sun Sep 18 12:01:46 2016
@@ -41,7 +41,7 @@ import org.apache.openmeetings.db.entity
@Entity
@NamedQueries({
@NamedQuery(name = "getFileLogsByFile", query = "SELECT fl FROM FileItemLog fl WHERE fl.fileId = :fileId AND fl.fileType = :type"),
- @NamedQuery(name = "countErrorFileLogsByFile", query = "SELECT COUNT(fl) FROM FileItemLog fl WHERE fl.fileId = :fileId AND fl.fileType = :type AND fl.exitCode <> '0'"),
+ @NamedQuery(name = "countErrorFileLogsByFile", query = "SELECT COUNT(fl) FROM FileItemLog fl WHERE fl.fileId = :fileId AND fl.fileType = :type AND fl.exitCode <> 0"),
@NamedQuery(name = "deleteErrorFileLogsByFile", query = "DELETE FROM FileItemLog fl WHERE fl.fileId = :fileId AND fl.fileType = :type") })
@Table(name = "file_log")
public class FileItemLog implements IDataProviderEntity {
Modified: openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/flexibleConferenceRoom/roomSidebar/baseRoomSidebar.lzx
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/flexibleConferenceRoom/roomSidebar/baseRoomSidebar.lzx?rev=1761322&r1=1761321&r2=1761322&view=diff
==============================================================================
--- openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/flexibleConferenceRoom/roomSidebar/baseRoomSidebar.lzx (original)
+++ openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/flexibleConferenceRoom/roomSidebar/baseRoomSidebar.lzx Sun Sep 18 12:01:46 2016
@@ -44,7 +44,7 @@
<method name="setRoomModerators">
<![CDATA[
var moders = canvas.currentRoomObj.moderators;
- if ($debug) Debug.write("getRoomModeratorsByRoomId: ", moders);
+ if ($debug) Debug.write("setRoomModerators: ", moders);
canvas.becomeSuperModerator = false;
this.setRoomValues.applyDefaultModeration = canvas.becomemoderator;
Modified: openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/base/baseDrawObject.lzx
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/base/baseDrawObject.lzx?rev=1761322&r1=1761321&r2=1761322&view=diff
==============================================================================
--- openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/base/baseDrawObject.lzx (original)
+++ openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/base/baseDrawObject.lzx Sun Sep 18 12:01:46 2016
@@ -1,51 +1,42 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
+<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
+ license agreements. See the NOTICE file distributed with this work for additional
+ information regarding copyright ownership. The ASF licenses this file to
+ you under the Apache License, Version 2.0 (the "License"); you may not use
+ this file except in compliance with the License. You may obtain a copy of
+ the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
+ by applicable law or agreed to in writing, software distributed under the
+ License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
+ OF ANY KIND, either express or implied. See the License for the specific
+ language governing permissions and limitations under the License. -->
<library>
-<class name="baseDrawObject" extends="baseDrawPointer">
- <!-- it uses some of the attribute's defined in baseDrawImage -->
- <attribute name="newSlideNumber" value="1" type="number" />
- <attribute name="fullFit" value="true" type="boolean" />
-
- <!--
- Invoked by the Library directly
- Loads a SWFPresenation to the whiteBoard
- -->
- <method name="loadSWFPresentationSynced" args="url,fileName,moduleName,parentPath,room,domain,slideNumber,standardFileName">
- var now = new Date();
- //This invokes a Method which is in the remoteWhiteboard.lzx
- this.startNewObjectSyncProcess.isStarting = true;
- this.startNewObjectSyncProcess.uniqueObjectSyncName = fileName + now.getTime();
- this.startNewObjectSyncProcess.doCall();
- //if ($debug) Debug.write("loadSWFPresentationSynced",url,fileName,moduleName,parentPath,room,domain,slideNumber,standardFileName);
- this.addPresentationToLayer(this,url,'swfpresentationobject'+this.getCounter(),
+ <class name="baseDrawObject" extends="baseDrawPointer">
+ <!-- it uses some of the attribute's defined in baseDrawImage -->
+ <attribute name="newSlideNumber" value="1" type="number" />
+ <attribute name="fullFit" value="true" type="boolean" />
+
+ <!-- Invoked by the Library directly Loads a SWFPresenation to the whiteBoard -->
+ <method name="loadSWFPresentationSynced"
+ args="url,fileName,moduleName,parentPath,room,domain,slideNumber,standardFileName">
+ var now = new Date();
+ //This invokes a Method which is in the remoteWhiteboard.lzx
+ this.startNewObjectSyncProcess.isStarting = true;
+ this.startNewObjectSyncProcess.uniqueObjectSyncName = fileName +
+ now.getTime();
+ this.startNewObjectSyncProcess.doCall();
+ //if ($debug)
+ Debug.write("loadSWFPresentationSynced",url,fileName,moduleName,parentPath,room,domain,slideNumber,standardFileName);
+ this.addPresentationToLayer(this,url,'swfpresentationobject'+this.getCounter(),
0,0,0,0,
true,
url,fileName,moduleName,parentPath,room,domain,slideNumber,
100,0,0,0,0,
this.startNewObjectSyncProcess.uniqueObjectSyncName,
standardFileName,this.fullFit);
- </method>
-
- <method name="setCurrentScaleByFullFit" args="scaleFactor">
+ </method>
+
+ <method name="setCurrentScaleByFullFit" args="scaleFactor">
<![CDATA[
var tScale = Math.round(scaleFactor*100);
@@ -61,9 +52,9 @@
parent.parent.zoombox.setCurrentScaleByFullFit(tScale);
]]>
- </method>
-
- <method name="doUpdateFullFit" args="fullFit,zoom">
+ </method>
+
+ <method name="doUpdateFullFit" args="fullFit,zoom">
<![CDATA[
if (canvas.ismoderator) {
if ($debug) Debug.write("doUpdateFullFit ",fullFit,zoom);
@@ -80,9 +71,9 @@
this.onsharedMessage('whiteboardObj',actionObject);
}
]]>
- </method>
-
- <method name="doUpdateZoom" args="fullFit,zoom">
+ </method>
+
+ <method name="doUpdateZoom" args="fullFit,zoom">
<![CDATA[
if ($debug) Debug.write("doUpdateZoom ",this.fullFit,zoom);
@@ -100,9 +91,9 @@
this.onsharedMessage('whiteboardObj',actionObject);
}
]]>
- </method>
-
- <method name="doUpdateFullFitAndZoomRemote" args="actionObject">
+ </method>
+
+ <method name="doUpdateFullFitAndZoomRemote" args="actionObject">
<![CDATA[
parent.parent.zoombox.setWhiteboardValues(actionObject[1],actionObject[2]);
if ($debug) Debug.write("doUpdateFullFitAndZoomRemote ",actionObject[1],actionObject[2]);
@@ -115,9 +106,9 @@
this.onupdateScale.sendEvent(null);
}
]]>
- </method>
-
- <method name="doFullFit" args="v">
+ </method>
+
+ <method name="doFullFit" args="v">
<![CDATA[
if ($debug) Debug.write("Do Full Fit ? doFullFit: ", v, this.ObjectByName);
@@ -131,9 +122,10 @@
}
}
]]>
- </method>
-
- <method name="checkSWFPresentation" args="url,fileName,moduleName,parentPath,room,domain,slideNumber">
+ </method>
+
+ <method name="checkSWFPresentation"
+ args="url,fileName,moduleName,parentPath,room,domain,slideNumber">
<![CDATA[
for (var i=0;i<this.baseactionobjectList.length;i++){
if (fileName==this.baseactionobjectList[i][3]){
@@ -148,14 +140,12 @@
}
return false;
]]>
- </method>
-
- <!--
- alterModus => this is added by the mod not remotely
-
- adds the SWF-Object to the Layer
- -->
- <method name="addPresentationToLayer" args="obj,urlName,nameing,posx,posy,width,height,alterModus,baseurl,fileName,moduleName,parentPath,room,domain,slideNumber,currentzoom,innerwidth,innerheight,innerx,innery,uniqueObjectSyncName,standardFileName,fullFit">
+ </method>
+
+ <!-- alterModus => this is added by the mod not remotely adds the SWF-Object
+ to the Layer -->
+ <method name="addPresentationToLayer"
+ args="obj,urlName,nameing,posx,posy,width,height,alterModus,baseurl,fileName,moduleName,parentPath,room,domain,slideNumber,currentzoom,innerwidth,innerheight,innerx,innery,uniqueObjectSyncName,standardFileName,fullFit">
<![CDATA[
if ($debug) Debug.write("addPresentationToLayer", standardFileName);
@@ -177,151 +167,143 @@
this.addItemToDocumentToolBar();
this.doUpdateDocumentToolBar();
]]>
- </method>
-
- <method name="addSWFToLayerHistory" args="actionObject,refObj,isWmlLoader">
- this.isWmlLoaderImage = isWmlLoader;
- this.baseactionobjectList.push(actionObject);
- this.addPresentationToLayer(refObj,actionObject[1],actionObject[actionObject.length-1],
+ </method>
+
+ <method name="addSWFToLayerHistory" args="actionObject,refObj,isWmlLoader">
+ this.isWmlLoaderImage = isWmlLoader;
+ this.baseactionobjectList.push(actionObject);
+ this.addPresentationToLayer(refObj,actionObject[1],actionObject[actionObject.length-1],
actionObject[actionObject.length-5],actionObject[actionObject.length-4],actionObject[actionObject.length-3],
actionObject[actionObject.length-2],false,actionObject[2],actionObject[3],actionObject[4],actionObject[5],
actionObject[6],actionObject[7],
actionObject[8],actionObject[16],actionObject[11],actionObject[12],actionObject[9],actionObject[10],
actionObject[17],actionObject[18],actionObject[19]);
- </method>
-
- <!--
- Invoked by the remote Host, see sendWatchObject in baseDraw.lzx
- -->
- <method name="addSWFToLayerHistorySynced" args="actionObject,refObj">
- this.baseactionobjectList.push(actionObject);
- this.startNewObjectSyncProcess.isStarting = false;
- this.startNewObjectSyncProcess.uniqueObjectSyncName = actionObject[17];
- this.startNewObjectSyncProcess.doCall();
- this.addPresentationToLayer(refObj,actionObject[1],actionObject[actionObject.length-1],
- actionObject[actionObject.length-5],actionObject[actionObject.length-4],
- actionObject[actionObject.length-3],actionObject[actionObject.length-2],
- false,
- actionObject[2],actionObject[3],actionObject[4],actionObject[5],actionObject[6],
- actionObject[7],actionObject[8],actionObject[16],actionObject[11],actionObject[12],
- actionObject[9],actionObject[10],actionObject[17],actionObject[18],actionObject[19]);
- </method>
-
- <!---
- invoke by the initial Loading process in remoteWhiteboard.lzx,
- does not invoke any Update Handler
- once this object is loaded, it will throw an Update event of kind
- addSWFToLayerHistoryToLocalLoaded
- -->
- <method name="addSWFToLayerHistoryToLocal" args="actionObject,refObj">
- this.baseactionobjectList.push(actionObject);
- this.addPresentationToLayer(refObj,actionObject[1],actionObject[actionObject.length-1],
- actionObject[actionObject.length-5],actionObject[actionObject.length-4],
- actionObject[actionObject.length-3],actionObject[actionObject.length-2],
- false,
- actionObject[2],actionObject[3],actionObject[4],actionObject[5],actionObject[6],
- actionObject[7],actionObject[8],actionObject[16],actionObject[11],actionObject[12],
- actionObject[9],actionObject[10],actionObject[17],actionObject[18],actionObject[19]);
- </method>
-
- <method name="registerNewSWF" args="urlname,posx,posy,width,height,baseurl,fileName,moduleName,parentPath,room,domain,slideNumber,innerx,innery,innerwidth,innerheight,zoomlevel,currentzoom,initwidth,initheight,uniquObjectSyncName,doUpdateMessage,standardFileName,fullFit,zIndex">
- var actionObject = new Array();
- actionObject.push('swf');//0
- actionObject.push(urlname);//1
- actionObject.push(baseurl);//2
- actionObject.push(fileName);//3
- actionObject.push(moduleName);//4
- actionObject.push(parentPath);//5
- actionObject.push(room);//6
- actionObject.push(domain);//7
- actionObject.push(slideNumber);//8
- actionObject.push(innerx);//9
- actionObject.push(innery);//10
- actionObject.push(innerwidth);//11
- actionObject.push(innerheight);//12
- actionObject.push(zoomlevel);//13
- actionObject.push(initwidth);//14
- actionObject.push(initheight);//15
- actionObject.push(currentzoom);//16
- actionObject.push(uniquObjectSyncName);//17
- actionObject.push(standardFileName);//18
- actionObject.push(fullFit);//19
- actionObject.push(zIndex);//-8
- actionObject.push(null);//-7
- actionObject.push(this.counter);//-6
- actionObject.push(posx);//-5
- actionObject.push(posy);//-4
- actionObject.push(width);//-3
- actionObject.push(height);//-2
- actionObject.push(this.currentlayer.name);//-1
- this.baseactionobjectList.push(actionObject);
- this.checkStepLayers();
- if (doUpdateMessage) this.onsharedMessage('draw',actionObject);
- </method>
-
- <!--
- Invoked by the swfResource, if the alterModus = true,
- throws an Update-Event to all connected Clients
- -->
- <method name="storeTempValsAndLoadSyncListSWF" args="objRef">
- this.syncImageRefObj = objRef;
- this.doRegisterNewSwf(true);
- this.sendCompletedObjectSyncEvent.uniqueObjectSyncName = this.syncImageRefObj.uniqueObjectSyncName;
- this.sendCompletedObjectSyncEvent.doCall();
- </method>
-
- <!--
- Invoked by the swfResource, if the alterModus = false,
- throws NO Update-Event to all connected Clients
- -->
- <method name="sendLoadNotificationSWF" args="objRef" >
- this.syncImageRefObj = objRef;
- this.doRegisterNewSwf(false);
- this.sendCompletedObjectSyncEvent.uniqueObjectSyncName = this.syncImageRefObj.uniqueObjectSyncName;
- this.sendCompletedObjectSyncEvent.doCall();
- </method>
-
- <!--
- TODO: Check Recording
- -->
- <method name="storeTempValsAndLoadSyncListSWFRecording" args="objRef">
- this.syncImageRefObj = objRef;
- //This invokes a Method which is in the remoteWhiteboard.lzx
- this.sendCompletedObjectSyncEvent.uniqueObjectSyncName = this.syncImageRefObj.uniqueObjectSyncName;
- this.sendCompletedObjectSyncEvent.doCall();
- </method>
-
- <method name="doRegisterNewSwf" args="doUpdateMessage">
- //now send notifications to connected clients
- this.setAttribute('drawmodus','hand');
-
- this.registerNewSWF(this.syncImageRefObj.baseurl,this.syncImageRefObj.x,
- this.syncImageRefObj.y,this.syncImageRefObj._swfView.width,
- this.syncImageRefObj._swfView.height,this.syncImageRefObj.baseurl,
- this.syncImageRefObj.fileName,this.syncImageRefObj.moduleName,
- this.syncImageRefObj.parentPath,this.syncImageRefObj.room,
- this.syncImageRefObj.domain,this.syncImageRefObj.slideNumber,
- this.syncImageRefObj._swfView.x,this.syncImageRefObj._swfView.y,
- this.syncImageRefObj._swfView.width,this.syncImageRefObj._swfView.height,
- this.syncImageRefObj.zoomlevel,this.syncImageRefObj.currentzoomFactor,
- this.syncImageRefObj.initwidth,this.syncImageRefObj.initheight,
- this.syncImageRefObj.uniqueObjectSyncName,doUpdateMessage,
- this.syncImageRefObj.standardFileName,
- this.syncImageRefObj.fullFit,
- this.getZIndex());
-
- //set modus to hand so users can directly select that image
- this.setModus('swf');
- </method>
-
- <method name="sendSyncNotificationSWF">
- this.imageLoadingCompleteMessage = new Array();
- this.imageLoadingCompleteMessage[0] = "whiteboard";
- this.imageLoadingCompleteMessage[1] = "swfsynccomplete";
- this.sendMessageWithClientSWF.doCall();
- </method>
+ </method>
+
+ <!-- Invoked by the remote Host, see sendWatchObject in baseDraw.lzx -->
+ <method name="addSWFToLayerHistorySynced" args="actionObject,refObj">
+ this.baseactionobjectList.push(actionObject);
+ this.startNewObjectSyncProcess.isStarting = false;
+ this.startNewObjectSyncProcess.uniqueObjectSyncName =
+ actionObject[17];
+ this.startNewObjectSyncProcess.doCall();
+ this.addPresentationToLayer(refObj,actionObject[1],actionObject[actionObject.length-1],
+ actionObject[actionObject.length-5],actionObject[actionObject.length-4],
+ actionObject[actionObject.length-3],actionObject[actionObject.length-2],
+ false,
+ actionObject[2],actionObject[3],actionObject[4],actionObject[5],actionObject[6],
+ actionObject[7],actionObject[8],actionObject[16],actionObject[11],actionObject[12],
+ actionObject[9],actionObject[10],actionObject[17],actionObject[18],actionObject[19]);
+ </method>
+
+ <!--- invoke by the initial Loading process in remoteWhiteboard.lzx, does
+ not invoke any Update Handler once this object is loaded, it will throw an
+ Update event of kind addSWFToLayerHistoryToLocalLoaded -->
+ <method name="addSWFToLayerHistoryToLocal" args="actionObject,refObj">
+ this.baseactionobjectList.push(actionObject);
+ this.addPresentationToLayer(refObj,actionObject[1],actionObject[actionObject.length-1],
+ actionObject[actionObject.length-5],actionObject[actionObject.length-4],
+ actionObject[actionObject.length-3],actionObject[actionObject.length-2],
+ false,
+ actionObject[2],actionObject[3],actionObject[4],actionObject[5],actionObject[6],
+ actionObject[7],actionObject[8],actionObject[16],actionObject[11],actionObject[12],
+ actionObject[9],actionObject[10],actionObject[17],actionObject[18],actionObject[19]);
+ </method>
+
+ <method name="registerNewSWF"
+ args="urlname,posx,posy,width,height,baseurl,fileName,moduleName,parentPath,room,domain,slideNumber,innerx,innery,innerwidth,innerheight,zoomlevel,currentzoom,initwidth,initheight,uniquObjectSyncName,doUpdateMessage,standardFileName,fullFit,zIndex">
+ var actionObject = new Array();
+ actionObject.push('swf');//0
+ actionObject.push(urlname);//1
+ actionObject.push(baseurl);//2
+ actionObject.push(fileName);//3
+ actionObject.push(moduleName);//4
+ actionObject.push(parentPath);//5
+ actionObject.push(room);//6
+ actionObject.push(domain);//7
+ actionObject.push(slideNumber);//8
+ actionObject.push(innerx);//9
+ actionObject.push(innery);//10
+ actionObject.push(innerwidth);//11
+ actionObject.push(innerheight);//12
+ actionObject.push(zoomlevel);//13
+ actionObject.push(initwidth);//14
+ actionObject.push(initheight);//15
+ actionObject.push(currentzoom);//16
+ actionObject.push(uniquObjectSyncName);//17
+ actionObject.push(standardFileName);//18
+ actionObject.push(fullFit);//19
+ actionObject.push(zIndex);//-8
+ actionObject.push(null);//-7
+ actionObject.push(this.counter);//-6
+ actionObject.push(posx);//-5
+ actionObject.push(posy);//-4
+ actionObject.push(width);//-3
+ actionObject.push(height);//-2
+ actionObject.push(this.currentlayer.name);//-1
+ this.baseactionobjectList.push(actionObject);
+ this.checkStepLayers();
+ if (doUpdateMessage) this.onsharedMessage('draw',actionObject);
+ </method>
+
+ <!-- Invoked by the swfResource, if the alterModus = true, throws an Update-Event
+ to all connected Clients -->
+ <method name="storeTempValsAndLoadSyncListSWF" args="objRef">
+ this.syncImageRefObj = objRef;
+ this.doRegisterNewSwf(true);
+ this.sendCompletedObjectSyncEvent.uniqueObjectSyncName = this.syncImageRefObj.uniqueObjectSyncName;
+ this.sendCompletedObjectSyncEvent.doCall();
+ </method>
+
+ <!-- Invoked by the swfResource, if the alterModus = false, throws NO Update-Event
+ to all connected Clients -->
+ <method name="sendLoadNotificationSWF" args="objRef">
+ this.syncImageRefObj = objRef;
+ this.doRegisterNewSwf(false);
+ this.sendCompletedObjectSyncEvent.uniqueObjectSyncName = this.syncImageRefObj.uniqueObjectSyncName;
+ this.sendCompletedObjectSyncEvent.doCall();
+ </method>
+
+ <!-- TODO: Check Recording -->
+ <method name="storeTempValsAndLoadSyncListSWFRecording" args="objRef">
+ this.syncImageRefObj = objRef;
+ //This invokes a Method which is in the remoteWhiteboard.lzx
+ this.sendCompletedObjectSyncEvent.uniqueObjectSyncName =
+ this.syncImageRefObj.uniqueObjectSyncName;
+ this.sendCompletedObjectSyncEvent.doCall();
+ </method>
+
+ <method name="doRegisterNewSwf" args="doUpdateMessage">
+ //now send notifications to connected clients
+ this.setAttribute('drawmodus','hand');
+
+ this.registerNewSWF(this.syncImageRefObj.baseurl,this.syncImageRefObj.x,
+ this.syncImageRefObj.y,this.syncImageRefObj._swfView.width,
+ this.syncImageRefObj._swfView.height,this.syncImageRefObj.baseurl,
+ this.syncImageRefObj.fileName,this.syncImageRefObj.moduleName,
+ this.syncImageRefObj.parentPath,this.syncImageRefObj.room,
+ this.syncImageRefObj.domain,this.syncImageRefObj.slideNumber,
+ this.syncImageRefObj._swfView.x,this.syncImageRefObj._swfView.y,
+ this.syncImageRefObj._swfView.width,this.syncImageRefObj._swfView.height,
+ this.syncImageRefObj.zoomlevel,this.syncImageRefObj.currentzoomFactor,
+ this.syncImageRefObj.initwidth,this.syncImageRefObj.initheight,
+ this.syncImageRefObj.uniqueObjectSyncName,doUpdateMessage,
+ this.syncImageRefObj.standardFileName,
+ this.syncImageRefObj.fullFit,
+ this.getZIndex());
+
+ //set modus to hand so users can directly select that image
+ this.setModus('swf');
+ </method>
- <method name="doDocumentAction" args="action">
+ <method name="sendSyncNotificationSWF">
+ this.imageLoadingCompleteMessage = new Array();
+ this.imageLoadingCompleteMessage[0] = "whiteboard";
+ this.imageLoadingCompleteMessage[1] = "swfsynccomplete";
+ this.sendMessageWithClientSWF.doCall();
+ </method>
+
+ <method name="doDocumentAction" args="action">
<![CDATA[
if ($debug) Debug.info("doDocumentAction :1: sendCurrentSWFObject ",action);
if (this.ObjectByName.typeOfObject=="swf") {
@@ -378,50 +360,51 @@
this.sendCurrentSWFObject(this.ObjectByName);
}
]]>
- </method>
-
- <method name="addItemToDocumentToolBar">
- this.getDocumentToolBar().addCurrentObject(this.currentlayer);
- </method>
-
- <method name="setCurrentDocumentByToolBar" args="itemRefName">
- if (this.boundingIsActive){
- if (this.boundingref.objRef.name != itemRefName) {
- this.boundingref._innerDrag.onmouseup.sendEvent();
+ </method>
+
+ <method name="addItemToDocumentToolBar">
+ this.getDocumentToolBar().addCurrentObject(this.currentlayer);
+ </method>
+
+ <method name="setCurrentDocumentByToolBar" args="itemRefName">
+ if (this.boundingIsActive){
+ if (this.boundingref.objRef.name !=
+ itemRefName) {
+ this.boundingref._innerDrag.onmouseup.sendEvent();
}
- }
- this.setCurrentDocument(null);
- </method>
-
- <method name="setCurrentDocument" args="itemRefName">
- var t = this.getObjectByName(itemRefName);
- if (t==null) {
+ }
+ this.setCurrentDocument(null);
+ </method>
+
+ <method name="setCurrentDocument" args="itemRefName">
+ var t = this.getObjectByName(itemRefName);
+ if (t==null) {
return;
- }
- this.ObjectByName = t;
- this.doUpdateDocumentToolBar();
-
- if ($debug) Debug.write("setCurrentDocument ",itemRefName,this.ObjectByName);
- </method>
-
- <method name="sendItemToFront" args="itemRefName">
- var actionObject = new Array();
- actionObject[0] = 'item';
- actionObject[1] = itemRefName;
- this.onsharedMessage('sendItemToFront',actionObject);
- </method>
-
- <method name="bringItemToFrontByName" args="itemRefName">
- this.ObjectByName = this.getObjectByName(itemRefName);
- this.ObjectByName.bringToFront();
- </method>
-
- <method name="doUpdateDocumentToolBarByParticipant" args="itemObjName">
- this.ObjectByName = this.getObjectByName(itemObjName);
- this.doUpdateDocumentToolBar();
- </method>
-
- <method name="doUpdateDocumentToolBar">
+ }
+ this.ObjectByName = t;
+ this.doUpdateDocumentToolBar();
+
+ if ($debug) Debug.write("setCurrentDocument",itemRefName,this.ObjectByName);
+ </method>
+
+ <method name="sendItemToFront" args="itemRefName">
+ var actionObject = new Array();
+ actionObject[0] = 'item';
+ actionObject[1] = itemRefName;
+ this.onsharedMessage('sendItemToFront',actionObject);
+ </method>
+
+ <method name="bringItemToFrontByName" args="itemRefName">
+ this.ObjectByName = this.getObjectByName(itemRefName);
+ this.ObjectByName.bringToFront();
+ </method>
+
+ <method name="doUpdateDocumentToolBarByParticipant" args="itemObjName">
+ this.ObjectByName = this.getObjectByName(itemObjName);
+ this.doUpdateDocumentToolBar();
+ </method>
+
+ <method name="doUpdateDocumentToolBar">
<![CDATA[
var docToolbar = this.getDocumentToolBar();
@@ -441,17 +424,17 @@
docToolbar.parent.parent.ignoreUpdates = false;
]]>
- </method>
-
- <method name="doDeleteFromDocumentsBar" args="itemRefName">
- this.getDocumentToolBar().removeDocument(itemRefName);
- </method>
-
- <method name="clearDocumentsBar">
- this.getDocumentToolBar().clearDocumentsBar();
- </method>
-
- <method name="sendCurrentSWFObject" args="objRef">
+ </method>
+
+ <method name="doDeleteFromDocumentsBar" args="itemRefName">
+ this.getDocumentToolBar().removeDocument(itemRefName);
+ </method>
+
+ <method name="clearDocumentsBar">
+ this.getDocumentToolBar().clearDocumentsBar();
+ </method>
+
+ <method name="sendCurrentSWFObject" args="objRef">
<![CDATA[
if ($debug) Debug.write("sendCurrentSWFObject :: ",objRef,objRef.name);
var objName = objRef.name;
@@ -480,9 +463,9 @@
}
}
]]>
- </method>
-
- <method name="remoteObjectUpdate" args="lastactionObject">
+ </method>
+
+ <method name="remoteObjectUpdate" args="lastactionObject">
<![CDATA[
var obj = this.getObjectByName(lastactionObject[lastactionObject.length-1]);
@@ -517,9 +500,9 @@
this.updateObjectsToSlideNumber(lastactionObject);
}
]]>
- </method>
-
- <method name="remoteUpdateBaseObjectList" args="actionObject">
+ </method>
+
+ <method name="remoteUpdateBaseObjectList" args="actionObject">
<![CDATA[
////Debug.write("remoteUpdateBaseObjectList : ",actionObject);
for (var eg=0;eg<this.baseactionobjectList.length;eg++){
@@ -529,9 +512,9 @@
}
}
]]>
- </method>
-
- <method name="playVideoSynced" args="fileId,fileName,flv_width,flv_height">
+ </method>
+
+ <method name="playVideoSynced" args="fileId,fileName,flv_width,flv_height">
<![CDATA[
if ($debug) Debug.write("playVideoSynced : ", fileId,fileName,flv_width,flv_height);
@@ -546,9 +529,9 @@
});
this.layers.push(this.currentlayer);
]]>
- </method>
-
- <method name="sendNewVideoRemote" args="refObj">
+ </method>
+
+ <method name="sendNewVideoRemote" args="refObj">
<![CDATA[
if ($debug) Debug.write("sendNewVideoRemote : ",refObj.fileId,refObj.title);
@@ -559,29 +542,30 @@
refObj.flv_height,
this.getZIndex());
]]>
- </method>
-
- <method name="flvregisterFinal" args="newName,x,y,width,height,fileId,fileName,isPlaying,flv_width,flv_height,zIndex">
- var actionObject = new Array();
- actionObject[0] = 'flv';
- actionObject[1] = fileId;
- actionObject[2] = fileName;
- actionObject[3] = isPlaying;
- actionObject[4] = flv_width;
- actionObject[5] = flv_height;
- actionObject[6] = zIndex;//-8
- actionObject[7] = null;//-7
- actionObject[8] = this.counter;//-6
- actionObject[9] = x;//-5
- actionObject[10] = y;//-4
- actionObject[11] = width;//-3
- actionObject[12] = height;//-2
- actionObject[13] = newName;//-1
- this.baseactionobjectList.push(actionObject);
- this.onsharedMessage('draw',actionObject);
- </method>
-
- <method name="drawFlvToHistory" args="lastActionObject,parentView">
+ </method>
+
+ <method name="flvregisterFinal"
+ args="newName,x,y,width,height,fileId,fileName,isPlaying,flv_width,flv_height,zIndex">
+ var actionObject = new Array();
+ actionObject[0] = 'flv';
+ actionObject[1] = fileId;
+ actionObject[2] = fileName;
+ actionObject[3] = isPlaying;
+ actionObject[4] = flv_width;
+ actionObject[5] = flv_height;
+ actionObject[6] = zIndex;//-8
+ actionObject[7] = null;//-7
+ actionObject[8] = this.counter;//-6
+ actionObject[9] = x;//-5
+ actionObject[10] = y;//-4
+ actionObject[11] = width;//-3
+ actionObject[12] = height;//-2
+ actionObject[13] = newName;//-1
+ this.baseactionobjectList.push(actionObject);
+ this.onsharedMessage('draw',actionObject);
+ </method>
+
+ <method name="drawFlvToHistory" args="lastActionObject,parentView">
<![CDATA[
if ($debug) Debug.write("drawFlvToHistory PLAY :: ",lastActionObject[3]);
@@ -590,16 +574,17 @@
fileId:lastActionObject[1],
title:lastActionObject[2],
flv_width:lastActionObject[4],
- flv_height:lastActionObject[5]
+ flv_height:lastActionObject[5],
+ hash:lastActionObject[7]
});
if (lastActionObject[3]) {
this.currentlayer.playRemote();
}
this.layers.push(this.currentlayer);
]]>
- </method>
-
- <method name="playFLV" args="refObj,play">
+ </method>
+
+ <method name="playFLV" args="refObj,play">
<![CDATA[
for (var eg=0;eg<this.baseactionobjectList.length;eg++){
if (this.baseactionobjectList[eg][this.baseactionobjectList[eg].length-1]==refObj.name) {
@@ -612,18 +597,18 @@
}
}
]]>
- </method>
-
- <method name="playFLVRemote" args="actionObject">
- var tObj = this.getObjectByName(actionObject[actionObject.length-1]);
-
- if (actionObject[3]) {
+ </method>
+
+ <method name="playFLVRemote" args="actionObject">
+ var tObj = this.getObjectByName(actionObject[actionObject.length-1]);
+
+ if (actionObject[3]) {
tObj.playRemote();
- }
- if (!actionObject[3]) {
+ }
+ if (!actionObject[3]) {
tObj.stopRemote();
- }
- </method>
-</class>
+ }
+ </method>
+ </class>
</library>
Modified: openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/base/whiteboardVideoPlayer.lzx
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/base/whiteboardVideoPlayer.lzx?rev=1761322&r1=1761321&r2=1761322&view=diff
==============================================================================
--- openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/base/whiteboardVideoPlayer.lzx (original)
+++ openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/base/whiteboardVideoPlayer.lzx Sun Sep 18 12:01:46 2016
@@ -29,6 +29,7 @@
<attribute name="deltaInSeconds" value="0" type="number" />
<attribute name="currentTime" value="0" type="number" />
<attribute name="recordingName" value="" type="string" />
+ <attribute name="hash" value="" type="string" />
<attribute name="isLoaded" value="false" type="boolean" />
<attribute name="sendInit" value="false" type="boolean" />
<attribute name="flv_width" value="0" type="number" />
@@ -37,7 +38,7 @@
<handler name="oninit">
if ($debug) Debug.write("whiteboardVideoPlayer :: ",this.fileId);
- this.recordingName = "UPLOADFLV_" + this.fileId + ".mp4";
+ this.recordingName = hash + ".mp4";
calcVideoWidthHeight();
this.copyFileToCurrentRoom.doCall();
</handler>
Modified: openmeetings/application/branches/3.2.x/openmeetings-util/src/main/java/org/apache/openmeetings/util/StoredFile.java
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-util/src/main/java/org/apache/openmeetings/util/StoredFile.java?rev=1761322&r1=1761321&r2=1761322&view=diff
==============================================================================
--- openmeetings/application/branches/3.2.x/openmeetings-util/src/main/java/org/apache/openmeetings/util/StoredFile.java (original)
+++ openmeetings/application/branches/3.2.x/openmeetings-util/src/main/java/org/apache/openmeetings/util/StoredFile.java Sun Sep 18 12:01:46 2016
@@ -18,6 +18,8 @@
*/
package org.apache.openmeetings.util;
+import static org.apache.openmeetings.util.OmFileHelper.EXTENSION_JPG;
+import static org.apache.openmeetings.util.OmFileHelper.EXTENSION_MP4;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
@@ -43,7 +45,7 @@ public class StoredFile {
private static final Set<String> chartExtensions = new HashSet<>(Arrays.asList("xchart"));
- private static final Set<String> asIsExtensions = new HashSet<>(Arrays.asList("jpg", "xchart"));
+ private static final Set<String> asIsExtensions = new HashSet<>(Arrays.asList(EXTENSION_MP4, EXTENSION_JPG, "xchart"));
private final String name;
private final String ext;
Modified: openmeetings/application/branches/3.2.x/openmeetings-web/src/main/webapp/WEB-INF/classes/openmeetings-applicationContext.xml
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-web/src/main/webapp/WEB-INF/classes/openmeetings-applicationContext.xml?rev=1761322&r1=1761321&r2=1761322&view=diff
==============================================================================
--- openmeetings/application/branches/3.2.x/openmeetings-web/src/main/webapp/WEB-INF/classes/openmeetings-applicationContext.xml (original)
+++ openmeetings/application/branches/3.2.x/openmeetings-web/src/main/webapp/WEB-INF/classes/openmeetings-applicationContext.xml Sun Sep 18 12:01:46 2016
@@ -83,7 +83,6 @@
<bean id="openmeetings.FileProcessor" class="org.apache.openmeetings.core.data.file.FileProcessor" />
<bean id="openmeetings.FlvExplorerConverter" class="org.apache.openmeetings.core.converter.FlvExplorerConverter" />
<bean id="errorservice.service" class="org.apache.openmeetings.core.remote.ErrorService" />
- <bean id="conferenceservice.service" class="org.apache.openmeetings.core.remote.ConferenceService" />
<bean id="recordingservice.service" class="org.apache.openmeetings.core.remote.RecordingService" />
<bean id="mobile.service" class="org.apache.openmeetings.core.remote.MobileService" />
<bean id="openmeetings.RecordingConverterTask" class="org.apache.openmeetings.core.data.record.converter.RecordingConverterTask" />
Modified: openmeetings/application/branches/3.2.x/openmeetings-webservice/src/main/java/org/apache/openmeetings/webservice/UserWebService.java
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-webservice/src/main/java/org/apache/openmeetings/webservice/UserWebService.java?rev=1761322&r1=1761321&r2=1761322&view=diff
==============================================================================
--- openmeetings/application/branches/3.2.x/openmeetings-webservice/src/main/java/org/apache/openmeetings/webservice/UserWebService.java (original)
+++ openmeetings/application/branches/3.2.x/openmeetings-webservice/src/main/java/org/apache/openmeetings/webservice/UserWebService.java Sun Sep 18 12:01:46 2016
@@ -41,7 +41,7 @@ import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;
import org.apache.cxf.feature.Features;
-import org.apache.openmeetings.core.remote.ConferenceService;
+import org.apache.openmeetings.core.session.SessionManager;
import org.apache.openmeetings.db.dao.basic.ConfigurationDao;
import org.apache.openmeetings.db.dao.server.SOAPLoginDao;
import org.apache.openmeetings.db.dao.server.SessiondataDao;
@@ -91,7 +91,7 @@ public class UserWebService implements U
@Autowired
private SessiondataDao sessionDao;
@Autowired
- private ConferenceService conferenceService;
+ private SessionManager sessionManager;
/* (non-Javadoc)
* @see org.apache.openmeetings.webservice.cluster.UserService#login(java.lang.String, java.lang.String)
@@ -347,7 +347,7 @@ public class UserWebService implements U
public int count(@WebParam(name="sid") @QueryParam("sid") String sid, @WebParam(name="roomid") @PathParam("roomid") Long roomId) {
Sessiondata sd = sessionDao.check(sid);
if (AuthLevelUtil.hasUserLevel(userDao.getRights(sd.getUserId()))) {
- return conferenceService.getRoomClientsListByRoomId(roomId).size();
+ return sessionManager.getClientListByRoom(roomId).size();
}
return -1;
}
Modified: openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/converter/FlvExplorerConverter.java
URL: http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/converter/FlvExplorerConverter.java?rev=1761322&r1=1761321&r2=1761322&view=diff
==============================================================================
--- openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/converter/FlvExplorerConverter.java (original)
+++ openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/converter/FlvExplorerConverter.java Sun Sep 18 12:01:46 2016
@@ -18,8 +18,8 @@
*/
package org.apache.openmeetings.core.converter;
-import static org.apache.openmeetings.util.OmFileHelper.EXTENSION_MP4;
import static org.apache.openmeetings.util.OmFileHelper.EXTENSION_JPG;
+import static org.apache.openmeetings.util.OmFileHelper.EXTENSION_MP4;
import static org.apache.openmeetings.util.OpenmeetingsVariables.webAppRootKey;
import java.io.File;
@@ -29,7 +29,6 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.apache.openmeetings.db.dao.file.FileExplorerItemDao;
-import org.apache.openmeetings.db.dao.file.FileItemLogDao;
import org.apache.openmeetings.db.entity.file.FileExplorerItem;
import org.apache.openmeetings.db.entity.file.FileItem.Type;
import org.apache.openmeetings.util.process.ConverterProcessResult;
@@ -45,8 +44,6 @@ public class FlvExplorerConverter extend
// Spring loaded Beans
@Autowired
private FileExplorerItemDao fileDao;
- @Autowired
- private FileItemLogDao fileLogDao;
private static class FlvDimension {
public FlvDimension(int width, int height) {
@@ -58,43 +55,43 @@ public class FlvExplorerConverter extend
}
public List<ConverterProcessResult> convertToMP4(FileExplorerItem f, String ext) {
- List<ConverterProcessResult> returnLog = new ArrayList<ConverterProcessResult>();
+ List<ConverterProcessResult> logs = new ArrayList<ConverterProcessResult>();
try {
File mp4 = f.getFile(EXTENSION_MP4);
f.setType(Type.Video);
+ ConverterProcessResult res;
+ if (EXTENSION_MP4.equals(ext)) {
+ String[] args = new String[] { getPathToFFMPEG(), "-i", f.getFile(ext).getCanonicalPath() };
+ res = ProcessHelper.executeScript("Info ID :: " + f.getId(), args);
+ res.setExitCode(0); //normal code is 1, ffmpeg requires output file
+ } else {
+ String[] args = new String[] { getPathToFFMPEG(), "-y", "-i", f.getFile(ext).getCanonicalPath(),
+ "-c:a", "aac", "-c:v", "h264", mp4.getCanonicalPath() };
+ res = ProcessHelper.executeScript("uploadFLV ID :: " + f.getId(), args);
- String[] argv_fullFLV = new String[] { getPathToFFMPEG(), "-y", "-i", f.getFile(ext).getCanonicalPath(),
- "-c:a", "aac", "-c:v", "h264", mp4.getCanonicalPath() };
-
- ConverterProcessResult returnMapConvertFLV = ProcessHelper.executeScript("uploadFLV ID :: " + f.getId(), argv_fullFLV);
-
+ }
+ logs.add(res);
//Parse the width height from the FFMPEG output
- FlvDimension flvDimension = getFlvDimension(returnMapConvertFLV.getError());
- int flvWidth = flvDimension.width;
- int flvHeight = flvDimension.height;
-
- f.setFlvWidth(flvWidth);
- f.setFlvHeight(flvHeight);
-
- returnLog.add(returnMapConvertFLV);
-
+ FlvDimension dim = getFlvDimension(res.getError());
+ f.setFlvWidth(dim.width);
+ f.setFlvHeight(dim.height);
File jpeg = f.getFile(EXTENSION_JPG);
String[] argv_previewFLV = new String[] { getPathToFFMPEG(), "-y", "-i",
mp4.getCanonicalPath(), "-codec:v", "mjpeg", "-vframes", "1", "-an",
- "-f", "rawvideo", "-s", flvWidth + "x" + flvHeight,
+ "-f", "rawvideo", "-s", dim.width + "x" + dim.height,
jpeg.getCanonicalPath() };
- returnLog.add(ProcessHelper.executeScript("previewUpload ID :: " + f.getId(), argv_previewFLV));
+ logs.add(ProcessHelper.executeScript("previewUpload ID :: " + f.getId(), argv_previewFLV));
fileDao.update(f);
} catch (Exception err) {
log.error("[convertToFLV]", err);
- returnLog.add(new ConverterProcessResult("convertToMP4", err.getMessage(), err));
+ logs.add(new ConverterProcessResult("convertToMP4", err.getMessage(), err));
}
- return returnLog;
+ return logs;
}
private static FlvDimension getFlvDimension(String txt) throws Exception {
Modified: openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/converter/InterviewConverter.java
URL: http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/converter/InterviewConverter.java?rev=1761322&r1=1761321&r2=1761322&view=diff
==============================================================================
--- openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/converter/InterviewConverter.java (original)
+++ openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/converter/InterviewConverter.java Sun Sep 18 12:01:46 2016
@@ -29,6 +29,7 @@ import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
+import java.util.UUID;
import org.apache.openmeetings.db.dao.file.FileItemLogDao;
import org.apache.openmeetings.db.dao.record.RecordingDao;
@@ -38,6 +39,7 @@ import org.apache.openmeetings.db.entity
import org.apache.openmeetings.util.OmFileHelper;
import org.apache.openmeetings.util.process.ConverterProcessResult;
import org.apache.openmeetings.util.process.ProcessHelper;
+import org.apache.wicket.util.string.Strings;
import org.red5.logging.Red5LoggerFactory;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
@@ -63,9 +65,9 @@ public class InterviewConverter extends
private String[] mergeAudioToWaves(List<File> waveFiles, File wav,
List<RecordingMetaData> metaDataList, ReConverterParams rcv) throws IOException {
- String[] argv_full_sox = new String[waveFiles.size() + 5];
- argv_full_sox[0] = this.getPathToSoX();
- argv_full_sox[1] = "-m";
+ String[] cmdSox = new String[waveFiles.size() + 5];
+ cmdSox[0] = this.getPathToSoX();
+ cmdSox[1] = "-m";
int counter = 2;
for (File _wav : waveFiles) {
@@ -74,22 +76,22 @@ public class InterviewConverter extends
if (hashFileFullNameStored.equals(_wav.getName())) {
if (metaData.getInteriewPodId() == 1) {
- argv_full_sox[counter] = "-v " + rcv.leftSideLoud;
+ cmdSox[counter] = "-v " + rcv.leftSideLoud;
counter++;
}
if (metaData.getInteriewPodId() == 2) {
- argv_full_sox[counter] = "-v " + rcv.rightSideLoud;
+ cmdSox[counter] = "-v " + rcv.rightSideLoud;
counter++;
}
}
}
- argv_full_sox[counter] = _wav.getCanonicalPath();
+ cmdSox[counter] = _wav.getCanonicalPath();
counter++;
}
- argv_full_sox[counter] = wav.getCanonicalPath();
+ cmdSox[counter] = wav.getCanonicalPath();
- return argv_full_sox;
+ return cmdSox;
}
@Override
@@ -102,15 +104,18 @@ public class InterviewConverter extends
try {
r = recordingDao.get(id);
log.debug("recording " + r.getId());
+ if (Strings.isEmpty(r.getHash())) {
+ r.setHash(UUID.randomUUID().toString());
+ }
r.setStatus(Recording.Status.CONVERTING);
r = recordingDao.update(r);
- List<ConverterProcessResult> returnLog = new ArrayList<>();
+ List<ConverterProcessResult> logs = new ArrayList<>();
List<File> waveFiles = new ArrayList<>();
File streamFolder = getStreamFolder(r);
List<RecordingMetaData> metaDataList = metaDataDao.getAudioMetaDataByRecording(r.getId());
- stripAudioFirstPass(r, returnLog, waveFiles, streamFolder, metaDataList);
+ stripAudioFirstPass(r, logs, waveFiles, streamFolder, metaDataList);
// Merge Wave to Full Length
File streamFolderGeneral = getStreamsHibernateDir();
@@ -128,7 +133,7 @@ public class InterviewConverter extends
argv_full_sox = mergeAudioToWaves(waveFiles, wav);
}
- returnLog.add(ProcessHelper.executeScript("mergeAudioToWaves", argv_full_sox));
+ logs.add(ProcessHelper.executeScript("mergeAudioToWaves", argv_full_sox));
} else {
// create default Audio to merge it.
// strip to content length
@@ -137,9 +142,9 @@ public class InterviewConverter extends
// Calculate delta at beginning
double deltaPadding = diffSeconds(r.getRecordEnd(), r.getRecordStart());
- String[] argv_full_sox = new String[] { getPathToSoX(), outputWav.getCanonicalPath(), wav.getCanonicalPath(), "pad", "0", "" + deltaPadding };
+ String[] cmdSox = new String[] { getPathToSoX(), outputWav.getCanonicalPath(), wav.getCanonicalPath(), "pad", "0", "" + deltaPadding };
- returnLog.add(ProcessHelper.executeScript("generateSampleAudio", argv_full_sox));
+ logs.add(ProcessHelper.executeScript("generateSampleAudio", cmdSox));
}
// Default Image for empty interview video pods
final File defaultInterviewImageFile = new File(streamFolderGeneral, "default_interview_image.png");
@@ -172,7 +177,7 @@ public class InterviewConverter extends
, "-f", "null"
, "file.null"};
ConverterProcessResult res = ProcessHelper.executeScript("checkFlvPod_" + pod , args);
- returnLog.add(res);
+ logs.add(res);
if (res.isOk()) {
//TODO need to remove smallest gap
long diff = diff(meta.getRecordStart(), meta.getRecording().getRecordStart());
@@ -188,7 +193,7 @@ public class InterviewConverter extends
, "-t", formatMillis(diff) //
, "-pix_fmt", "yuv420p" //
, podPB };
- returnLog.add(ProcessHelper.executeScript("blankFlvPod_" + pod , argsPodB));
+ logs.add(ProcessHelper.executeScript("blankFlvPod_" + pod , argsPodB));
//ffmpeg -y -i out.flv -i rec_15_stream_4_2014_07_15_20_41_03.flv -filter_complex '[0:0]setsar=1/1[sarfix];[1:0]scale=320:260,setsar=1/1[scale];[sarfix] [scale] concat=n=2:v=1:a=0 [v]' -map '[v]' output1.flv
File podF = new File(streamFolder, OmFileHelper.getName(meta.getStreamName() + "_pod_" + pod, EXTENSION_FLV));
@@ -199,7 +204,7 @@ public class InterviewConverter extends
, "-filter_complex", String.format("[0:0]setsar=1/1[sarfix];[1:0]scale=%1$d:%2$d,setsar=1/1[scale];[sarfix] [scale] concat=n=2:v=1:a=0 [v]", flvWidth, flvHeight) //
, "-map", "[v]" //
, podP };
- returnLog.add(ProcessHelper.executeScript("shiftedFlvPod_" + pod , argsPod));
+ logs.add(ProcessHelper.executeScript("shiftedFlvPod_" + pod , argsPod));
pods[pod - 1] = podP;
} else {
@@ -213,7 +218,8 @@ public class InterviewConverter extends
ConverterProcessResult res = new ConverterProcessResult();
res.setProcess("CheckFlvFilesExists");
res.setError("No valid pods found");
- returnLog.add(res);
+ res.setExitCode(-1);
+ logs.add(res);
return;
}
boolean shortest = false;
@@ -255,7 +261,7 @@ public class InterviewConverter extends
File flv = r.getFile(EXTENSION_FLV);
args.add(flv.getCanonicalPath());
// TODO additional flag to 'quiet' output should be added
- returnLog.add(ProcessHelper.executeScript("generateFullBySequenceFLV", args.toArray(new String[]{})));
+ logs.add(ProcessHelper.executeScript("generateFullBySequenceFLV", args.toArray(new String[]{})));
r.setFlvWidth(2 * flvWidth);
r.setFlvHeight(flvHeight);
@@ -276,21 +282,21 @@ public class InterviewConverter extends
"-s", (2 * flvWidth) + "x" + flvHeight, //
jpg.getCanonicalPath() };
- returnLog.add(ProcessHelper.executeScript("generateFullFLV", argv_previewFLV));
+ logs.add(ProcessHelper.executeScript("generateFullFLV", argv_previewFLV));
File avi = r.getFile(EXTENSION_AVI);
deleteFileIfExists(avi);
String[] argv_alternateDownload = new String[] { getPathToFFMPEG(), "-y", "-i", flv.getCanonicalPath(), avi.getCanonicalPath() };
- returnLog.add(ProcessHelper.executeScript("alternateDownload", argv_alternateDownload));
+ logs.add(ProcessHelper.executeScript("alternateDownload", argv_alternateDownload));
updateDuration(r);
- convertToMp4(r, returnLog);
+ convertToMp4(r, logs);
r.setStatus(Recording.Status.PROCESSED);
logDao.delete(r);
- for (ConverterProcessResult returnMap : returnLog) {
+ for (ConverterProcessResult returnMap : logs) {
logDao.add("generateFFMPEG", r, returnMap);
}