PeerConnectionFactory

tee3.webrtc

## 类 PeerConnectionFactory

- java.lang.Object
- - tee3.webrtc.PeerConnectionFactory

-     public class PeerConnectionFactory
      extends java.lang.Object

  Java wrapper for a C++ PeerConnectionFactoryInterface. Main entry point to the PeerConnection API for clients.

- - ### 嵌套类概要

    嵌套类
    限定符和类型 | 类和说明
    --- | ---
    `static class` | `PeerConnectionFactory.Builder`
    `static class` | `PeerConnectionFactory.InitializationOptions`
    `static class` | `PeerConnectionFactory.Options`

  - ### 字段概要

    字段
    限定符和类型 | 字段和说明
    --- | ---
    `static java.lang.String` | `TRIAL_ENABLED`
    `static java.lang.String` | `VIDEO_FRAME_EMIT_TRIAL` 已过时。

  - ### 方法概要

    所有方法 静态方法 实例方法 具体方法 已过时的方法
    限定符和类型 | 方法和说明
    --- | ---
    `static PeerConnectionFactory.Builder` | `builder()`
    `AudioSource` | `createAudioSource(MediaConstraints constraints)`
    `AudioTrack` | `createAudioTrack(java.lang.String id, AudioSource source)`
    `MediaStream` | `createLocalMediaStream(java.lang.String label)`
    `PeerConnection` | `createPeerConnection(java.util.List<PeerConnection.IceServer> iceServers, MediaConstraints constraints, PeerConnection.Observer observer)` 已过时。
    `PeerConnection` | `createPeerConnection(java.util.List<PeerConnection.IceServer> iceServers, PeerConnection.Observer observer)`
    `PeerConnection` | `createPeerConnection(PeerConnection.RTCConfiguration rtcConfig, MediaConstraints constraints, PeerConnection.Observer observer)` 已过时。
    `PeerConnection` | `createPeerConnection(PeerConnection.RTCConfiguration rtcConfig, PeerConnection.Observer observer)`
    `VideoSource` | `createVideoSource(boolean isScreencast)`
    `VideoSource` | `createVideoSource(VideoCapturer capturer)`
    `VideoTrack` | `createVideoTrack(java.lang.String id, VideoSource source)`
    `void` | `dispose()`
    `static java.lang.String` | `fieldTrialsFindFullName(java.lang.String name)`
    `long` | `getNativeOwnedFactoryAndThreads()` Returns a pointer to the native OwnedFactoryAndThreads object
    `long` | `getNativePeerConnectionFactory()` Returns a pointer to the native webrtc::PeerConnectionFactoryInterface.
    `static void` | `initialize(PeerConnectionFactory.InitializationOptions options)` Loads and initializes WebRTC.
    `static void` | `initializeFieldTrials(java.lang.String fieldTrialsInitString)` 已过时。
    `static void` | `printStackTraces()`
    `void` | `setVideoHwAccelerationOptions(EglBase.Context localEglContext, EglBase.Context remoteEglContext)` Set the EGL context used by HW Video encoding and decoding.
    `static void` | `shutdownInternalTracer()`
    `boolean` | `startAecDump(int file_descriptor, int filesize_limit_bytes)`
    `static boolean` | `startInternalTracingCapture(java.lang.String tracingFilename)`
    `void` | `stopAecDump()`
    `static void` | `stopInternalTracingCapture()`
    `void` | `threadsCallbacks()`
    `static void` | `updateLogger(Loggable loggable, Logging.Severity loggableSeverity)`

    - ### 从类继承的方法 java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 字段详细资料

    - #### TRIAL_ENABLED

          public static final java.lang.String TRIAL_ENABLED

      另请参阅:
        常量字段值

    - #### VIDEO_FRAME_EMIT_TRIAL

          @Deprecated
          public static final java.lang.String VIDEO_FRAME_EMIT_TRIAL

      已过时。
      另请参阅:
        常量字段值

  - ### 方法详细资料

    - #### builder

          public static PeerConnectionFactory.Builder builder()

    - #### initialize

          public static void initialize(PeerConnectionFactory.InitializationOptions options)

      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.

    - #### updateLogger

          public static void updateLogger(Loggable loggable,
                                          Logging.Severity loggableSeverity)

    - #### shutdownInternalTracer

          public static void shutdownInternalTracer()

    - #### initializeFieldTrials

          @Deprecated
          public static void initializeFieldTrials(java.lang.String fieldTrialsInitString)

      已过时。

    - #### fieldTrialsFindFullName

          public static java.lang.String fieldTrialsFindFullName(java.lang.String name)

    - #### startInternalTracingCapture

          public static boolean startInternalTracingCapture(java.lang.String tracingFilename)

    - #### stopInternalTracingCapture

          public static void stopInternalTracingCapture()

    - #### createPeerConnection

          @Nullable
           @Deprecated
          public PeerConnection createPeerConnection(PeerConnection.RTCConfiguration rtcConfig,
                                                                              MediaConstraints constraints,
                                                                              PeerConnection.Observer observer)

      已过时。
      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(java.util.List<PeerConnection.IceServer> iceServers,
                                                                              MediaConstraints constraints,
                                                                              PeerConnection.Observer observer)

      已过时。
      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(java.util.List<PeerConnection.IceServer> iceServers,
                                                                PeerConnection.Observer observer)

    - #### createPeerConnection

          @Nullable
          public PeerConnection createPeerConnection(PeerConnection.RTCConfiguration rtcConfig,
                                                                PeerConnection.Observer observer)

    - #### createLocalMediaStream

          public MediaStream createLocalMediaStream(java.lang.String label)

    - #### createVideoSource

          public VideoSource createVideoSource(boolean isScreencast)

    - #### createVideoSource

          public VideoSource createVideoSource(VideoCapturer capturer)

    - #### createVideoTrack

          public VideoTrack createVideoTrack(java.lang.String id,
                                             VideoSource source)

    - #### createAudioSource

          public AudioSource createAudioSource(MediaConstraints constraints)

    - #### createAudioTrack

          public AudioTrack createAudioTrack(java.lang.String id,
                                             AudioSource source)

    - #### startAecDump

          public boolean startAecDump(int file_descriptor,
                                      int filesize_limit_bytes)

    - #### stopAecDump

          public void stopAecDump()

    - #### setVideoHwAccelerationOptions

          public void setVideoHwAccelerationOptions(EglBase.Context localEglContext,
                                                    EglBase.Context remoteEglContext)

      Set the EGL context used by HW Video encoding and decoding.
      参数:
        `localEglContext` - Must be the same as used by VideoCapturerAndroid and any local video renderer.
        `remoteEglContext` - Must be the same as used by any remote video renderer.

    - #### dispose

          public void dispose()

    - #### threadsCallbacks

          public void threadsCallbacks()

    - #### 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

          public static void printStackTraces()