This is an automated email from the ASF dual-hosted git repository.

solomax pushed a commit to branch 4.0.x
in repository https://gitbox.apache.org/repos/asf/openmeetings.git


The following commit(s) were added to refs/heads/4.0.x by this push:
     new d216f57  [OPENMEETINGS-1837] audio-only steams are being recorded as 
expected
d216f57 is described below

commit d216f573faec210a58c344c83f2030d891d8db58
Author: Maxim Solodovnik <solomax...@gmail.com>
AuthorDate: Thu Mar 8 11:11:22 2018 +0700

    [OPENMEETINGS-1837] audio-only steams are being recorded as expected
---
 .../openmeetings/core/converter/InterviewConverter.java    |  4 ++--
 .../openmeetings/core/remote/ScopeApplicationAdapter.java  |  4 +++-
 .../org/apache/openmeetings/web/app/ClientManager.java     |  8 ++++----
 .../org/apache/openmeetings/web/app/QuickPollManager.java  |  2 +-
 .../apache/openmeetings/web/app/StreamClientManager.java   |  8 ++++++--
 .../org/apache/openmeetings/web/app/WhiteboardManager.java | 14 +++++++-------
 .../org/apache/openmeetings/web/room/RoomBroadcaster.java  |  2 --
 7 files changed, 23 insertions(+), 19 deletions(-)

diff --git 
a/openmeetings-core/src/main/java/org/apache/openmeetings/core/converter/InterviewConverter.java
 
b/openmeetings-core/src/main/java/org/apache/openmeetings/core/converter/InterviewConverter.java
index 97278f8..d70ad06 100644
--- 
a/openmeetings-core/src/main/java/org/apache/openmeetings/core/converter/InterviewConverter.java
+++ 
b/openmeetings-core/src/main/java/org/apache/openmeetings/core/converter/InterviewConverter.java
@@ -101,7 +101,7 @@ public class InterviewConverter extends BaseConverter 
implements IRecordingConve
                Recording r = null;
                try {
                        r = recordingDao.get(id);
-                       log.debug("recording " + r.getId());
+                       log.debug("recording {}", r.getId());
                        if (Strings.isEmpty(r.getHash())) {
                                r.setHash(UUID.randomUUID().toString());
                        }
@@ -173,7 +173,7 @@ public class InterviewConverter extends BaseConverter 
implements IRecordingConve
                                                        , "-v", "error"
                                                        , "-f", "null"
                                                        , "file.null"};
