Package com.leiainc.leiamediasdk
Class LeiaMediaSDK
java.lang.Object
com.leiainc.leiamediasdk.LeiaMediaSDK
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateLayoutDetection(android.content.Context context)
Creates layout detection class that could be used for auto-detecting content layout mono, sbs, 360, 360 top/bottom, 180, 180SBScreateMonoPhotoSurfaceRenderer(android.content.Context context, android.view.Surface surface, com.leiainc.androidsdk.photoformat.MultiviewImage image)
Creates surface renderer that is responsible for real-time 2d-3d transformation and playback of regular mono image content.createMonoVideoSurfaceRenderer(android.content.Context context, android.view.Surface surface, MonoVideoSurfaceRenderer.SurfaceTextureCallback surfaceTextureCallback)
Creates surface renderer that is responsible for real-time 2d-3d transformation and playback of regular mono (not sbs) video content.createMultiviewSynthesizer(android.content.Context context, boolean initMono, boolean initStereo, boolean initNnConvergence, boolean useNeuralDisparity)
Creates class that provides functionality of transforming mono and stereo images to stereo or multiview tapestry (MxN layout) apply parallax reduction (convergence) and calculate optimal 3d effect parameters like (gain and convergence) for MultiviewImagecreateStereoVideoSurfaceRenderer(android.content.Context context, android.view.Surface surface, StereoVideoSurfaceRenderer.SurfaceTextureCallback surfaceTextureCallback)
Creates surface renderer that is responsible playback of sbs video content with optional convergence estimation (parallax control).static LeiaMediaSDK.AppWrapper
static LeiaMediaSDK
getInstance(android.content.Context context)
Get LeiaMediaSDK singleton instancestatic void
verifyMediaServiceInstallation(androidx.appcompat.app.AppCompatActivity activity)
Verifies if the Leia MediaService is installed on the device.static void
verifyMediaServiceInstallation(androidx.appcompat.app.AppCompatActivity activity, com.leiainc.leiamediasdk.services.ui.PromptUpdateDialogListener responseListener)
Verifies if the Leia MediaService is installed on the device.
-
Method Details
-
getAppWrapper
-
getInstance
Get LeiaMediaSDK singleton instance- Parameters:
context
-- Returns:
- current LeiaMediaSDK instance
-
verifyMediaServiceInstallation
public static void verifyMediaServiceInstallation(androidx.appcompat.app.AppCompatActivity activity)Verifies if the Leia MediaService is installed on the device. If not installed, it shows a non-cancellable system update prompt. This provides a default behavior that most Leia apps need. If you need to customize the behavior, you can use the overloaded function by passing in your own implementation of [PromptUpdateDialogListener]On Positive response, the dialog and app are closed and the user is navigated to the Settings page. On Negative response, the calling app is closed.
-
verifyMediaServiceInstallation
public static void verifyMediaServiceInstallation(androidx.appcompat.app.AppCompatActivity activity, com.leiainc.leiamediasdk.services.ui.PromptUpdateDialogListener responseListener)Verifies if the Leia MediaService is installed on the device. If not installed, it shows a non-cancellable system update prompt. This provides a default behavior that most Leia apps need. If you need to customize the behavior, you can use the overloaded function by passing in your own implementation of [PromptUpdateDialogListener]On Positive response, the dialog and app are closed and the user is navigated to the Settings page. On Negative response, the calling app is closed.
-
createMonoVideoSurfaceRenderer
public MonoVideoSurfaceRenderer createMonoVideoSurfaceRenderer(android.content.Context context, android.view.Surface surface, MonoVideoSurfaceRenderer.SurfaceTextureCallback surfaceTextureCallback)Creates surface renderer that is responsible for real-time 2d-3d transformation and playback of regular mono (not sbs) video content. Usage example could be found @see MonoVideoActivity example- Parameters:
context
- app contextsurface
- surface that will be used for renderingsurfaceTextureCallback
- surface callback provided by video player (ExoPlayer in all our demos)- Returns:
- class instance
-
createStereoVideoSurfaceRenderer
public StereoVideoSurfaceRenderer createStereoVideoSurfaceRenderer(android.content.Context context, android.view.Surface surface, StereoVideoSurfaceRenderer.SurfaceTextureCallback surfaceTextureCallback)Creates surface renderer that is responsible playback of sbs video content with optional convergence estimation (parallax control). Usage example could be found @see MonoVideoActivity example- Parameters:
context
- app contextsurface
- surface that will be used for renderingsurfaceTextureCallback
- surface callback provided by video player (ExoPlayer in all our demos)- Returns:
- class instance
-
createMonoPhotoSurfaceRenderer
public MonoPhotoSurfaceRenderer createMonoPhotoSurfaceRenderer(android.content.Context context, android.view.Surface surface, com.leiainc.androidsdk.photoformat.MultiviewImage image)Creates surface renderer that is responsible for real-time 2d-3d transformation and playback of regular mono image content. This renderer has optional interactive viewpoint position control (X,Y,Z) and simple animation control.- Parameters:
context
- app contextsurface
- surface that will be used for renderingimage
- Multiview image containing single albedo (RGB image) and disparity map- Returns:
- class instance
-
createMultiviewSynthesizer
public MultiviewSynthesizer createMultiviewSynthesizer(android.content.Context context, boolean initMono, boolean initStereo, boolean initNnConvergence, boolean useNeuralDisparity)Creates class that provides functionality of transforming mono and stereo images to stereo or multiview tapestry (MxN layout) apply parallax reduction (convergence) and calculate optimal 3d effect parameters like (gain and convergence) for MultiviewImage- Parameters:
context
- app contextinitMono
- LazyLoad mono estimation networks? (500-1000ms)initStereo
- LazyLoad stereo estimation networks? (500-1000ms)initNnConvergence
- LazyLoad convergence networks? (500-1000ms)useNeuralDisparity
-- Returns:
- class instance
-
createLayoutDetection
Creates layout detection class that could be used for auto-detecting content layout mono, sbs, 360, 360 top/bottom, 180, 180SBS- Parameters:
context
- app context- Returns:
- class instance
-