Class HMSBitmapPlugin
-
- All Implemented Interfaces:
-
live.hms.video.plugin.video.HMSVideoPlugin
public final class HMSBitmapPlugin implements HMSVideoPlugin
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classHMSBitmapPlugin.Companion
-
Field Summary
Fields Modifier and Type Field Description public final static StringTAGprivate final HMSSDKhmsSDKprivate final HMSBitmapUpdateListenerhmsBitmapUpdateListenerpublic final static HMSBitmapPlugin.CompanionCompanion
-
Constructor Summary
Constructors Constructor Description HMSBitmapPlugin(HMSSDK hmsSDK, HMSBitmapUpdateListener hmsBitmapUpdateListener)
-
Method Summary
Modifier and Type Method Description final HMSSDKgetHmsSDK()final HMSBitmapUpdateListenergetHmsBitmapUpdateListener()HMSVideoPluginTypegetPluginType()UnitprocessVideoFrame(VideoFrame inputVideoFrame, HMSPluginResultListener outputListener, Boolean skipProcessing)This function will be called by the SDK for every video frame which the plugin needs to process. Unitstop()the plugin can use this function to dispose off its resources. StringgetName()The name is meant to uniquely specify a plugin instance. BooleanisSupported()This function will be called before the call to init, it is used to check whether the plugin supports current OS and device or not. Unitinit()This function will be called in the beginning for initialization which may include tasks like setting up variables, loading ML models etc. UnitsetKey(String key)-
-
Constructor Detail
-
HMSBitmapPlugin
HMSBitmapPlugin(HMSSDK hmsSDK, HMSBitmapUpdateListener hmsBitmapUpdateListener)
-
-
Method Detail
-
getHmsBitmapUpdateListener
final HMSBitmapUpdateListener getHmsBitmapUpdateListener()
-
getPluginType
HMSVideoPluginType getPluginType()
-
processVideoFrame
Unit processVideoFrame(VideoFrame inputVideoFrame, HMSPluginResultListener outputListener, Boolean skipProcessing)
This function will be called by the SDK for every video frame which the plugin needs to process.
- Parameters:
inputVideoFrame- input videoFrame containing the input frameoutputListener-HMSActionResultListenerwhich is a callback object needed to inform about output VideoFrame and time Taken to receive itskipProcessing- use results from previous run if true
-
stop
Unit stop()
the plugin can use this function to dispose off its resources. It'll be called when the processor instance is no longer needed at the end.
-
getName
String getName()
The name is meant to uniquely specify a plugin instance. This will be used to track number of plugins added, and same name won't be allowed twice.
-
isSupported
Boolean isSupported()
This function will be called before the call to init, it is used to check whether the plugin supports current OS and device or not. An error will be thrown back to the user if they try to use an unsupported plugin.
-
init
Unit init()
This function will be called in the beginning for initialization which may include tasks like setting up variables, loading ML models etc. This can be used by a plugin to ensure it's prepared at the time processVideoFrame is called.
-
-
-
-