Package tvi.webrtc
Class PeerConnectionFactory
java.lang.Object
tvi.webrtc.PeerConnectionFactory
Java wrapper for a C++ PeerConnectionFactoryInterface. Main entry point to
the PeerConnection API for clients.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
static class
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
createAudioSource
(MediaConstraints constraints) createAudioTrack
(String id, AudioSource source) createLocalMediaStream
(String label) createPeerConnection
(List<PeerConnection.IceServer> iceServers, MediaConstraints constraints, PeerConnection.Observer observer) Deprecated.createPeerConnection
(List<PeerConnection.IceServer> iceServers, PeerConnection.Observer observer) createPeerConnection
(PeerConnection.RTCConfiguration rtcConfig, MediaConstraints constraints, PeerConnection.Observer observer) Deprecated.createPeerConnection
(PeerConnection.RTCConfiguration rtcConfig, PeerConnection.Observer observer) createPeerConnection
(PeerConnection.RTCConfiguration rtcConfig, PeerConnectionDependencies dependencies) createVideoSource
(boolean isScreencast) Same as above with alignTimestamps set to true.createVideoSource
(boolean isScreencast, boolean alignTimestamps) Create video source with given parameters.createVideoTrack
(String id, VideoSource source) void
dispose()
static String
long
Returns a pointer to the native OwnedFactoryAndThreads objectlong
Returns a pointer to the native webrtc::PeerConnectionFactoryInterface.static void
Loads and initializes WebRTC.static void
initializeFieldTrials
(String fieldTrialsInitString) Deprecated.void
printInternalStackTraces
(boolean printNativeStackTraces) Print the Java stack traces for the critical threads used by PeerConnectionFactory, namely; signaling thread, worker thread, and network thread.static void
Deprecated.static void
boolean
startAecDump
(int file_descriptor, int filesize_limit_bytes) static boolean
startInternalTracingCapture
(String tracingFilename) void
static void
-
Field Details
-
TRIAL_ENABLED
- See Also:
-
VIDEO_FRAME_EMIT_TRIAL
Deprecated.- See Also:
-
-
Method Details
-
builder
-
initialize
Loads and initializes WebRTC. This must be called at least once before creating a PeerConnectionFactory. Replaces all the old initialization methods. Must not be called while a PeerConnectionFactory is alive. -
shutdownInternalTracer
public static void shutdownInternalTracer() -
initializeFieldTrials
Deprecated. -
fieldTrialsFindFullName
-
startInternalTracingCapture
-
stopInternalTracingCapture
public static void stopInternalTracingCapture() -
createPeerConnection
@Nullable @Deprecated public PeerConnection createPeerConnection(PeerConnection.RTCConfiguration rtcConfig, MediaConstraints constraints, PeerConnection.Observer observer) Deprecated.Deprecated. PeerConnection constraints are deprecated. Supply values in rtcConfig struct instead and use the method without constraints in the signature. -
createPeerConnection
@Nullable @Deprecated public PeerConnection createPeerConnection(List<PeerConnection.IceServer> iceServers, MediaConstraints constraints, PeerConnection.Observer observer) Deprecated.Deprecated. PeerConnection constraints are deprecated. Supply values in rtcConfig struct instead and use the method without constraints in the signature. -
createPeerConnection
@Nullable public PeerConnection createPeerConnection(List<PeerConnection.IceServer> iceServers, PeerConnection.Observer observer) -
createPeerConnection
@Nullable public PeerConnection createPeerConnection(PeerConnection.RTCConfiguration rtcConfig, PeerConnection.Observer observer) -
createPeerConnection
@Nullable public PeerConnection createPeerConnection(PeerConnection.RTCConfiguration rtcConfig, PeerConnectionDependencies dependencies) -
createLocalMediaStream
-
createVideoSource
Create video source with given parameters. If alignTimestamps is false, the caller is responsible for aligning the frame timestamps to rtc::TimeNanos(). This can be used to achieve higher accuracy if there is a big delay between frame creation and frames being delivered to the returned video source. If alignTimestamps is true, timestamps will be aligned to rtc::TimeNanos() when they arrive to the returned video source. -
createVideoSource
Same as above with alignTimestamps set to true.- See Also:
-
createVideoTrack
-
createAudioSource
-
createAudioTrack
-
startAecDump
public boolean startAecDump(int file_descriptor, int filesize_limit_bytes) -
stopAecDump
public void stopAecDump() -
dispose
public void dispose() -
getNativePeerConnectionFactory
public long getNativePeerConnectionFactory()Returns a pointer to the native webrtc::PeerConnectionFactoryInterface. -
getNativeOwnedFactoryAndThreads
public long getNativeOwnedFactoryAndThreads()Returns a pointer to the native OwnedFactoryAndThreads object -
printStackTraces
Deprecated.Deprecated, use non-static version instead. -
printInternalStackTraces
public void printInternalStackTraces(boolean printNativeStackTraces) Print the Java stack traces for the critical threads used by PeerConnectionFactory, namely; signaling thread, worker thread, and network thread. If printNativeStackTraces is true, also attempt to print the C++ stack traces for these threads.
-