Package com.banuba.sdk.offscreen
Class OffscreenPlayerThread
- java.lang.Object
-
- java.lang.Thread
-
- com.banuba.sdk.internal.BaseWorkThread<OffscreenPlayerHandler>
-
- com.banuba.sdk.offscreen.OffscreenPlayerThread
-
- All Implemented Interfaces:
java.lang.Runnable
public class OffscreenPlayerThread extends BaseWorkThread<OffscreenPlayerHandler>
-
-
Constructor Summary
Constructors Constructor Description OffscreenPlayerThread(android.content.Context context, com.banuba.sdk.effect_player.EffectPlayer player, android.util.Size size, OffscreenSimpleConfig config)
OffscreenPlayerThread(android.content.Context context, OffscreenEffectPlayerConfig config, java.lang.String key)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected OffscreenPlayerHandler
constructHandler()
void
enableAudio(boolean enable)
void
handleCallJsMethod(java.lang.String method, java.lang.String parameter)
void
handleEvalJs(java.lang.String script, com.banuba.sdk.effect_player.JsCallback resultCallback)
void
handleFullImageData(com.banuba.sdk.types.FullImageData data, ReleaseCallback callback, OEPImageFormat outputImageFormat, long timestamp)
void
handleImageProcess(android.media.Image image, ImageOrientation imageOrientation, OEPImageFormat outputImageFormat, long timestamp)
void
handleLoadEffect(java.lang.String effectName)
void
handleLoadEffect(java.lang.String effectName, boolean async)
void
handlePlaybackPause()
void
handlePlaybackPlay()
void
handlePlaybackStop()
void
handleSetListener(ImageProcessedListener listener, android.os.Handler handler)
void
handleSetSurface(android.graphics.SurfaceTexture surfaceTexture)
void
handleUnloadEffect()
protected void
postRunClear()
protected void
preRunInit()
-
Methods inherited from class com.banuba.sdk.internal.BaseWorkThread
getHandler, releaseHandler, run, shutdown, startAndGetHandler
-
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
-
-
-
Constructor Detail
-
OffscreenPlayerThread
public OffscreenPlayerThread(@NonNull android.content.Context context, @NonNull OffscreenEffectPlayerConfig config, @NonNull java.lang.String key)
-
OffscreenPlayerThread
public OffscreenPlayerThread(@NonNull android.content.Context context, @NonNull com.banuba.sdk.effect_player.EffectPlayer player, @NonNull android.util.Size size, @NonNull OffscreenSimpleConfig config)
-
-
Method Detail
-
constructHandler
@NonNull protected OffscreenPlayerHandler constructHandler()
- Specified by:
constructHandler
in classBaseWorkThread<OffscreenPlayerHandler>
-
preRunInit
protected void preRunInit()
- Overrides:
preRunInit
in classBaseWorkThread<OffscreenPlayerHandler>
-
postRunClear
protected void postRunClear()
- Overrides:
postRunClear
in classBaseWorkThread<OffscreenPlayerHandler>
-
handleLoadEffect
public void handleLoadEffect(@NonNull java.lang.String effectName)
-
handleLoadEffect
public void handleLoadEffect(@NonNull java.lang.String effectName, boolean async)
-
handleImageProcess
public void handleImageProcess(@NonNull android.media.Image image, @NonNull ImageOrientation imageOrientation, @NonNull OEPImageFormat outputImageFormat, long timestamp)
-
handleFullImageData
public void handleFullImageData(@NonNull com.banuba.sdk.types.FullImageData data, @Nullable ReleaseCallback callback, @NonNull OEPImageFormat outputImageFormat, long timestamp)
-
handleUnloadEffect
public void handleUnloadEffect()
-
handleCallJsMethod
public void handleCallJsMethod(@NonNull java.lang.String method, @NonNull java.lang.String parameter)
-
handleEvalJs
public void handleEvalJs(@NonNull java.lang.String script, @Nullable com.banuba.sdk.effect_player.JsCallback resultCallback)
-
handleSetListener
public void handleSetListener(@Nullable ImageProcessedListener listener, @Nullable android.os.Handler handler)
-
handleSetSurface
public void handleSetSurface(@Nullable android.graphics.SurfaceTexture surfaceTexture)
-
handlePlaybackPlay
public void handlePlaybackPlay()
-
handlePlaybackPause
public void handlePlaybackPause()
-
handlePlaybackStop
public void handlePlaybackStop()
-
enableAudio
public void enableAudio(boolean enable)
-
-