GlStreamInterface

Created by pedro on 14/3/22.

Constructors

Link copied to clipboard
constructor(context: Context)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
open override fun addFilter(baseFilterRender: BaseFilterRender)

Appends the specified filter to the end. You can modify filter's parameters after set it to stream.

open override fun addFilter(filterPosition: Int, baseFilterRender: BaseFilterRender)

Inserts the specified filter at the specified position. You can modify filter's parameters after set it to stream.

Link copied to clipboard
open override fun addMediaCodecSurface(surface: Surface)

Set surface from MediaCodec class to Opengl. This surface is used to copy pixels from Opengl surface to this surface and encode this pixels.

Link copied to clipboard
fun attachPreview(surface: Surface)
Link copied to clipboard
open override fun clearFilters()

Remove all filters

Link copied to clipboard
Link copied to clipboard
open override fun filtersCount(): Int
Link copied to clipboard
open override fun forceFpsLimit(fps: Int)

Force stream to work with fps selected in prepareVideo method. Must be called before prepareVideo. This is not recommend because could produce fps problems.

Link copied to clipboard
Link copied to clipboard
open override fun getEncoderSize(): Point
Link copied to clipboard
open override fun getSurface(): Surface

Get Surface generated by Opengl. This should be called after start render.

Link copied to clipboard
open override fun getSurfaceTexture(): SurfaceTexture

Get SurfaceTexture generated by Opengl. This should be called after start render.

Link copied to clipboard
open override fun isRunning(): Boolean
Link copied to clipboard
open override fun isVideoMuted(): Boolean
Link copied to clipboard
open override fun muteVideo()

This produce send black image all time. This affect to stream and record result.

Link copied to clipboard
open override fun onFrameAvailable(surfaceTexture: SurfaceTexture?)
Link copied to clipboard
open override fun removeFilter(baseFilterRender: BaseFilterRender)

Removes the first occurrence of the specified element from this list, if it is present.

open override fun removeFilter(filterPosition: Int)

Remove the filter at the specified position.

Link copied to clipboard
open override fun removeMediaCodecSurface()

Remove surface generated from MediaCodec.

Link copied to clipboard
fun setAspectRatioMode(aspectRatioMode: AspectRatioMode)
Link copied to clipboard
fun setCameraOrientation(orientation: Int)
Link copied to clipboard
open override fun setEncoderSize(width: Int, height: Int)

Set video encoder size use to Opengl

Link copied to clipboard
open override fun setFilter(baseFilterRender: BaseFilterRender)

Replace the filter in position 0 or add the filter if list is empty. You can modify filter's parameters after set it to stream.

open override fun setFilter(filterPosition: Int, baseFilterRender: BaseFilterRender)

Replaces the filter at the specified position with the specified filter. You can modify filter's parameters after set it to stream.

Link copied to clipboard
open override fun setForceRender(enabled: Boolean)
open override fun setForceRender(enabled: Boolean, fps: Int)
Link copied to clipboard
fun setIsPortrait(isPortrait: Boolean)
Link copied to clipboard
open override fun setIsPreviewHorizontalFlip(flip: Boolean)

When true, flips only the preview horizontally

Link copied to clipboard
open override fun setIsPreviewVerticalFlip(flip: Boolean)

When true, flips only the preview vertically

Link copied to clipboard
open override fun setIsStreamHorizontalFlip(flip: Boolean)

When true, flips only the stream horizontally

Link copied to clipboard
open override fun setIsStreamVerticalFlip(flip: Boolean)

When true, flips only the stream vertically

Link copied to clipboard
fun setPreviewResolution(width: Int, height: Int)
Link copied to clipboard
fun setPreviewRotation(orientation: Int)
Link copied to clipboard
open override fun setRotation(rotation: Int)
Link copied to clipboard
open override fun setStreamRotation(orientation: Int)
Link copied to clipboard
open override fun start()

INTERNAL METHOD. Start Opengl rendering.

Link copied to clipboard
open override fun stop()

INTERNAL METHOD. Stop Opengl rendering.

Link copied to clipboard
open override fun takePhoto(takePhotoCallback: TakePhotoCallback?)

Capture an Image from Opengl.

Link copied to clipboard
open override fun unMuteVideo()