solomax commented on a change in pull request #128:
URL: https://github.com/apache/openmeetings/pull/128#discussion_r574311005



##########
File path: 
openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/KStream.java
##########
@@ -162,15 +162,39 @@ public void onError(Throwable cause) throws Exception {
                });
        }
 
+       /**
+        * Invoked in case stream stops to decide on if this stream is worth 
stopping.
+        *
+        * Stop broadcast in case:
+        *  - Audio only stream and audio has been detected as not streaming 
anymore
+        *  - Video or Data
+        *
+        * @param mediaType the MediaType that stopped flowing
+        * @return true in case this stream should be dropped
+        */
+       private boolean checkFlowOutEventForStopping(MediaType mediaType) {
+               if (MediaType.AUDIO == mediaType) {

Review comment:
       This looks extremely cumbersome :(
   
   Could you please change this method to be: `return MediaType.AUDIO != 
mediaType || !hasVideo;` ?

##########
File path: 
openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/KStream.java
##########
@@ -115,7 +115,7 @@ public void startBroadcast(final StreamDesc sd, final 
String sdpOffer, Runnable
                if ((sdpOffer.indexOf("m=audio") > -1 && !hasAudio)
                                || (sdpOffer.indexOf("m=video") > -1 && 
!hasVideo && StreamType.SCREEN != streamType))
                {
-                       log.warn("Broadcast started without enough rights");

Review comment:
       do we really need both sid and uid in all these log statements?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to