You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openmeetings.apache.org by se...@apache.org on 2012/02/18 18:59:46 UTC

svn commit: r1290832 - in /incubator/openmeetings/trunk/singlewebapp: WebContent/swf10/video/ src/app/org/openmeetings/app/data/flvrecord/converter/ src/app/org/openmeetings/app/persistence/beans/recording/ src/app/org/openmeetings/app/remote/ src/app/...

Author: sebawagner
Date: Sat Feb 18 17:59:45 2012
New Revision: 1290832

URL: http://svn.apache.org/viewvc?rev=1290832&view=rev
Log:
OPENMEETINGS-54 fix recorder to use new audio/video components and fix recording itself to reference correct streams => Fix exception in stop recording method. Basically recording should not throw NullPointers anymore, however there seems to be sound cut off at the recordings, with SoundCodec.SPEEX ffmpeg is not able to correctly strip the audio from the flv, nellymoser seems to be fine

Modified:
    incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/video/editRecordStreamSWF10.lzx
    incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/app/data/flvrecord/converter/FlvRecorderConverter.java
    incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/app/persistence/beans/recording/RoomClient.java
    incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/app/remote/FLVRecorderService.java
    incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/app/remote/red5/ScopeApplicationAdapter.java

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/video/editRecordStreamSWF10.lzx
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/video/editRecordStreamSWF10.lzx?rev=1290832&r1=1290831&r2=1290832&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/video/editRecordStreamSWF10.lzx (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/video/editRecordStreamSWF10.lzx Sat Feb 18 17:59:45 2012
@@ -186,8 +186,8 @@
 			if (valMic != null) {
 			     _micro = Microphone.getMicrophone(valMic);
 			     if (_micro != null) {
-				     _micro.codec = SoundCodec.SPEEX;
-				     _micro.framesPerPacket = 1;
+				     _micro.codec = SoundCodec.NELLYMOSER;
+				     //_micro.framesPerPacket = 1;
 				     _micro.setSilenceLevel(0, 2000);
 				     _micro.gain = 50;
 				     // this has no effect if enhanced microphone is obtained

Modified: incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/app/data/flvrecord/converter/FlvRecorderConverter.java
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/app/data/flvrecord/converter/FlvRecorderConverter.java?rev=1290832&r1=1290831&r2=1290832&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/app/data/flvrecord/converter/FlvRecorderConverter.java (original)
+++ incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/app/data/flvrecord/converter/FlvRecorderConverter.java Sat Feb 18 17:59:45 2012
@@ -270,6 +270,7 @@ public class FlvRecorderConverter extend
 						"generateFFMPEG", flvRecording, returnMap);
 			}
 
+			if (true) return;
 			// Delete Wave Files
 			for (String fileName : listOfFullWaveFiles) {
 				File audio = new File(fileName);

Modified: incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/app/persistence/beans/recording/RoomClient.java
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/app/persistence/beans/recording/RoomClient.java?rev=1290832&r1=1290831&r2=1290832&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/app/persistence/beans/recording/RoomClient.java (original)
+++ incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/app/persistence/beans/recording/RoomClient.java Sat Feb 18 17:59:45 2012
@@ -35,7 +35,7 @@ import javax.persistence.Transient;
 @Entity
 @Table(name = "roomclient")
 public class RoomClient implements Serializable {
-	   
+	
 	private static final long serialVersionUID = 1831858089607111565L;
 
 	@Id
@@ -692,6 +692,9 @@ public class RoomClient implements Seria
 				+ " screenPublishStarted: " + this.isScreenPublishStarted() //
 				+ " flvRecordingMetaDataId: " + this.getFlvRecordingMetaDataId() //
 				+ " isRecording: " + this.getIsRecording() //
+				+ " isAVClient: " + this.getIsAVClient() //
+				+ " broadCastID: " + this.getBroadCastID() //
+				+ " avsettings: " + this.getAvsettings() //
 				;
 	}
 	

Modified: incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/app/remote/FLVRecorderService.java
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/app/remote/FLVRecorderService.java?rev=1290832&r1=1290831&r2=1290832&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/app/remote/FLVRecorderService.java (original)
+++ incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/app/remote/FLVRecorderService.java Sat Feb 18 17:59:45 2012
@@ -237,9 +237,10 @@ public class FLVRecorderService implemen
 							// if the user does publish av, a, v
 							// But we only record av or a, video only is not
 							// interesting
-							(rcl.getAvsettings().equals("av")
+							(rcl.getIsAVClient() &&
+									(rcl.getAvsettings().equals("av")
 									|| rcl.getAvsettings().equals("a")
-									|| rcl.getAvsettings().equals("v")) {
+									|| rcl.getAvsettings().equals("v"))) {
 
 								String streamName = generateFileName(
 										flvRecordingId,
@@ -357,7 +358,7 @@ public class FLVRecorderService implemen
 	 * @param broadcastId
 	 */
 	@Deprecated
-	public void _stopRecordingShow(IConnection conn, String broadcastId) {
+	public void _stopRecordingShowASD(IConnection conn, String broadcastId) {
 		try {
 
 			log.debug("** stopRecordingShow: " + conn);
@@ -388,6 +389,12 @@ public class FLVRecorderService implemen
 	public void stopRecordingShow(IConnection conn, String broadcastId,
 			Long flvRecordingMetaDataId) {
 		try {
+			
+			if (flvRecordingMetaDataId == null) {
+				//this should be fixed, can be useful for debugging, after all this is an error
+				//but we don't want the application to completely stop the process
+				log.error("flvRecordingMetaDataId is null");
+			}
 
 			log.debug("** stopRecordingShow: " + conn);
 			log.debug("### Stop recording show for broadcastId: " + broadcastId
@@ -402,6 +409,7 @@ public class FLVRecorderService implemen
 
 			ClientBroadcastStream stream = (ClientBroadcastStream) streamToClose;
 
+			//Iterate through all stream listeners and stop the appropriate
 			if (stream.getStreamListeners() != null) {
 
 				for (Iterator<IStreamListener> iter = stream
@@ -462,7 +470,7 @@ public class FLVRecorderService implemen
 							// currentClient }, this);
 							// }
 
-							log.debug("is this users still alive? :" + rcl);
+							log.debug("is this users still alive? stop it :" + rcl);
 
 							if (rcl.getIsScreenClient()) {
 
@@ -481,9 +489,10 @@ public class FLVRecorderService implemen
 													new Date());
 								}
 
-							} else if (rcl.getAvsettings().equals("av")
+							} else if (rcl.getIsAVClient()
+									&& (rcl.getAvsettings().equals("av")
 									|| rcl.getAvsettings().equals("a")
-									|| rcl.getAvsettings().equals("v")) {
+									|| rcl.getAvsettings().equals("v"))) {
 
 								stopRecordingShow(conn,
 										String.valueOf(rcl.getBroadCastID())
@@ -593,8 +602,7 @@ public class FLVRecorderService implemen
 			// the same type of event.
 			// StreamService.addRoomClientEnterEventFunc(rcl, roomrecordingName,
 			// rcl.getUserip(), false);
-			log.error("### stopRecordingShowForClient: " + rcl.getIsRecording()
-					+ "," + rcl.getUsername() + "," + rcl.getUserip());
+			log.debug("### stopRecordingShowForClient: " + rcl);
 
 			if (rcl.getIsScreenClient()) {
 
@@ -614,13 +622,13 @@ public class FLVRecorderService implemen
 									rcl.getFlvRecordingMetaDataId(), new Date());
 				}
 
-			} else if ((rcl.getAvsettings().equals("a")
-					|| rcl.getAvsettings().equals("v") || rcl.getAvsettings()
-					.equals("av"))) {
+			} else if (rcl.getIsAVClient() && 
+					(rcl.getAvsettings().equals("a")
+					|| rcl.getAvsettings().equals("v") 
+					|| rcl.getAvsettings().equals("av"))) {
 
 				// FIXME: Is there really a need to stop it manually if the user
-				// just
-				// stops the stream?
+				// just stops the stream?
 				stopRecordingShow(conn, String.valueOf(rcl.getBroadCastID())
 						.toString(), rcl.getFlvRecordingMetaDataId());
 
@@ -680,9 +688,10 @@ public class FLVRecorderService implemen
 			} else if
 			// if the user does publish av, a, v
 			// But we only record av or a, video only is not interesting
-			(rcl.getAvsettings().equals("av")
+			(rcl.getIsAVClient() && 
+					(rcl.getAvsettings().equals("av")
 					|| rcl.getAvsettings().equals("a")
-					|| rcl.getAvsettings().equals("v")) {
+					|| rcl.getAvsettings().equals("v"))) {
 
 				String streamName = generateFileName(flvRecordingId, String
 						.valueOf(rcl.getBroadCastID()).toString());

Modified: incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/app/remote/red5/ScopeApplicationAdapter.java
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/app/remote/red5/ScopeApplicationAdapter.java?rev=1290832&r1=1290831&r2=1290832&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/app/remote/red5/ScopeApplicationAdapter.java (original)
+++ incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/app/remote/red5/ScopeApplicationAdapter.java Sat Feb 18 17:59:45 2012
@@ -843,7 +843,7 @@ public class ScopeApplicationAdapter ext
 													.getClient().getId());
 									if (clientFunction.equals("closeStream")
 											&& rcl.getIsRecording()) {
-										log.debug("*** sendClientBroadcastNotifications Any Client is Recording - stop that");
+										log.debug("*** stopRecordingShowForClient Any Client is Recording - stop that");
 										// StreamService.stopRecordingShowForClient(conn,
 										// currentClient,
 										// rcl.getRoomRecordingName(), false);