create

open fun create(threadName: String, sharedContext: EglBase.Context, alignTimestamps: Boolean, yuvConverter: YuvConverter, frameRefMonitor: SurfaceTextureHelper.FrameRefMonitor): SurfaceTextureHelper

Construct a new SurfaceTextureHelper sharing OpenGL resources with `sharedContext`. A dedicated thread and handler is created for handling the SurfaceTexture. May return null if EGL fails to initialize a pixel buffer surface and make it current. If alignTimestamps is true, the frame timestamps will be aligned to rtc::TimeNanos(). If frame timestamps are aligned to rtc::TimeNanos() there is no need for aligning timestamps again in PeerConnectionFactory.createVideoSource(). This makes the timestamps more accurate and closer to actual creation time.


open fun create(threadName: String, sharedContext: EglBase.Context): SurfaceTextureHelper

Same as above with alignTimestamps set to false and yuvConverter set to new YuvConverter.

See also


open fun create(threadName: String, sharedContext: EglBase.Context, alignTimestamps: Boolean): SurfaceTextureHelper

Same as above with yuvConverter set to new YuvConverter.

See also


open fun create(threadName: String, sharedContext: EglBase.Context, alignTimestamps: Boolean, yuvConverter: YuvConverter): SurfaceTextureHelper

Create a SurfaceTextureHelper without frame ref monitor.

See also