-                                       ProcessResult res = 
ProcessHelper.executeScript("checkFlvPod_" + pod , args);
+                                       ProcessResult res = 
ProcessHelper.executeScript("checkFlvPod_" + pod , args, true);
                                        logs.add(res);
                                        if (res.isOk()) {
                                                long diff = 
diff(meta.getRecordStart(), meta.getRecording().getRecordStart());
diff --git 
a/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/ScopeApplicationAdapter.java
 
b/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/ScopeApplicationAdapter.java
index b06e0af..000e74a 100644
--- 
a/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/ScopeApplicationAdapter.java
+++ 
b/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/ScopeApplicationAdapter.java
@@ -494,7 +494,9 @@ public class ScopeApplicationAdapter extends 
MultiThreadedApplicationAdapter imp
                        c.setBroadcastId(streamName);
 
                        if (Client.Type.sharing != c.getType() && 
Client.Type.mobile != c.getType()) {
-                               c.setAvsettings("av");
+                               if (Strings.isEmpty(c.getAvsettings()) || 
"n".equals(c.getAvsettings())) {
+                                       c.setAvsettings("av");
+                               }
                                c.setBroadcasting(true);
                                if (c.getWidth() == 0 || c.getHeight() == 0) {
                                        c.setWidth(320);
diff --git 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/ClientManager.java
 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/ClientManager.java
index df177c8..b896e00 100644
--- 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/ClientManager.java
+++ 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/ClientManager.java
@@ -59,15 +59,15 @@ public class ClientManager implements IClientManager {
        @Autowired
        private ScopeApplicationAdapter scopeAdapter;
 
-       private Map<String, Client> map() {
+       private static Map<String, Client> map() {
                return getHazelcast().getMap(ONLINE_USERS_KEY);
        }
 
-       private Map<String, String> mapUidBySid() {
+       private static Map<String, String> mapUidBySid() {
                return getHazelcast().getMap(UID_BY_SID_KEY);
        }
 
-       private IMap<Long, Set<String>> getRooms() {
+       private static IMap<Long, Set<String>> getRooms() {
                return getHazelcast().getMap(ROOMS_KEY);
        }
 
@@ -260,7 +260,7 @@ public class ClientManager implements IClientManager {
                return false;
        }
 
-       private Client getByKeys(Long userId, String sessionId) {
+       private static Client getByKeys(Long userId, String sessionId) {
                Client client = null;
                for (Map.Entry<String, Client> e : map().entrySet()) {
                        Client c = e.getValue();
diff --git 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/QuickPollManager.java
 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/QuickPollManager.java
index e377c8b..7252aa1 100644
--- 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/QuickPollManager.java
+++ 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/QuickPollManager.java
@@ -42,7 +42,7 @@ public class QuickPollManager {
        private static final Logger log = getLogger(QuickPollManager.class, 
getWebAppRootKey());
        private static final String QPOLLS_KEY = "QPOLLS_KEY";
 
-       private IMap<Long, Map<Long, Boolean>> map() {
+       private static IMap<Long, Map<Long, Boolean>> map() {
                return getHazelcast().getMap(QPOLLS_KEY);
        }
 
diff --git 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/StreamClientManager.java
 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/StreamClientManager.java
index bee0af1..78c27e2 100644
--- 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/StreamClientManager.java
+++ 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/StreamClientManager.java
@@ -73,6 +73,8 @@ public class StreamClientManager implements 
IStreamClientManager {
        @Autowired
        private ClientManager clientManager;
        @Autowired
+       private StreamClientManager streamClientManager;
+       @Autowired
        private SessiondataDao sessionDao;
        @Autowired
        private UserDao userDao;
@@ -180,10 +182,10 @@ public class StreamClientManager implements 
IStreamClientManager {
                rcl.setEmail(u.getAddress() == null ? null : 
u.getAddress().getEmail());
                rcl.setSuperMod(client.hasRight(Right.superModerator));
                rcl.setMod(client.hasRight(Right.moderator));
-               if (client.hasActivity(Activity.broadcastA) && client.getMic() 
< 0) {
+               if (client.hasActivity(Activity.broadcastA) && 
!client.isMicEnabled()) {
                        client.remove(Activity.broadcastA);
                }
-               if (client.hasActivity(Activity.broadcastV) && client.getCam() 
< 0) {
+               if (client.hasActivity(Activity.broadcastV) && 
!client.isCamEnabled()) {
                        client.remove(Activity.broadcastV);
                }
                if (client.hasActivity(Activity.broadcastA) || 
client.hasActivity(Activity.broadcastV)) {
@@ -209,6 +211,8 @@ public class StreamClientManager implements 
IStreamClientManager {
                        rcl.setAvsettings("n");
                        rcl.setBroadcasting(false);
                }
+               clientManager.update(client);
+               streamClientManager.update(rcl);
                return rcl;
        }
 
diff --git 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/WhiteboardManager.java
 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/WhiteboardManager.java
index 9a8c4f4..52b9994 100644
--- 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/WhiteboardManager.java
+++ 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/WhiteboardManager.java
@@ -42,16 +42,16 @@ import com.hazelcast.core.IMap;
 public class WhiteboardManager implements IWhiteboardManager {
        private static final String WBS_KEY = "WBS_KEY";
 
-       private IMap<Long, Whiteboards> getCache() {
+       private static IMap<Long, Whiteboards> map() {
                return getHazelcast().getMap(WBS_KEY);
        }
 
        public boolean tryLock(Long roomId) {
-               return getCache().tryLock(roomId);
+               return map().tryLock(roomId);
        }
 
        public void unlock(Long roomId) {
-               getCache().unlock(roomId);
+               map().unlock(roomId);
        }
 
        private static String getDefaultName(Long langId, int num) {
@@ -63,7 +63,7 @@ public class WhiteboardManager implements IWhiteboardManager {
        }
 
        public boolean contains(Long roomId) {
-               return getCache().containsKey(roomId);
+               return map().containsKey(roomId);
        }
 
        @Override
@@ -75,7 +75,7 @@ public class WhiteboardManager implements IWhiteboardManager {
                if (roomId == null) {
                        return null;
                }
-               Whiteboards wbs = getCache().get(roomId);
+               Whiteboards wbs = map().get(roomId);
                if (wbs == null) {
                        wbs = new Whiteboards(roomId);
                        Whiteboard wb = add(wbs, langId);
@@ -132,7 +132,7 @@ public class WhiteboardManager implements 
IWhiteboardManager {
                update(wbs);
        }
 
-       private void update(Whiteboards wbs) {
-               getCache().put(wbs.getRoomId(), wbs);
+       private static void update(Whiteboards wbs) {
+               map().put(wbs.getRoomId(), wbs);
        }
 }
diff --git 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomBroadcaster.java
 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomBroadcaster.java
index 2d2a3e4..d42092a 100644
--- 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomBroadcaster.java
+++ 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomBroadcaster.java
@@ -62,8 +62,6 @@ public class RoomBroadcaster {
                if (rcl == null) {
                        return;
                }
-
-               // Put the mod-flag to true for this client
                getBean(StreamClientManager.class).update(rcl);
        }
 }

-- 
To stop receiving notification emails like this one, please contact
solo...@apache.org.

Reply via email to