ICatchIPancamGL interface

  1. package com.icatchtek.pancam.customer.gl;
  2. public interface ICatchIPancamGL {
  3. ...
  4. }

Used to init/release GL core, set or change GL core’s render type, set/clear image format, set/remove surface context.

Public methods

getPancamGLTransform

  1. ICatchIPancamGLTransform getPancamGLTransform()
  2. throws com.icatchtek.reliant.customer.exception.IchDeprecatedException

Get pancamGL transform
Returns:
PancamGLTransform();
Throws:**

  • com.icatchtek.reliant.customer.exception.IchDeprecatedException - The instance is deprecated, You should get new one using ICatchIPancamRender.enableGLRender.

init

  1. boolean init()
  2. throws IchGLPanoramaTypeNotSupportedException,
  3. IchGLAlreadyInitedException,
  4. com.icatchtek.reliant.customer.exception.IchDeprecatedException

Init the GL core, You should specify panoramaType, currently we only support type which called ICH_GL_PANORAMA_TYPE_SPHERE, the feature SPHERE_VR, SPHERE_SEMI will coming soon.
Returns:
Return true if no error occurred, otherwise return false.
Throws:

  • IchGLPanoramaTypeNotSupportedException - Indicates the panorama type not supported yet.
  • IchGLAlreadyInitedException - Indicates the pancam object had been inited.
  • com.icatchtek.reliant.customer.exception.IchDeprecatedException - The instance is deprecated, You should get new one using ICatchIPancamRender.enableGLRender.

init

  1. boolean init(int panoramaType)
  2. throws IchGLPanoramaTypeNotSupportedException,
  3. IchGLAlreadyInitedException,
  4. com.icatchtek.reliant.customer.exception.IchDeprecatedException

Init the pancam object, You should specify panoramaType, currently we only support type which called ICH_GL_PANORAMA_TYPE_SPHERE, the feature SPHERE_VR, SPHERE_SEMI will coming soon.
Parameters:

  • panoramaType - The panorama type.

Returns:
Return true if no error occurred, otherwise return false.
Throws:

  • IchGLPanoramaTypeNotSupportedException - Indicates the panorama type not supported yet.
  • IchGLAlreadyInitedException - Indicates the pancam object had been inited.
  • com.icatchtek.reliant.customer.exception.IchDeprecatedException - The instance is deprecated, You should get new one using ICatchIPancamRender.enableGLRender.

release

  1. boolean release()
  2. throws IchGLNotInitedException,
  3. com.icatchtek.reliant.customer.exception.IchDeprecatedException

Release the GL Core’s resources.
Returns:
Return true if no error occurred, otherwise return false.
Throws:**

  • IchGLNotInitedException - Indicates the pancam object had not been inited.
  • com.icatchtek.reliant.customer.exception.IchDeprecatedException - The instance is deprecated, You should get new one using ICatchIPancamRender.enableGLRender.

changePanoramaType

  1. boolean changePanoramaType(int panoramaType)
  2. throws IchGLPanoramaTypeNotSupportedException,
  3. IchGLNotInitedException,
  4. com.icatchtek.reliant.customer.exception.IchInvalidArgumentException

Change Panorama type.
Parameters:

  • panoramaType - The panorama type.

Returns:
Return true if no error occurred, otherwise return false.
Throws:

  • IchGLPanoramaTypeNotSupportedException - Indicates the panorama type not supported yet.
  • com.icatchtek.reliant.customer.exception.IchDeprecatedException - The instance is deprecated, You should get new one using ICatchIPancamRender.enableGLRender.
  • IchGLNotInitedException - The GL Core feature had not been inited.
  • com.icatchtek.reliant.customer.exception.IchInvalidArgumentException - Invalid argument, maybe the panoramaType you specified could not be supported.

setFormat

  1. boolean setFormat(int format,
  2. int width,
  3. int height)
  4. throws IchGLFormatNotSupportedException,
  5. IchGLNotInitedException,
  6. com.icatchtek.reliant.customer.exception.IchDeprecatedException

Set the SDK’s inner picture format which used for rendering, This format must be corresponded with the image or decoded stream format you specified when using still image, doing preview or video playback. In Android platform, The SDK will decode H.264 stream itself in order to get better performance, so you do not need to call this method. In IOS platform, you should decode the H.264 stream to YUV_I420 or NV12 since our SDK just support these two YUV formats only.
Parameters:

  • format - The SDK’s inner picture format which used for rendering.

Returns:
Return true if no error occurred, otherwise return false.
Throws:

  • IchGLFormatNotSupportedException - The format not supported by SDK.
  • IchGLNotInitedException - The SDK had not been inited yet.
  • com.icatchtek.reliant.customer.exception.IchDeprecatedException - The instance is deprecated, You should get new one using ICatchIPancamRender.enableGLRender.

clearFormat

  1. boolean clearFormat()
  2. throws IchGLNotInitedException,
  3. com.icatchtek.reliant.customer.exception.IchDeprecatedException

Remove the format currently being used for rendering, Notice that once you clear current format, The SDK will stop rendering until you call setFormat again.
Returns:
Return true if no error occurred, otherwise return false.
Throws:**

  • IchGLNotInitedException - The SDK had not been inited yet.
  • com.icatchtek.reliant.customer.exception.IchDeprecatedException - The instance is deprecated, You should get new one using ICatchIPancamRender.enableGLRender.

setSurface

  1. boolean setSurface(int surfaceType,
  2. ICatchISurfaceContext surfaceContext)
  3. throws IchGLNotInitedException,
  4. IchGLSurfaceAlreadySetException,
  5. com.icatchtek.reliant.customer.exception.IchDeprecatedException

Set the surface context, which used to render panorama picture.
Parameters:

  • surfaceType - The surface type.
  • surfaceContext - The surface context.

Returns:
Return true if no error occurred, otherwise return false.
Throws:

  • IchGLNotInitedException - Indicates the pancam object had not been inited.
  • IchGLSurfaceAlreadySetException - Indicates the surface context had been set.
  • com.icatchtek.reliant.customer.exception.IchDeprecatedException - The instance is deprecated, You should get new one using ICatchIPancamRender.enableGLRender.

removeSurface

  1. boolean removeSurface(int surfaceType,
  2. ICatchISurfaceContext surfaceContext)
  3. throws IchGLNotInitedException,
  4. IchGLSurfaceNotSetException,
  5. com.icatchtek.reliant.customer.exception.IchDeprecatedException

Remove the surface context which used to render panorama picture.
Parameters:

  • surfaceType - The surface type.
  • surfaceContext - The surface context.

Returns:
Return true if no error occurred, otherwise return false.
Throws:

  • IchGLNotInitedException - Indicates the pancam object had not been inited.
  • IchGLSurfaceNotSetException - Indicates the surface context had not been set.
  • com.icatchtek.reliant.customer.exception.IchDeprecatedException - The instance is deprecated, You should get new one using ICatchIPancamRender.enableGLRender.