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/05 18:03:48 UTC
svn commit: r1240767 - in /incubator/openmeetings/trunk/singlewebapp:
WebContent/openmeetings/ WebContent/openmeetings/swf10/video/
WebContent/src/modules/conference/participants/
src/app/org/openmeetings/app/data/user/ src/app/org/openmeetings/app/per...
Author: sebawagner
Date: Sun Feb 5 17:03:48 2012
New Revision: 1240767
URL: http://svn.apache.org/viewvc?rev=1240767&view=rev
Log:
OPENMEETINGS-47 fix ScopeApplicationAdapter / sync and message broadcasting mechanism to not send messages to SWF10 client Partly fixed for streamPublishStart and setRoomValues, fixes AV settings to forward to SWF10 client
Removed:
incubator/openmeetings/trunk/singlewebapp/WebContent/openmeetings/Red5.bat
incubator/openmeetings/trunk/singlewebapp/WebContent/openmeetings/base
incubator/openmeetings/trunk/singlewebapp/WebContent/openmeetings/license.txt
incubator/openmeetings/trunk/singlewebapp/WebContent/openmeetings/openmeetings_licence.txt
incubator/openmeetings/trunk/singlewebapp/WebContent/openmeetings/subscribe.lzx.lzr=swf8.swf
Modified:
incubator/openmeetings/trunk/singlewebapp/WebContent/openmeetings/swf10/video/editRecordStreamSWF10.lzx
incubator/openmeetings/trunk/singlewebapp/WebContent/openmeetings/swf10/video/videoObjectPlayBroadcast.lzx
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/participants/participants.lzx
incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/app/data/user/Usermanagement.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/UserService.java
incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/app/remote/WhiteBoardService.java
incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/app/remote/red5/ClientListManager.java
incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/app/remote/red5/ScopeApplicationAdapter.java
incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/app/rtp/RTPStreamReceiver.java
incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/app/rtp/RTPStreamingHandler.java
incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/servlet/outputhandler/RTPMethodServlet.java
incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/servlet/outputhandler/ScreenServlet.java
Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/openmeetings/swf10/video/editRecordStreamSWF10.lzx
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/openmeetings/swf10/video/editRecordStreamSWF10.lzx?rev=1240767&r1=1240766&r2=1240767&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/openmeetings/swf10/video/editRecordStreamSWF10.lzx (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/openmeetings/swf10/video/editRecordStreamSWF10.lzx Sun Feb 5 17:03:48 2012
@@ -103,13 +103,14 @@
<handler name="ondata" args="value">
<![CDATA[
if ($debug) Debug.write("getBroadCastId",value,canvas.publicSID);
-
parent.myvideocontainer = canvas._videoComponent.createVideoObject(canvas.publicSID, true, -1, value);
if ($debug) Debug.write("parent.setUserAVSettings -1- ",parent.chosenSetting);
if ($debug) Debug.write("parent.setUserAVSettings -2- ",parent.remoteMessage);
if ($debug) Debug.write("parent.setUserAVSettings -3- ",parent.cam_default_width);
if ($debug) Debug.write("parent.setUserAVSettings -4- ",parent.cam_default_height);
+ if ($debug) Debug.write("parent.setUserAVSettings -5- ",canvas.currentRoomObject.rooms_id);
+ if ($debug) Debug.write("parent.setUserAVSettings -6- ",canvas.publicSID);
parent.setUserAVSettings.doCall();
]]>
@@ -122,12 +123,13 @@
<netparam><method name="getValue">return parent.parent.remoteMessage;</method></netparam>
<netparam><method name="getValue">return parent.parent.cam_default_width;</method></netparam>
<netparam><method name="getValue">return parent.parent.cam_default_height;</method></netparam>
+ <netparam><method name="getValue">return parent.parent.cam_default_height;</method></netparam>
+ <netparam><method name="getValue">return canvas.publicSID;</method></netparam>
<handler name="ondata" args="value">
<![CDATA[
if ($debug) Debug.write("setUserAVSettings",value);
parent.currentClient = value;
parent.doninitalize();
- //canvas.videoComp_lc.send(canvas.videoComp_lc_callback_name, 'clb_setUserAVSettings', value);
]]>
</handler>
</netRemoteCallHib>
Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/openmeetings/swf10/video/videoObjectPlayBroadcast.lzx
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/openmeetings/swf10/video/videoObjectPlayBroadcast.lzx?rev=1240767&r1=1240766&r2=1240767&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/openmeetings/swf10/video/videoObjectPlayBroadcast.lzx (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/openmeetings/swf10/video/videoObjectPlayBroadcast.lzx Sun Feb 5 17:03:48 2012
@@ -19,7 +19,7 @@
<handler name="oninit">
<![CDATA[
- if ($debug) Debug.write("Init videoObjectPlayBroadcast ",this.name);
+ if ($debug) Debug.write("Init videoObjectPlayBroadcast ",this.isremote,this.clientVars);
//Display widget defined in mother class
this._loudness.bringToFront();
this._resizeview.bringToFront();
Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/participants/participants.lzx
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/participants/participants.lzx?rev=1240767&r1=1240766&r2=1240767&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/participants/participants.lzx (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/participants/participants.lzx Sun Feb 5 17:03:48 2012
@@ -69,6 +69,10 @@
this.getRoomModeratorsByRoomId.doCall();
</method>
+ <!---
+ Returns a list of all moderators of the current room and parses
+ if the current user should receive the supermoderator flag or not
+ -->
<netRemoteCallHib name="getRoomModeratorsByRoomId" funcname="conferenceservice.getRoomModeratorsByRoomId"
remotecontext="$once{ canvas.thishib }" >
<netparam><method name="getValue">return canvas.sessionId;</method></netparam>
@@ -117,6 +121,9 @@
</handler>
</netRemoteCallHib>
+ <!---
+ Returns a list of all users currently in the conference room
+ -->
<netRemoteCallHib name="setRoomValues" funcname="setRoomValues" remotecontext="$once{ canvas.thishib }" >
<attribute name="applyDefaultModeration" value="false" type="boolean" />
<attribute name="organisation_id" value="0" type="number" />
@@ -161,81 +168,14 @@
</handler>
</netRemoteCallHib>
- <!-- invoked if another client logs into the room
- after choosing devices -->
+ <!---
+ invoked if another client logs into the room
+ after choosing devices
+ -->
<method name="setAVSettingsToClient" args="rcl">
- if ($debug) Debug.write("setAVSettingsToClient ",rcl.publicSID,rcl);
- var obj = this.getVideoObjectByPublicSID(rcl.publicSID);
- if ($debug) Debug.write("setAVSettingsToClient: ",obj,rcl.avsettings);
- if (obj == null) {
- if ($debug) Debug.warn("Could Not Find Instance setAVSettingsToClient ",rcl.publicSID);
- return;
- }
- if (rcl.avsettings=="n"){
- obj.setAttribute("visibility","hidden");
- obj.setVideouserProfilePic(rcl);
- } else if (rcl.avsettings=="a"){
- obj.setVideouserProfilePic(rcl);
- obj.setAttribute("visibility","hidden");
- } else {
- obj.deleteVideoConfProfilePic();
- obj.setAttribute("visibility","visible");
- }
- obj.clientVars = rcl;
- obj.updateAVSettingsSymbol(rcl);
+ this._videoviewcontent.setAVSettingsToClient(rcl);
</method>
-
- <!--- get a baseVideoObject by a Users publicSID
- @param string publicSID publicSID
- -->
- <method name="getVideoObjectByPublicSID" args="publicSID">
- <![CDATA[
- if(canvas.currentRoomObj.hideWhiteboard){
- var videoContainer = canvas.currentBaseConferenceRoom._videoviewcontent_hideWhiteboard._inn;
-
- for (var i=0;i<videoContainer.subviews.length;i++){
- //if ($debug) Debug.write("getVideoObjectByBroadCastId2 broadcastId VIEW: ",this._videoviewcontent.subviews[i].broadcastId);
- //if ($debug) Debug.write("getVideoObjectByBroadCastId3 broadcastId SEARCH: ",broadcastId);
- //if ($debug) Debug.write("getVideoObjectByBroadCastId4 obj: ",this._videoviewcontent.subviews[i]);
- //if ($debug) Debug.write("getVideoObjectByBroadCastId5 streamid,user_id: ",this._videoviewcontent.subviews[i].clientVars.streamid,this._videoviewcontent.subviews[i].clientVars.user_id);
- if (videoContainer.subviews[i].publicSID==publicSID){
- return videoContainer.subviews[i];
- }
- }
-
- if ($debug) Debug.warn(" - getVideoObjectByPublicSID - DID NOT FIND THE USER BY ",publicSID);
-
- return null;
- }else{
- //if ($debug) Debug.write("getVideoObjectByPublicSid SEARCH: ",publicSID,parent.parent);
-
- //for (var i=0;i<this._videoviewcontent.subviews.length;i++){
- // if ($debug) Debug.write("getVideoObjectByBroadCastId6 broadcastId: ",this._videoviewcontent.subviews[i].broadcastId);
- // if ($debug) Debug.write("getVideoObjectByBroadCastId7 streamid,user_id: ",this._videoviewcontent.subviews[i].clientVars.streamid,this._videoviewcontent.subviews[i].clientVars.user_id);
- //}
- var videoContainer = this._videoviewcontent;
- if (this.userNewVideoContainer) {
- videoContainer = parent.parent._videoviewcontent;
- }
-
- for (var i=0;i<videoContainer.subviews.length;i++){
- //if ($debug) Debug.write("getVideoObjectByBroadCastId2 broadcastId VIEW: ",this._videoviewcontent.subviews[i].broadcastId);
- //if ($debug) Debug.write("getVideoObjectByBroadCastId3 broadcastId SEARCH: ",broadcastId);
- //if ($debug) Debug.write("getVideoObjectByBroadCastId4 obj: ",this._videoviewcontent.subviews[i]);
- //if ($debug) Debug.write("getVideoObjectByBroadCastId5 streamid,user_id: ",this._videoviewcontent.subviews[i].clientVars.streamid,this._videoviewcontent.subviews[i].clientVars.user_id);
- if (videoContainer.subviews[i].publicSID==publicSID){
- return videoContainer.subviews[i];
- }
- }
-
- if ($debug) Debug.warn(" - getVideoObjectByPublicSID - DID NOT FIND THE USER BY ",publicSID);
-
- return null;
- }
- ]]>
- </method>
-
<method name="addItem" args="connectedSince,isMod,streamid,username,userroom,formatedDate,position,color,object">
<![CDATA[
if ($debug) Debug.write("initializeStreams addItem: ",connectedSince,object);
Modified: incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/app/data/user/Usermanagement.java
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/app/data/user/Usermanagement.java?rev=1240767&r1=1240766&r2=1240767&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/app/data/user/Usermanagement.java (original)
+++ incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/app/data/user/Usermanagement.java Sun Feb 5 17:03:48 2012
@@ -1675,7 +1675,7 @@ public class Usermanagement {
if (authLevelManagement.checkAdminLevel(user_level)) {
RoomClient rcl = clientListManager
- .getClientByPublicSID(publicSID);
+ .getClientByPublicSID(publicSID, false);
if (rcl == null) {
return true;
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=1240767&r1=1240766&r2=1240767&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 Sun Feb 5 17:03:48 2012
@@ -66,10 +66,13 @@ public class RoomClient implements Seria
private int vX = 0;
@Column(name="vY")
private int vY = 0;
+ /**
+ * StreamPublishName is used in the screen sharing client to publish the stream
+ */
@Column(name="streamPublishName")
private String streamPublishName = "";
- /*
+ /**
* an unique PUBLIC id,
* this ID is needed as people can reconnect and will get a new
* streamid, but we need to know if this is still the same user
@@ -78,6 +81,9 @@ public class RoomClient implements Seria
* the private Session ID is not written to the RoomClient-Class
* as every instance of the RoomClient is send to all connected users
*
+ * publicSID can be empty if a audio/video user is connected but
+ * didn't choose any device settings or the connection really just
+ * has been initialized
*/
@Column(name="public_sid")
private String publicSID = "";
@@ -106,6 +112,17 @@ public class RoomClient implements Seria
private String formatedDate;
@Column(name="isScreenClient")
private Boolean isScreenClient = false;
+ /**
+ * If true this client is only used to stream audio/video events,
+ * he should not receive any sync events / push messages
+ *
+ * null means not initialized yet
+ * true the user is an audio/video connection
+ * false the user is a regular user with full session object
+ *
+ */
+ @Column(name="isAVClient")
+ private Boolean isAVClient = null;
/*
* the color of the user, only needed in 4x4 Conference, in these rooms each user has its own
@@ -649,6 +666,14 @@ public class RoomClient implements Seria
public void setAllowRecording(Boolean allowRecording) {
this.allowRecording = allowRecording;
}
+
+ public Boolean getIsAVClient() {
+ return isAVClient;
+ }
+
+ public void setIsAVClient(Boolean isAVClient) {
+ this.isAVClient = isAVClient;
+ }
}
Modified: incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/app/remote/UserService.java
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/app/remote/UserService.java?rev=1240767&r1=1240766&r2=1240767&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/app/remote/UserService.java (original)
+++ incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/app/remote/UserService.java Sun Feb 5 17:03:48 2012
@@ -1548,7 +1548,7 @@ public class UserService {
if (authLevelManagement.checkUserLevel(user_level)) {
RoomClient rcl = this.clientListManager
- .getClientByPublicSID(publicSID);
+ .getClientByPublicSID(publicSID, false);
if (rcl == null) {
return true;
Modified: incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/app/remote/WhiteBoardService.java
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/app/remote/WhiteBoardService.java?rev=1240767&r1=1240766&r2=1240767&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/app/remote/WhiteBoardService.java (original)
+++ incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/app/remote/WhiteBoardService.java Sun Feb 5 17:03:48 2012
@@ -229,7 +229,7 @@ public class WhiteBoardService implement
if (currentClient.getIsMod()) {
RoomClient rcl = this.clientListManager
- .getClientByPublicSID(publicSID);
+ .getClientByPublicSID(publicSID, false);
if (rcl != null) {
rcl.setCanDraw(canDraw);
@@ -271,7 +271,7 @@ public class WhiteBoardService implement
if (currentClient.getIsMod()) {
RoomClient rcl = this.clientListManager
- .getClientByPublicSID(publicSID);
+ .getClientByPublicSID(publicSID, false);
if (rcl != null) {
rcl.setCanShare(canShare);
@@ -313,7 +313,7 @@ public class WhiteBoardService implement
if (currentClient.getIsMod()) {
RoomClient rcl = this.clientListManager
- .getClientByPublicSID(publicSID);
+ .getClientByPublicSID(publicSID, false);
if (rcl != null) {
rcl.setCanRemote(canRemote);
@@ -354,7 +354,7 @@ public class WhiteBoardService implement
if (authLevelManagement.checkUserLevel(user_level)) {
if (currentClient.getIsMod()) {
RoomClient rcl = this.clientListManager
- .getClientByPublicSID(publicSID);
+ .getClientByPublicSID(publicSID, false);
if (rcl != null) {
rcl.setCanGiveAudio(canGiveAudio);
Modified: incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/app/remote/red5/ClientListManager.java
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/app/remote/red5/ClientListManager.java?rev=1240767&r1=1240766&r2=1240767&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/app/remote/red5/ClientListManager.java (original)
+++ incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/app/remote/red5/ClientListManager.java Sun Feb 5 17:03:48 2012
@@ -40,6 +40,38 @@ public class ClientListManager {
@Autowired
private ManageCryptStyle manageCryptStyle;
+
+ /**
+ * Get current clients and extends the room client with its potential
+ * audio/video client and settings
+ *
+ * @param room_id
+ * @return
+ */
+ public HashMap<String, RoomClient> getRoomClients(Long room_id) {
+ try {
+
+ HashMap<String, RoomClient> roomClientList = new HashMap<String, RoomClient>();
+ HashMap<String, RoomClient> clientListRoom = this.getClientListByRoom(room_id);
+ for (Iterator<String> iter = clientListRoom.keySet().iterator(); iter
+ .hasNext();) {
+ String key = iter.next();
+ RoomClient rcl = this.getClientByStreamId(key);
+
+ if (rcl.getIsAVClient() == null || rcl.getIsAVClient()) {
+ continue;
+ }
+
+ // Add user to List
+ roomClientList.put(key, rcl);
+ }
+
+ return roomClientList;
+ } catch (Exception err) {
+ log.error("[getRoomClients]", err);
+ }
+ return null;
+ }
public synchronized RoomClient addClientListItem(String streamId,
String scopeName, Integer remotePort, String remoteAddress,
@@ -129,14 +161,20 @@ public class ClientListManager {
}
- public synchronized RoomClient getClientByPublicSID(String publicSID) {
+ public synchronized RoomClient getClientByPublicSID(String publicSID, Boolean isAVClient) {
try {
for (Iterator<String> iter = clientList.keySet().iterator(); iter
.hasNext();) {
RoomClient rcl = clientList.get(iter.next());
- if (rcl.getPublicSID().equals(publicSID)) {
- return rcl;
+
+ if (!rcl.getPublicSID().equals(publicSID)) {
+ continue;
}
+ if (rcl.getIsAVClient() == null || rcl.getIsAVClient() != isAVClient) {
+ continue;
+ }
+
+ return rcl;
}
} catch (Exception err) {
log.error("[getClientByPublicSID]", err);
@@ -158,6 +196,40 @@ public class ClientListManager {
}
return null;
}
+
+ /**
+ * Update the session object of the audio/video-connection and additionally swap the
+ * values to the session object of the user that holds the full session object
+ * @param streamId
+ * @param rcm
+ * @return
+ */
+ public synchronized Boolean updateAVClientByStreamId(String streamId,
+ RoomClient rcm) {
+ try {
+
+ //get the corresponding user session object and update the settings
+ RoomClient rclUsual = getClientByPublicSID(rcm.getPublicSID(), false);
+ if (rclUsual != null) {
+ rclUsual.setBroadCastID(rcm.getBroadCastID());
+ rclUsual.setAvsettings(rcm.getAvsettings());
+ rclUsual.setVHeight(rcm.getVHeight());
+ rclUsual.setVWidth(rcm.getVWidth());
+ rclUsual.setVX(rcm.getVX());
+ rclUsual.setVY(rcm.getVY());
+ if (clientList.containsKey(rclUsual.getStreamid())) {
+ clientList.put(rclUsual.getStreamid(), rclUsual);
+ } else {
+ log.debug("Tried to update a non existing Client " + rclUsual.getStreamid());
+ }
+ }
+
+ updateClientByStreamId(streamId, rcm);
+ } catch (Exception err) {
+ log.error("[updateAVClientByStreamId]", err);
+ }
+ return null;
+ }
public synchronized Boolean updateClientByStreamId(String streamId,
RoomClient rcm) {
@@ -207,23 +279,33 @@ public class ClientListManager {
for (Iterator<String> iter = clientList.keySet().iterator(); iter
.hasNext();) {
String key = iter.next();
- // log.debug("getClientList key: "+key);
RoomClient rcl = clientList.get(key);
- // same room, same domain
- if (room_id != null && room_id.equals(rcl.getRoom_id())) {
- if (rcl.getIsScreenClient() != null
- && rcl.getIsScreenClient()) {
- // continue
- } else {
- roomClientList.put(key, rcl);
- }
+
+ // client initialized and same room
+ if (rcl.getRoom_id() == null || !room_id.equals(rcl.getRoom_id())) {
+ continue;
}
+ if (rcl.getIsScreenClient() == null ||
+ rcl.getIsScreenClient()) {
+ continue;
+ }
+ if (rcl.getIsAVClient() == null ||
+ rcl.getIsAVClient()) {
+ continue;
+ }
+
+ //Only parse really those users out that are really a full session object
+ //and no pseudo session object like the audio/video or screen sharing connection
+ roomClientList.put(key, rcl);
+
}
} catch (Exception err) {
log.error("[getClientListByRoom]", err);
}
return roomClientList;
}
+
+
// FIXME seems to be copy/pasted with previous one
public synchronized HashMap<String, RoomClient> getClientListByRoomAll(
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=1240767&r1=1240766&r2=1240767&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 Sun Feb 5 17:03:48 2012
@@ -402,7 +402,7 @@ public class ScopeApplicationAdapter ext
RoomClient currentScreenUser = this.clientListManager
.getClientByPublicSID(currentClient
- .getStreamPublishName());
+ .getStreamPublishName(), false);
currentClient.setFirstname(currentScreenUser.getFirstname());
currentClient.setLastname(currentScreenUser.getLastname());
@@ -685,14 +685,13 @@ public class ScopeApplicationAdapter ext
@Override
public synchronized void streamPublishStart(IBroadcastStream stream) {
try {
-
IConnection current = Red5.getConnectionLocal();
String streamid = current.getClient().getId();
RoomClient currentClient = this.clientListManager
.getClientByStreamId(streamid);
// Notify all the clients that the stream had been started
- log.debug("start streamPublishStart broadcast start: "
+ System.out.println("start streamPublishStart broadcast start: "
+ stream.getPublishedName() + "CONN " + current);
// In case its a screen sharing we start a new Video for that
@@ -702,71 +701,66 @@ public class ScopeApplicationAdapter ext
this.clientListManager.updateClientByStreamId(current
.getClient().getId(), currentClient);
-
}
+ //If its an audio/video client then send the session object with the full
+ //data to everybody
+ else if (currentClient.getIsAVClient() != null && currentClient.getIsAVClient()) {
+ currentClient = this.clientListManager.getClientByPublicSID(
+ currentClient.getPublicSID(), false);
+ }
+
+ System.out.println("newStream SEND");
// Notify all users of the same Scope
- // We need to iterate through the streams to cathc if anybody is
- // recording
+ // We need to iterate through the streams to catch if anybody is recording
Collection<Set<IConnection>> conCollection = current.getScope()
.getConnections();
for (Set<IConnection> conset : conCollection) {
for (IConnection conn : conset) {
if (conn != null) {
if (conn instanceof IServiceCapableConnection) {
- if (conn.equals(current)) {
- RoomClient rcl = this.clientListManager
- .getClientByStreamId(conn.getClient()
- .getId());
- if (rcl == null) {
- // continue;
- } else if (rcl.getIsRecording()) {
- // StreamService.addRecordingByStreamId(current,
- // streamid, currentClient,
- // rcl.getFlvRecordingId());
-
- this.flvRecorderService
- .addRecordingByStreamId(current,
- streamid, currentClient,
- rcl.getFlvRecordingId());
-
- }
+
+ RoomClient rcl = this.clientListManager
+ .getClientByStreamId(conn.getClient()
+ .getId());
+
+ if (rcl == null) {
+ System.out.println("RCL IS NULL newStream SEND");
continue;
- } else {
- RoomClient rcl = this.clientListManager
- .getClientByStreamId(conn.getClient()
- .getId());
- // log.debug("is this users still alive? :"+rcl);
- // Check if the Client is in the same room and
- // same domain
- if (rcl == null) {
- // continue;
- } else {
- IServiceCapableConnection iStream = (IServiceCapableConnection) conn;
- // log.info("IServiceCapableConnection ID "
- // + iStream.getClient().getId());
- if (rcl.getIsScreenClient() != null
- && rcl.getIsScreenClient()) {
- // continue;
- } else {
- iStream.invoke("newStream",
- new Object[] { currentClient },
- this);
- }
-
- if (rcl.getIsRecording()) {
- // StreamService.addRecordingByStreamId(current,
- // streamid, currentClient,
- // rcl.getFlvRecordingId());
- this.flvRecorderService
- .addRecordingByStreamId(
- current, streamid,
- currentClient,
- rcl.getFlvRecordingId());
+ }
+ if (rcl.getPublicSID() == "") {
+ System.out.println("publicSID IS NULL newStream SEND");
+ continue;
+ }
+ if (rcl.getIsAVClient() == null || rcl.getIsAVClient()) {
+ System.out.println("RCL getIsAVClient newStream SEND");
+ continue;
+ }
+ if (rcl.getIsScreenClient() == null || rcl.getIsScreenClient()) {
+ System.out.println("RCL getIsScreenClient newStream SEND");
+ continue;
+ }
- }
- }
+ if (rcl.getIsRecording()) {
+ System.out.println("RCL getIsRecording newStream SEND");
+ this.flvRecorderService
+ .addRecordingByStreamId(current,
+ streamid, currentClient,
+ rcl.getFlvRecordingId());
+ }
+
+ if (rcl.getPublicSID().equals(currentClient.getPublicSID())) {
+ System.out.println("RCL publicSID is equal newStream SEND");
+ continue;
}
+
+ System.out.println("RCL SEND is equal newStream SEND "+rcl.getPublicSID()+" || "+rcl.getUserport());
+
+ IServiceCapableConnection iStream = (IServiceCapableConnection) conn;
+ iStream.invoke("newStream",
+ new Object[] { currentClient },
+ this);
+
}
}
}
@@ -924,7 +918,7 @@ public class ScopeApplicationAdapter ext
// String streamid = current.getClient().getId();
RoomClient currentClient = this.clientListManager
- .getClientByPublicSID(publicSID);
+ .getClientByPublicSID(publicSID, false);
if (currentClient == null) {
return -1L;
@@ -1017,7 +1011,7 @@ public class ScopeApplicationAdapter ext
// String streamid = current.getClient().getId();
RoomClient currentClient = this.clientListManager
- .getClientByPublicSID(publicSID);
+ .getClientByPublicSID(publicSID, false);
if (currentClient == null) {
return -1L;
@@ -1076,7 +1070,7 @@ public class ScopeApplicationAdapter ext
// String streamid = current.getClient().getId();
RoomClient currentClient = this.clientListManager
- .getClientByPublicSID(publicSID);
+ .getClientByPublicSID(publicSID, false);
if (currentClient == null) {
return -1L;
@@ -1132,7 +1126,7 @@ public class ScopeApplicationAdapter ext
// String streamid = current.getClient().getId();
RoomClient currentClient = this.clientListManager
- .getClientByPublicSID(publicSID);
+ .getClientByPublicSID(publicSID, false);
if (currentClient == null) {
return -1L;
@@ -1187,7 +1181,7 @@ public class ScopeApplicationAdapter ext
log.debug("*..*switchMicMuted publicSID: " + publicSID);
RoomClient currentClient = this.clientListManager
- .getClientByPublicSID(publicSID);
+ .getClientByPublicSID(publicSID, false);
if (currentClient == null) {
return -1L;
}
@@ -1209,7 +1203,7 @@ public class ScopeApplicationAdapter ext
public synchronized Boolean getMicMutedByPublicSID(String publicSID) {
try {
- RoomClient currentClient = this.clientListManager.getClientByPublicSID(publicSID);
+ RoomClient currentClient = this.clientListManager.getClientByPublicSID(publicSID, false);
if (currentClient == null) {
return true;
}
@@ -1240,7 +1234,7 @@ public class ScopeApplicationAdapter ext
try {
RoomClient currentClient = this.clientListManager
- .getClientByPublicSID(publicSID);
+ .getClientByPublicSID(publicSID, false);
List<RoomClient> currentModList = this.clientListManager
.getCurrentModeratorByRoom(currentClient.getRoom_id());
@@ -1299,7 +1293,8 @@ public class ScopeApplicationAdapter ext
* @return
*/
public synchronized RoomClient setUserAVSettings(String avsettings,
- Object newMessage, Integer vWidth, Integer vHeight) {
+ Object newMessage, Integer vWidth, Integer vHeight,
+ long room_id, String publicSID) {
try {
IConnection current = Red5.getConnectionLocal();
@@ -1307,10 +1302,13 @@ public class ScopeApplicationAdapter ext
RoomClient currentClient = this.clientListManager
.getClientByStreamId(streamid);
currentClient.setAvsettings(avsettings);
+ currentClient.setRoom_id(room_id);
+ currentClient.setPublicSID(publicSID);
+ currentClient.setIsAVClient(true);
currentClient.setVWidth(vWidth);
currentClient.setVHeight(vHeight);
// Long room_id = currentClient.getRoom_id();
- this.clientListManager.updateClientByStreamId(streamid,
+ this.clientListManager.updateAVClientByStreamId(streamid,
currentClient);
HashMap<String, Object> hsm = new HashMap<String, Object>();
@@ -1437,6 +1435,7 @@ public class ScopeApplicationAdapter ext
RoomClient currentClient = this.clientListManager
.getClientByStreamId(streamid);
currentClient.setRoom_id(room_id);
+ currentClient.setIsAVClient(false);
currentClient.setRoomEnter(new Date());
currentClient.setOrganization_id(organization_id);
@@ -1476,7 +1475,7 @@ public class ScopeApplicationAdapter ext
// number
// Check for Moderation LogicalRoom ENTER
- HashMap<String, RoomClient> clientListRoom = this
+ HashMap<String, RoomClient> clientListRoom = this.clientListManager
.getRoomClients(room_id);
// appointed meeting or moderated Room? => Check Max Users first
@@ -1707,34 +1706,6 @@ public class ScopeApplicationAdapter ext
}
/**
- * Get current clients
- *
- * @param room_id
- * @return
- */
- private HashMap<String, RoomClient> getRoomClients(Long room_id) {
- try {
-
- HashMap<String, RoomClient> roomClientList = new HashMap<String, RoomClient>();
- HashMap<String, RoomClient> clientListRoom = this.clientListManager
- .getClientListByRoom(room_id);
- for (Iterator<String> iter = clientListRoom.keySet().iterator(); iter
- .hasNext();) {
- String key = iter.next();
- RoomClient rcl = this.clientListManager
- .getClientByStreamId(key);
- // Add user to List
- roomClientList.put(key, rcl);
- }
-
- return roomClientList;
- } catch (Exception err) {
- log.error("[getRoomClients]", err);
- }
- return null;
- }
-
- /**
* This method is invoked when the user has disconnected and reconnects to
* the Gateway with the new scope
*
@@ -2469,7 +2440,7 @@ public class ScopeApplicationAdapter ext
// Get Room Id to send it to the correct Scope
RoomClient currentClient = this.clientListManager
- .getClientByPublicSID(publicSID);
+ .getClientByPublicSID(publicSID, false);
if (currentClient == null) {
return;
@@ -2564,7 +2535,7 @@ public class ScopeApplicationAdapter ext
// Get Room Id to send it to the correct Scope
RoomClient currentClient = this.clientListManager
- .getClientByPublicSID(publicSID);
+ .getClientByPublicSID(publicSID, false);
if (currentClient == null) {
return;
@@ -2783,7 +2754,7 @@ public class ScopeApplicationAdapter ext
// Get Room Id to send it to the correct Scope
RoomClient currentClient = this.clientListManager
- .getClientByPublicSID(publicSID);
+ .getClientByPublicSID(publicSID, false);
if (currentClient == null) {
return;
@@ -2860,7 +2831,7 @@ public class ScopeApplicationAdapter ext
// Get Room Id to send it to the correct Scope
RoomClient currentClient = this.clientListManager
- .getClientByPublicSID(publicSID);
+ .getClientByPublicSID(publicSID, false);
if (currentClient == null) {
throw new Exception(
@@ -2933,7 +2904,7 @@ public class ScopeApplicationAdapter ext
// Get Room Id to send it to the correct Scope
RoomClient currentClient = this.clientListManager
- .getClientByPublicSID(publicSID);
+ .getClientByPublicSID(publicSID, false);
if (currentClient == null) {
currentClient = this.clientListManager
Modified: incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/app/rtp/RTPStreamReceiver.java
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/app/rtp/RTPStreamReceiver.java?rev=1240767&r1=1240766&r2=1240767&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/app/rtp/RTPStreamReceiver.java (original)
+++ incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/app/rtp/RTPStreamReceiver.java Sun Feb 5 17:03:48 2012
@@ -101,7 +101,7 @@ public class RTPStreamReceiver implement
while(iter.hasNext()){
String clientSID = iter.next();
- RoomClient client = clientListManager.getClientByPublicSID(clientSID);
+ RoomClient client = clientListManager.getClientByPublicSID(clientSID, false);
log.debug("Adding Target for room " +session.getRoom().getRooms_id() + " : " + client.getUserip() + "/" + viewers.get(clientSID));
Modified: incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/app/rtp/RTPStreamingHandler.java
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/app/rtp/RTPStreamingHandler.java?rev=1240767&r1=1240766&r2=1240767&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/app/rtp/RTPStreamingHandler.java (original)
+++ incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/app/rtp/RTPStreamingHandler.java Sun Feb 5 17:03:48 2012
@@ -143,7 +143,7 @@ public class RTPStreamingHandler {
// Should be retrieved via Clientlist to receive the "extern" IP, seen
// by red5
RoomClient rcl = clientListManager.getClientByPublicSID(
- publicSID);
+ publicSID, false);
if (rcl == null)
throw new Exception("Could not retrieve RoomClient for publicSID");
Modified: incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/servlet/outputhandler/RTPMethodServlet.java
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/servlet/outputhandler/RTPMethodServlet.java?rev=1240767&r1=1240766&r2=1240767&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/servlet/outputhandler/RTPMethodServlet.java (original)
+++ incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/servlet/outputhandler/RTPMethodServlet.java Sun Feb 5 17:03:48 2012
@@ -270,7 +270,7 @@ public class RTPMethodServlet extends Ht
// also the HOST, PORT must be set correctly in the
// RTPScreenSharingSession-Object
RoomClient rcl = getClientListManager().getClientByPublicSID(
- publicSID);
+ publicSID, false);
HashMap<String, Integer> viewers = session.getViewers();
Modified: incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/servlet/outputhandler/ScreenServlet.java
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/servlet/outputhandler/ScreenServlet.java?rev=1240767&r1=1240766&r2=1240767&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/servlet/outputhandler/ScreenServlet.java (original)
+++ incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/servlet/outputhandler/ScreenServlet.java Sun Feb 5 17:03:48 2012
@@ -239,7 +239,7 @@ public class ScreenServlet extends HttpS
boolean userIsInRoom = false;
boolean doProcess = false;
- RoomClient rcl = getClientListManager().getClientByPublicSID(publicSID);
+ RoomClient rcl = getClientListManager().getClientByPublicSID(publicSID, false);
if (rcl != null) {
log.debug("found RoomClient");
if (rcl.getRoom_id() != null
@@ -452,7 +452,7 @@ public class ScreenServlet extends HttpS
boolean doProcess = false;
OutputStream out = httpServletResponse.getOutputStream();
- RoomClient rcl = getClientListManager().getClientByPublicSID(publicSID);
+ RoomClient rcl = getClientListManager().getClientByPublicSID(publicSID, false);
if (rcl != null) {
log.debug("found RoomClient");
if (rcl.getRoom_id() != null