Extend Android SDK to enable adding custom PortAllocator
This patch exposes the network_thread so that a custom PortAllocator can use it instead of e.g creating own thread. Bug: webrtc:8640 Change-Id: I705629e4f1a4d0a4fed7d53a774ba9564ba076fe Reviewed-on: https://webrtc-review.googlesource.com/39925 Reviewed-by: Sami Kalliomäki <sakal@webrtc.org> Commit-Queue: Jonas Oreland <jonaso@webrtc.org> Cr-Commit-Position: refs/heads/master@{#21643}
This commit is contained in:
committed by
Commit Bot
parent
4613bdf995
commit
e662d0ecf0
@ -347,6 +347,11 @@ public class PeerConnectionFactory {
|
|||||||
return nativeGetNativePeerConnectionFactory(nativeFactory);
|
return nativeGetNativePeerConnectionFactory(nativeFactory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Returns a pointer to the native OwnedFactoryAndThreads object */
|
||||||
|
public long getNativeOwnedFactoryAndThreads() {
|
||||||
|
return nativeFactory;
|
||||||
|
}
|
||||||
|
|
||||||
private static void printStackTrace(Thread thread, String threadName) {
|
private static void printStackTrace(Thread thread, String threadName) {
|
||||||
if (thread != null) {
|
if (thread != null) {
|
||||||
StackTraceElement[] stackTraces = thread.getStackTrace();
|
StackTraceElement[] stackTraces = thread.getStackTrace();
|
||||||
|
|||||||
@ -53,6 +53,7 @@ class OwnedFactoryAndThreads {
|
|||||||
~OwnedFactoryAndThreads();
|
~OwnedFactoryAndThreads();
|
||||||
|
|
||||||
PeerConnectionFactoryInterface* factory() { return factory_; }
|
PeerConnectionFactoryInterface* factory() { return factory_; }
|
||||||
|
Thread* network_thread() { return network_thread_.get(); }
|
||||||
Thread* signaling_thread() { return signaling_thread_.get(); }
|
Thread* signaling_thread() { return signaling_thread_.get(); }
|
||||||
Thread* worker_thread() { return worker_thread_.get(); }
|
Thread* worker_thread() { return worker_thread_.get(); }
|
||||||
WebRtcVideoEncoderFactory* legacy_encoder_factory() {
|
WebRtcVideoEncoderFactory* legacy_encoder_factory() {
|
||||||
|
|||||||
Reference in New Issue
Block a user