Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add lobby for dial-in #300

Merged
merged 12 commits into from
Sep 15, 2020
Merged

Add lobby for dial-in #300

merged 12 commits into from
Sep 15, 2020

Conversation

theunafraid
Copy link
Contributor

@theunafraid theunafraid commented Jul 2, 2020

Overall ready to be merged, there might be cases where lobby listeners are not cleared, maybe on hangup.

@theunafraid theunafraid marked this pull request as ready for review July 3, 2020 12:10

String region = JigasiBundleActivator.getConfigurationService()
.getString(LOCAL_REGION_PNAME);
if(!StringUtils.isNullOrEmpty(region))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do not need this. This is for the main room so we inform jicofo for our region to select us appropriate jvb. We do not have media for lobby room so no need.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

new ColibriStatsExtension.Stat(
ColibriStatsExtension.VERSION,
CurrentVersionImpl.VERSION.getApplicationName()
+ " " + CurrentVersionImpl.VERSION));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, we do not need this in lobby.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

if (initiator.getChildExtensions().size() > 0)
{
((ChatRoomJabberImpl)mucRoom)
.addPresencePacketExtensions(initiator);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also can be dropped for lobby.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed code

}

private void approve(ChatRoomInvitationReceivedEvent chatRoomInvitationReceivedEvent)
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not "approve" ... it just adds a listener for access approved. You can move it directly under invitationReceived.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed approve and reject and moved the code in the listener methods

}

private void reject()
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can also be moved ... or at least renamed as "rejected".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

@theunafraid theunafraid changed the title [WIP] Add lobby for dial-in Add lobby for dial-in Jul 7, 2020
@@ -0,0 +1,213 @@
package org.jitsi.jigasi.lobby;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing license header.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And in general missing javadocs for this class.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added javadocs.


if (alternateAddress != null)
{
String mainRoomIdentifier = alternateAddress;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need this extra variable, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed.

@theunafraid theunafraid force-pushed the dial-in-lobby branch 3 times, most recently from 3263043 to 4c27a84 Compare July 17, 2020 14:01
@@ -22,18 +22,24 @@
import net.java.sip.communicator.util.*;
import org.gagravarr.ogg.*;
import org.gagravarr.opus.*;
import org.glassfish.hk2.api.Operation;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry forgot about imports

@@ -386,12 +387,13 @@ private static void injectSoundFileInStream(
System.arraycopy(
data, 0, rtp.getBuffer(), rtp.getPayloadOffset(), data.length);

long sleepTime = nSamples/48 - (System.currentTimeMillis() - timePushPreviousData);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

timePushPreviousData would have been set on the previous iteration after the sleep() call, so it doesn't take into account how long sleep took. Or am I missing something?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's true, but we count how long it took since we last sent a packet so we can sleep the rest of the time of that interval.

Make sure we not over sleep and send the first 200ms directly. Thanks to @bgrozev.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants