Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
part implement of PeerConnection_jni.cpp && apply google-java-format …
…(with plugin)
- Loading branch information
Showing
24 changed files
with
715 additions
and
314 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
mediasoup-client/src/androidTest/java/org/mediasoup/droid/BaseTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package org.mediasoup.droid; | ||
|
||
import android.content.Context; | ||
import android.support.test.InstrumentationRegistry; | ||
|
||
import org.junit.Before; | ||
|
||
public abstract class BaseTest { | ||
|
||
@Before | ||
public void setUp() { | ||
Context context = InstrumentationRegistry.getContext(); | ||
Logger.setLogLevel(Logger.LogLevel.LOG_DEBUG); | ||
Logger.setDefaultHandler(); | ||
MediasoupClient.initialize(context.getApplicationContext()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 0 additions & 26 deletions
26
mediasoup-client/src/androidTest/java/org/mediasoup/droid/ExampleInstrumentedTest.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
mediasoup-client/src/androidTest/java/org/mediasoup/droid/PeerConnectionTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
package org.mediasoup.droid; | ||
|
||
import android.content.Context; | ||
import android.support.test.InstrumentationRegistry; | ||
import android.support.test.runner.AndroidJUnit4; | ||
|
||
import org.junit.After; | ||
import org.junit.Before; | ||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
import static org.junit.Assert.assertFalse; | ||
import static org.junit.Assert.assertNotNull; | ||
|
||
@RunWith(AndroidJUnit4.class) | ||
public class PeerConnectionTest { | ||
|
||
private PeerConnection.PrivateListener mListener; | ||
private PeerConnection.Options mPeerConnectionOptions; | ||
private PeerConnection mPc; | ||
|
||
@Before | ||
public void setUp() { | ||
Context context = InstrumentationRegistry.getTargetContext(); | ||
Logger.setLogLevel(Logger.LogLevel.LOG_DEBUG); | ||
Logger.setDefaultHandler(); | ||
MediasoupClient.initialize(context.getApplicationContext()); | ||
|
||
mListener = new PeerConnection.PrivateListener(); | ||
mPeerConnectionOptions = new PeerConnection.Options(); | ||
mPc = new PeerConnection(mListener, mPeerConnectionOptions); | ||
} | ||
|
||
@After | ||
public void tearDown() { | ||
mPc.dispose(); | ||
} | ||
|
||
@Test | ||
public void getConfiguration() { | ||
assertNotNull("'pc.GetConfiguration()' succeeds", mPc.getConfiguration()); | ||
} | ||
|
||
@Test | ||
public void setConfiguration() { | ||
PeerConnection.PrivateListener listener = new PeerConnection.PrivateListener(); | ||
|
||
List<org.webrtc.PeerConnection.IceServer> iceServerUris = new ArrayList<>(); | ||
iceServerUris.add(new org.webrtc.PeerConnection.IceServer("Wrong URI")); | ||
org.webrtc.PeerConnection.RTCConfiguration rtcConfiguration = | ||
new org.webrtc.PeerConnection.RTCConfiguration(iceServerUris); | ||
|
||
PeerConnection pc = new PeerConnection(listener, mPeerConnectionOptions); | ||
assertFalse( | ||
"'pc.SetConfiguration()' fails if wrong options are provided", | ||
pc.setConfiguration(rtcConfiguration)); | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
mediasoup-client/src/androidTest/java/org/mediasoup/droid/PeerConnectionUtils.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package org.mediasoup.droid; | ||
|
||
public class PeerConnectionUtils {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 1 addition & 4 deletions
5
mediasoup-client/src/main/java/org/mediasoup/droid/Consumer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
package org.mediasoup.droid; | ||
|
||
public class Consumer { | ||
|
||
|
||
} | ||
public class Consumer {} |
Oops, something went wrong.