Author: sebawagner
Date: Sat Feb 18 14:13:47 2012
New Revision: 1245924
URL: http://svn.apache.org/viewvc?rev=1245924&view=rev
Log:
OPENMEETINGS-54 fix recorder to use new audio/video components and fix
recording itself to reference correct streams => fixes seek in recording, fixes
closing the rtmp connection of the audio/video container before leaving the
recorder-playback module (lzrecordcontent)
Modified:
incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/contentviews/baseContentView.lzx
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzrecordcontent/contentviews/lzRecordingsViewAdapter.lzx
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzrecordcontent/contentviews/lzRecordingsViewMain.lzx
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzrecordcontent/lzRecordContent.lzx
incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/base/remote/baseVideoStream.lzx
incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/hibAdapter.lzx
Modified:
incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/contentviews/baseContentView.lzx
URL:
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/contentviews/baseContentView.lzx?rev=1245924&r1=1245923&r2=1245924&view=diff
==============================================================================
---
incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/contentviews/baseContentView.lzx
(original)
+++
incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/contentviews/baseContentView.lzx
Sat Feb 18 14:13:47 2012
@@ -22,6 +22,11 @@
<class name="baseContentView" extends="view">
+ <!---
+ If destroyByMethod is true, the clear content call will not destroy
the views, but the method
+ ontabcontentleave is still invoked, this can be handy if some
connections must be closed before
+ destroying / leaving the module, you could probably also use it to
confirm leaving the module
+ -->
<attribute name="destroyByMethod" value="false" type="boolean" />
<event name="ontabcontentleave" />
Modified:
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzrecordcontent/contentviews/lzRecordingsViewAdapter.lzx
URL:
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzrecordcontent/contentviews/lzRecordingsViewAdapter.lzx?rev=1245924&r1=1245923&r2=1245924&view=diff
==============================================================================
---
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzrecordcontent/contentviews/lzRecordingsViewAdapter.lzx
(original)
+++
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzrecordcontent/contentviews/lzRecordingsViewAdapter.lzx
Sat Feb 18 14:13:47 2012
@@ -31,6 +31,7 @@
<event name="onUpdateRecordingStreamTime" />
<event name="onTogglePlayRecordingStream" />
+ <event name="onRecordingStoppedAndDisconnected" />
<method name="getTime">
return this.currentTime;
@@ -51,7 +52,10 @@
if ($debug) Debug.write("LC togglePlayRecordingStream ::");
t.onTogglePlayRecordingStream.sendEvent();
}
-
+ canvas.videoComp_lc.recordingStoppedAndDisconnected = function() {
+ if ($debug) Debug.write("LC togglePlayRecordingStream ::");
+ t.onRecordingStoppedAndDisconnected.sendEvent();
+ }
</handler>
<method name="connect">
@@ -79,6 +83,7 @@
<method name="seek" args="flvTime">
if ($debug) Debug.write("seek ",flvTime);
+ canvas.lc.send(canvas.rtmp_lc_name, "seekRecordingPlayback",
flvTime);
</method>
<method name="pause" args="pauseBool">
@@ -91,6 +96,11 @@
canvas.lc.send(canvas.rtmp_lc_name, "stopRecordingStream");
</method>
+ <method name="stopAndCloseConnection">
+ if ($debug) Debug.write("SEND stopAndCloseConnection ");
+ canvas.lc.send(canvas.rtmp_lc_name, "stopAndCloseRecordingConnection");
+ </method>
+
</class>
</library>
\ No newline at end of file
Modified:
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzrecordcontent/contentviews/lzRecordingsViewMain.lzx
URL:
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzrecordcontent/contentviews/lzRecordingsViewMain.lzx?rev=1245924&r1=1245923&r2=1245924&view=diff
==============================================================================
---
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzrecordcontent/contentviews/lzRecordingsViewMain.lzx
(original)
+++
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzrecordcontent/contentviews/lzRecordingsViewMain.lzx
Sat Feb 18 14:13:47 2012
@@ -46,6 +46,9 @@
<attribute name="deltaInSeconds" value="0" type="number"/>
+ <!-- invoked after the connection in the audio/video container was
closed -->
+ <event name="onRecordingStoppedAndDisconnected" />
+
<method name="connect">
this._content._videostream.connect();
</method>
@@ -314,15 +317,26 @@
]]>
</method>
+ <method name="stopStreamAndCloseRecorder">
+ this._stopStream();
+ this._content._videostream.stopAndCloseConnection();
+ </method>
+
<method name="stopStream">
+ this._stopStream();
+ this._content._videostream.stop();
+ </method>
+
+ <!---
+ @keywords private
+ -->
+ <method name="_stopStream">
if (this.timerDelegateStarted) {
- this.timerDelegateStarted = false;
+ this.timerDelegateStarted = false;
}
- parent._recordingsViewBottom.stopProgress();
+ parent._recordingsViewBottom.stopProgress();
this._progress._progressbar._time.setAttribute("text","");
this._progress._progressbar._pointer.setAttribute("x",0);
- this._content._preview.bringToFront();
- this._content._videostream.stop();
</method>
<view name="_content" height="${ parent.height-32-18 }" y="32">
@@ -334,10 +348,7 @@
<![CDATA[
var prop2 = [this, "height"];
this.applyConstraintMethod("setItemContraints", prop2);
-
this.setItemContraints(0);
-
- this._preview.bringToFront();
]]>
</handler>
@@ -381,22 +392,12 @@
parent.parent.toggleStream();
</handler>
- </lzRecordingsViewAdapter>
-
- <!--
- <baseVideoStream name="_videostream" bgcolor="0x000000"
- width="${parent.width}" height="${parent.height}">
- <handler name="onPlayStatus" args="info">
- if ($debug) Debug.write("onPlayStatus ",info);
- if (info.code == "NetStream.Play.Complete" ) {
- parent.parent.stopStream();
- }
+ <handler name="onRecordingStoppedAndDisconnected">
+ if ($debug)
Debug.write("onRecordingStoppedAndDisconnected ");
+
parent.parent.onRecordingStoppedAndDisconnected.sendEvent();
</handler>
- <handler name="onMetaData" args="info">
- if ($debug) Debug.write("onMetaData ",info);
- </handler>
- </baseVideoStream>
- -->
+
+ </lzRecordingsViewAdapter>
</view>
Modified:
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzrecordcontent/lzRecordContent.lzx
URL:
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzrecordcontent/lzRecordContent.lzx?rev=1245924&r1=1245923&r2=1245924&view=diff
==============================================================================
---
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzrecordcontent/lzRecordContent.lzx
(original)
+++
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzrecordcontent/lzRecordContent.lzx
Sat Feb 18 14:13:47 2012
@@ -25,7 +25,7 @@
View for recorded contents list.
When you select 'Recordings' on the top menu, this class shows the list.
-->
-<class name="lzRecordContent" extends="baseContentView">
+<class name="lzRecordContent" extends="baseContentView"
destroyByMethod="true">
<handler name="oninit">
_mainScrollBar.setAttribute("visibility","hidden");
@@ -34,12 +34,19 @@
<handler name="ontabcontentleave">
_mainScrollBar.setAttribute("visibility","visible");
- this._recordingsViewMain.stopStream();
+ this._recordingsViewMain.stopStreamAndCloseRecorder();
</handler>
<lzRecordNavigation name="_navigationArea" />
- <lzRecordingsViewMain name="_recordingsViewMain" />
+ <lzRecordingsViewMain name="_recordingsViewMain">
+
+ <handler name="onRecordingStoppedAndDisconnected" args="tRef">
+ parent.destroy();
+ loadContentByTempActionForNavi();
+ </handler>
+
+ </lzRecordingsViewMain>
<lzRecordingsViewBottom name="_recordingsViewBottom" />
Modified:
incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/base/remote/baseVideoStream.lzx
URL:
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/base/remote/baseVideoStream.lzx?rev=1245924&r1=1245923&r2=1245924&view=diff
==============================================================================
---
incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/base/remote/baseVideoStream.lzx
(original)
+++
incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/base/remote/baseVideoStream.lzx
Sat Feb 18 14:13:47 2012
@@ -244,6 +244,10 @@
}
</method>
+ <!---
+ pause or resumes the NetStream
+ @args pauseStatus true pause, false resume
+ -->
<method name="pause" args="pauseStatus">
if ($debug) Debug.write("do Pause",pauseStatus);
if (this._ns==null){
@@ -256,6 +260,20 @@
this._ns.resume();
}
</method>
+
+ <!---
+ Seek the stream to a flvTime
+ this might only work if there are keyframes in the FLV, normally it
should
+ try to use the nearest keyframe available for the specified time.
+ -->
+ <method name="seekStream" args="flvTime">
+ if ($debug) Debug.write("do seek",flvTime);
+ if (this._ns==null){
+ if ($debug) Debug.warn("No NetStream");
+ return;
+ }
+ this._ns.seek(flvTime);
+ </method>
</class>
Modified:
incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/hibAdapter.lzx
URL:
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/hibAdapter.lzx?rev=1245924&r1=1245923&r2=1245924&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/hibAdapter.lzx
(original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/hibAdapter.lzx
Sat Feb 18 14:13:47 2012
@@ -32,6 +32,8 @@
client.updateRecordingVideoPosition =
this.updateRecordingVideoPosition;
client.stopRecordingStream = this.stopRecordingStream;
client.pauseRecordingPlayback = this.pauseRecordingPlayback;
+ client.seekRecordingPlayback = this.seekRecordingPlayback;
+ client.stopAndCloseRecordingConnection =
this.stopAndCloseRecordingConnection;
var rtmpLC:LocalConnection = new LocalConnection();
rtmpLC.connect(canvas.rtmp_lc_name);
@@ -115,6 +117,7 @@
<method name="playRecordingStream"
args="streamName,delay,x,y,width,height">
if($debug) Debug.write("playRecordingStream
",streamName,x,y,width,height);
if (this.baseVideoStream == null) {
+ if ($debug) Debug.warn("baseVideoStream is NULL");
return;
}
this.baseVideoStream.setAttribute("x",x);
@@ -130,6 +133,7 @@
-->
<method name="updateRecordingVideoPosition" args="width,height">
if (this.baseVideoStream == null) {
+ if ($debug) Debug.warn("baseVideoStream is NULL");
return;
}
this.baseVideoStream.setAttribute("width",width);
@@ -142,6 +146,7 @@
<method name="stopRecordingStream">
if($debug) Debug.write("stopRecordingStream ");
if (this.baseVideoStream == null) {
+ if ($debug) Debug.warn("baseVideoStream is NULL");
return;
}
if($debug) Debug.write(" stopRecording ");
@@ -155,10 +160,34 @@
<method name="pauseRecordingPlayback" args="pauseBool">
if($debug) Debug.write("pauseRecordingPlayback ");
if (this.baseVideoStream == null) {
+ if ($debug) Debug.warn("baseVideoStream is NULL");
return;
}
this.baseVideoStream.pause(pauseBool);
</method>
+
+ <method name="seekRecordingPlayback" args="flvTime">
+ if($debug) Debug.write("seekRecordingPlayback ",flvTime);
+ if (this.baseVideoStream == null) {
+ if ($debug) Debug.warn("baseVideoStream is NULL");
+ return;
+ }
+ this.baseVideoStream.seekStream(flvTime);
+ </method>
+
+ <method name="stopAndCloseRecordingConnection">
+ if($debug) Debug.write("stopAndCloseRecordingConnection ");
+ if (this.baseVideoStream == null) {
+ if ($debug) Debug.warn("baseVideoStream is NULL");
+ return;
+ }
+ this.baseVideoStream.stopRecording();
+ this.baseVideoStream.destroy();
+ this.baseVideoStream = null;
+ canvas.thishib.disconnect();
+ // send back confirmation to leave the module
+ canvas.videoComp_lc.send(canvas.videoComp_lc_name,
'recordingStoppedAndDisconnected');
+ </method>
</class>