MeiCam SDK For Android  3.10.1
Classes | Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
com.meicam.effect.sdk.NvsEffectRenderCore Class Reference

Special effects rendering class. More...

Classes

class  GPUTexture
 
class  GPUTextureInfo
 

Public Member Functions

boolean initialize ()
 
boolean initialize (int flags)
 
int renderEffect (NvsEffect effect, int inputTexId, NvsVideoResolution inputVideoResolution, int outputTexId, long timeStamp, int flags)
 Rendering effects. More...
 
int renderEffect (NvsEffect effect, int inputTexId, byte[] inputBuddyBuffer, NvsVideoFrameInfo buddyBufferInfo, int physicalOrientation, NvsVideoResolution inputVideoResolution, int outputTexId, long timeStamp, int flags)
 Rendering special effects. More...
 
int renderEffect (NvsEffect effect, int inputTexId, ByteBuffer BuddyBuffer, NvsVideoFrameInfo buddyBufferInfo, int physicalOrientation, NvsVideoResolution inputVideoResolution, int outputTexId, long timeStamp, int flags)
 Rendering special effects. More...
 
ByteBuffer renderEffect (NvsEffect effect, byte[] inputBuffer, NvsVideoFrameInfo inputBufferInfo, int physicalOrientation, int outputFrameFormat, boolean isBT601, long timeStamp, int flags)
 Rendering special effects. More...
 
ByteBuffer renderEffects (NvsEffect[] effects, byte[] inputBuffer, NvsVideoFrameInfo inputBufferInfo, int physicalOrientation, int outputFrameFormat, boolean isBT601, long timeStamp, int flags)
 Rendering special array effects. More...
 
int renderEffects (NvsEffect[] effects, int inputTexId, ByteBuffer buddyBuffer, NvsVideoFrameInfo buddyBufferInfo, int physicalOrientation, NvsVideoResolution inputVideoResolution, int outputTexId, long timeStamp, int flags)
 Rendering special array effects. More...
 
int renderEffect (NvsEffect effect, int[] inputTextureIds, int inputTextureCount, NvsVideoResolution inputVideoResolution, int outputTexId, long timeStamp, int flags)
 Rendering special effects. More...
 
int calcVariantSizeEffectOutputSize (NvsEffect effect, GPUTexture[] inputTexs, int inputTextureCount, NvsVideoResolution expectVideoResolution, GPUTextureInfo outputTexInfo, long timeStamp, int flags)
 Rendering special effects. More...
 
int renderVariantSizeEffect (NvsEffect effect, GPUTexture[] inputTexs, int inputTextureCount, GPUTexture outputTex, long timeStamp, int flags)
 Rendered variable size effects. More...
 
int rotateTexture (int inputTexId, int orientation, NvsVideoResolution inputVideoResolution, int outputTexId, NvsVideoResolution outputVideoResolution, int flags)
 Rotate texture. More...
 
int uploadVideoFrameToTexture (byte[] inputBuffer, NvsVideoFrameInfo inputbufferInfo, int ouputTexId)
 uploading buffer to GPU texture More...
 
int uploadBitmapToTexture (Bitmap inputBmp, int displayRotation, int ouputTexId)
 uploading Bitmap to GPU texture More...
 
ByteBuffer downloadFromTexture (int inputTexId, NvsVideoResolution inputVideoResolution, int outputFrameFormat, int isBT601)
 Downloading buffer from GPU texture. More...
 
ByteBuffer downloadFromTexture (int inputTexId, NvsVideoResolution inputVideoResolution, int outputFrameFormat, int isBT601, boolean isFullRange)
 Downloading buffer from GPU texture. More...
 
void clearEffectResources (NvsEffect effect)
 Clears OPenGL resources cached in special effects. More...
 
void clearCacheResources ()
 Clears cached resources. More...
 
void cleanUp ()
 Clears all resources in NvsEffectRenderCore. More...
 
void release ()
 Releases internal resources. More...
 

Static Public Attributes

static final int NV_EFFECT_CORE_NO_ERROR = 0
 
static final int NV_EFFECT_CORE_ERROR_UNKNOWN = -1
 
static final int NV_EFFECT_CORE_INVALID_TEXTURE = -2
 
static final int NV_EFFECT_CORE_FLAGS_IN_SINGLE_GLTHREAD = 1
 
static final int NV_EFFECT_CORE_FLAGS_CREATE_GLCONTEXT_IF_NEED = 2
 
static final int NV_EFFECT_CORE_FLAGS_SUPPORT_4K = 4
 
static final int NV_EFFECT_CORE_FLAGS_SUPPORT_8K = 8
 
static final int NV_EFFECT_CORE_FLAGS_SUPPORT_16K = 16
 
static final int NV_EFFECT_CORE_RENDER_Flags_ISUPSIDEDOWN = 1
 
static final int NV_EFFECT_CORE_RENDER_Flags_ISFLIPHORIZONTAL = 2
 
static final int NV_EFFECT_CORE_RENDER_FLAGS_SHOW_CAPTION_POSTER = 4
 
static final int NV_EFFECT_CORE_RENDER_FLAGS_SHOW_ANIMATED_STICKER_POSTER = 8
 

Protected Member Functions

void setInternalObject (long internalObject)
 
void finalize () throws Throwable
 

Detailed Description

Special effects rendering class.

Special effects rendering class is the rendering entry for the entire SDK.

Warning
In the NvsEffectRenderCore class, all public APIs must be used in OpenGL threads! ! !

Member Function Documentation

◆ calcVariantSizeEffectOutputSize()

int com.meicam.effect.sdk.NvsEffectRenderCore.calcVariantSizeEffectOutputSize ( NvsEffect  effect,
GPUTexture[]  inputTexs,
int  inputTextureCount,
NvsVideoResolution  expectVideoResolution,
GPUTextureInfo  outputTexInfo,
long  timeStamp,
int  flags 
)
inline

Rendering special effects.

Parameters
effectThe effect object to be rendered
inputTexsArray of input texture
inputTextureCountcount of input texture
expectVideoResolutionExpected video resolution of output texture
outputTexInfoOutput texture information
timeStampCurrent rendering timestamp
flagsTemporarily set to 0
Returns
"NV_EFFECT_CORE_NO_ERROR" means success. Any other value means error. Please refer to error code definition.
Since
3.9.1

◆ cleanUp()

void com.meicam.effect.sdk.NvsEffectRenderCore.cleanUp ( )
inline

Clears all resources in NvsEffectRenderCore.

Since
2.3.0

◆ clearCacheResources()

void com.meicam.effect.sdk.NvsEffectRenderCore.clearCacheResources ( )
inline

Clears cached resources.

Since
2.3.0

◆ clearEffectResources()

void com.meicam.effect.sdk.NvsEffectRenderCore.clearEffectResources ( NvsEffect  effect)
inline

Clears OPenGL resources cached in special effects.

Parameters
effectThe effect object to be cleared.
Since
2.3.0

◆ downloadFromTexture() [1/2]

ByteBuffer com.meicam.effect.sdk.NvsEffectRenderCore.downloadFromTexture ( int  inputTexId,
NvsVideoResolution  inputVideoResolution,
int  outputFrameFormat,
int  isBT601 
)
inline

Downloading buffer from GPU texture.

Parameters
inputTexIdID of input texture
inputVideoResolutionResolution of input texture
outputFrameFormatreturned buffer format(NV21, YUV420P or RGBA format) refer to Video Frame Pixel Format.
isBT601The color is converted according to BT.601 standard. If the returned buffer format is YUV, this parameter is meaningful.
Returns
returned buffer of the downloading frame.
Since
2.12.0

◆ downloadFromTexture() [2/2]

ByteBuffer com.meicam.effect.sdk.NvsEffectRenderCore.downloadFromTexture ( int  inputTexId,
NvsVideoResolution  inputVideoResolution,
int  outputFrameFormat,
int  isBT601,
boolean  isFullRange 
)
inline

Downloading buffer from GPU texture.

Parameters
inputTexIdID of input texture
inputVideoResolutionResolution of input texture
outputFrameFormatreturned buffer format(NV21, YUV420P or RGBA format) refer to Video Frame Pixel Format.
isBT601The color is converted according to BT.601 standard. If the returned buffer format is YUV, this parameter is meaningful.
isFullRangeThe color is converted according to full range. If the returned buffer format is YUV, this parameter is meaningful.
Returns
returned buffer of the downloading frame.
Since
2.12.0

◆ finalize()

void com.meicam.effect.sdk.NvsEffectRenderCore.finalize ( ) throws Throwable
inlineprotected

◆ initialize() [1/2]

boolean com.meicam.effect.sdk.NvsEffectRenderCore.initialize ( )
inline

◆ initialize() [2/2]

boolean com.meicam.effect.sdk.NvsEffectRenderCore.initialize ( int  flags)
inline

◆ release()

void com.meicam.effect.sdk.NvsEffectRenderCore.release ( )
inline

Releases internal resources.

Since
3.0.1

◆ renderEffect() [1/5]

ByteBuffer com.meicam.effect.sdk.NvsEffectRenderCore.renderEffect ( NvsEffect  effect,
byte[]  inputBuffer,
NvsVideoFrameInfo  inputBufferInfo,
int  physicalOrientation,
int  outputFrameFormat,
boolean  isBT601,
long  timeStamp,
int  flags 
)
inline

Rendering special effects.

Parameters
effectThe effect object to be rendered
inputBufferinput buffer
inputBufferInfoInformation of input buffer
physicalOrientationPhysical direction
outputFrameFormatreturned buffer format(NV21, YUV420P or RGBA format) refer to Video Frame Pixel Format.
isBT601The color is converted according to BT.601 standard. If the returned buffer format is YUV, this parameter is meaningful.
timeStampCurrent rendering timestamp
flagsTemporarily set to 0
Returns
returned buffer of the rendering frame.
Since
2.14.0

◆ renderEffect() [2/5]

int com.meicam.effect.sdk.NvsEffectRenderCore.renderEffect ( NvsEffect  effect,
int  inputTexId,
byte[]  inputBuddyBuffer,
NvsVideoFrameInfo  buddyBufferInfo,
int  physicalOrientation,
NvsVideoResolution  inputVideoResolution,
int  outputTexId,
long  timeStamp,
int  flags 
)
inline

Rendering special effects.

Parameters
effectThe effect object to be rendered
inputTexIdID of input texture
inputBuddyBufferBuddy buffer of the texture (NV21, YUV420P or RGBA format)
buddyBufferInfoInformation of buddy buffer
physicalOrientationPhysical direction
inputVideoResolutionResolution of input texture
outputTexIdOutput texture
timeStampCurrent rendering timestamp
flagsTemporarily set to 0
Returns
"NV_EFFECT_CORE_NO_ERROR" means success. Any other value means error. Please refer to error code definition.
Since
2.5.0

◆ renderEffect() [3/5]

int com.meicam.effect.sdk.NvsEffectRenderCore.renderEffect ( NvsEffect  effect,
int  inputTexId,
ByteBuffer  BuddyBuffer,
NvsVideoFrameInfo  buddyBufferInfo,
int  physicalOrientation,
NvsVideoResolution  inputVideoResolution,
int  outputTexId,
long  timeStamp,
int  flags 
)
inline

Rendering special effects.

Parameters
effectThe effect object to be rendered
inputTexIdID of input texture
inputBuddyBufferBuddy buffer of the texture (NV21, NV12,YUV420P or RGBA format)
buddyBufferInfoInformation of buddy buffer
physicalOrientationPhysical direction
inputVideoResolutionResolution of input texture
outputTexIdOutput texture
timeStampCurrent rendering timestamp
flagsTemporarily set to 0
Returns
"NV_EFFECT_CORE_NO_ERROR" means success. Any other value means error. Please refer to error code definition.
Since
3.1.1

◆ renderEffect() [4/5]

int com.meicam.effect.sdk.NvsEffectRenderCore.renderEffect ( NvsEffect  effect,
int  inputTexId,
NvsVideoResolution  inputVideoResolution,
int  outputTexId,
long  timeStamp,
int  flags 
)
inline

Rendering effects.

Parameters
effectThe effect object to be rendered
inputTexIdID of input texture
inputVideoResolutionResolution of input texture
outputTexIdOutput texture
timeStampCurrent rendering timestamp
flagsTemporarily set to 0
Returns
"NV_EFFECT_CORE_NO_ERROR" means success. Any other value means error. Please refer to error code definition.
Since
2.3.0

◆ renderEffect() [5/5]

int com.meicam.effect.sdk.NvsEffectRenderCore.renderEffect ( NvsEffect  effect,
int[]  inputTextureIds,
int  inputTextureCount,
NvsVideoResolution  inputVideoResolution,
int  outputTexId,
long  timeStamp,
int  flags 
)
inline

Rendering special effects.

Parameters
effectThe effect object to be rendered
inputTextureIdsID array of input texture
inputTextureCountcount of input texture
inputVideoResolutionResolution of input texture
outputTexIdOutput texture
timeStampCurrent rendering timestamp
flagsTemporarily set to 0
Returns
"NV_EFFECT_CORE_NO_ERROR" means success. Any other value means error. Please refer to error code definition.
Since
2.14.0

◆ renderEffects() [1/2]

ByteBuffer com.meicam.effect.sdk.NvsEffectRenderCore.renderEffects ( NvsEffect[]  effects,
byte[]  inputBuffer,
NvsVideoFrameInfo  inputBufferInfo,
int  physicalOrientation,
int  outputFrameFormat,
boolean  isBT601,
long  timeStamp,
int  flags 
)
inline

Rendering special array effects.

Parameters
effectThe effect object to be rendered
inputBufferinput buffer
inputBufferInfoInformation of input buffer
physicalOrientationPhysical direction
outputFrameFormatreturned buffer format(NV21, YUV420P or RGBA format) refer to Video Frame Pixel Format.
isBT601The color is converted according to BT.601 standard. If the returned buffer format is YUV, this parameter is meaningful.
timeStampCurrent rendering timestamp
flagsTemporarily set to 0
Returns
returned buffer of the rendering frame.
Since
3.3.0

◆ renderEffects() [2/2]

int com.meicam.effect.sdk.NvsEffectRenderCore.renderEffects ( NvsEffect[]  effects,
int  inputTexId,
ByteBuffer  buddyBuffer,
NvsVideoFrameInfo  buddyBufferInfo,
int  physicalOrientation,
NvsVideoResolution  inputVideoResolution,
int  outputTexId,
long  timeStamp,
int  flags 
)
inline

Rendering special array effects.

Parameters
effectsThe effect object to be rendered
inputTexIdInput texture
buddyBufferBuddy buffer of the input texture
buddyBufferInfoInformation of buddy buffer
physicalOrientationPhysical direction
inputVideoResolutionResolution of input texture
outputTexIdOutput texture
timeStampCurrent rendering timestamp
flagsTemporarily set to 0
Returns
"NV_EFFECT_CORE_NO_ERROR" means success. Any other value means error. Please refer to error code definition.
Since
3.8.0

◆ renderVariantSizeEffect()

int com.meicam.effect.sdk.NvsEffectRenderCore.renderVariantSizeEffect ( NvsEffect  effect,
GPUTexture[]  inputTexs,
int  inputTextureCount,
GPUTexture  outputTex,
long  timeStamp,
int  flags 
)
inline

Rendered variable size effects.

Parameters
effectThe effect object to be rendered
inputTexsArray of input texture
inputTextureCountcount of input texture
outputTexOutput texture
timeStampCurrent rendering timestamp
flagsTemporarily set to 0
Returns
"NV_EFFECT_CORE_NO_ERROR" means success. Any other value means error. Please refer to error code definition.
Since
3.9.1

◆ rotateTexture()

int com.meicam.effect.sdk.NvsEffectRenderCore.rotateTexture ( int  inputTexId,
int  orientation,
NvsVideoResolution  inputVideoResolution,
int  outputTexId,
NvsVideoResolution  outputVideoResolution,
int  flags 
)
inline

Rotate texture.

Parameters
inputTexIdInput texture
orientationrotate orientation
inputVideoResolutionResolution of input texture
outputTexIdOutput texture
outputVideoResolutionResolution of output texture
flagsTemporarily set to 0
Returns
"NV_EFFECT_CORE_NO_ERROR" means success. Any other value means error. Please refer to error code definition.
Since
3.8.0

◆ setInternalObject()

void com.meicam.effect.sdk.NvsEffectRenderCore.setInternalObject ( long  internalObject)
inlineprotected

◆ uploadBitmapToTexture()

int com.meicam.effect.sdk.NvsEffectRenderCore.uploadBitmapToTexture ( Bitmap  inputBmp,
int  displayRotation,
int  ouputTexId 
)
inline

uploading Bitmap to GPU texture

Parameters
inputBmpBitmap that will upload to texture
displayRotationRotation of input bitmap refer to VIDEO_ROTATION_*
ouputTexIdOutput texture
Returns
"NV_EFFECT_CORE_NO_ERROR" means success. Any other value means error. Please refer to error code definition.
Since
3.9.1

◆ uploadVideoFrameToTexture()

int com.meicam.effect.sdk.NvsEffectRenderCore.uploadVideoFrameToTexture ( byte[]  inputBuffer,
NvsVideoFrameInfo  inputbufferInfo,
int  ouputTexId 
)
inline

uploading buffer to GPU texture

Parameters
inputBufferbuffer that will upload to texture (NV21, YUV420P or RGBA format) refer to Video Frame Pixel Format
inputbufferInfoInformation of input buffer
ouputTexIdOutput texture
Returns
"NV_EFFECT_CORE_NO_ERROR" means success. Any other value means error. Please refer to error code definition.
Since
2.12.0

Member Data Documentation

◆ NV_EFFECT_CORE_ERROR_UNKNOWN

final int com.meicam.effect.sdk.NvsEffectRenderCore.NV_EFFECT_CORE_ERROR_UNKNOWN = -1
static

◆ NV_EFFECT_CORE_FLAGS_CREATE_GLCONTEXT_IF_NEED

final int com.meicam.effect.sdk.NvsEffectRenderCore.NV_EFFECT_CORE_FLAGS_CREATE_GLCONTEXT_IF_NEED = 2
static

◆ NV_EFFECT_CORE_FLAGS_IN_SINGLE_GLTHREAD

final int com.meicam.effect.sdk.NvsEffectRenderCore.NV_EFFECT_CORE_FLAGS_IN_SINGLE_GLTHREAD = 1
static

◆ NV_EFFECT_CORE_FLAGS_SUPPORT_16K

final int com.meicam.effect.sdk.NvsEffectRenderCore.NV_EFFECT_CORE_FLAGS_SUPPORT_16K = 16
static

◆ NV_EFFECT_CORE_FLAGS_SUPPORT_4K

final int com.meicam.effect.sdk.NvsEffectRenderCore.NV_EFFECT_CORE_FLAGS_SUPPORT_4K = 4
static

◆ NV_EFFECT_CORE_FLAGS_SUPPORT_8K

final int com.meicam.effect.sdk.NvsEffectRenderCore.NV_EFFECT_CORE_FLAGS_SUPPORT_8K = 8
static

◆ NV_EFFECT_CORE_INVALID_TEXTURE

final int com.meicam.effect.sdk.NvsEffectRenderCore.NV_EFFECT_CORE_INVALID_TEXTURE = -2
static

◆ NV_EFFECT_CORE_NO_ERROR

final int com.meicam.effect.sdk.NvsEffectRenderCore.NV_EFFECT_CORE_NO_ERROR = 0
static

◆ NV_EFFECT_CORE_RENDER_Flags_ISFLIPHORIZONTAL

final int com.meicam.effect.sdk.NvsEffectRenderCore.NV_EFFECT_CORE_RENDER_Flags_ISFLIPHORIZONTAL = 2
static

◆ NV_EFFECT_CORE_RENDER_Flags_ISUPSIDEDOWN

final int com.meicam.effect.sdk.NvsEffectRenderCore.NV_EFFECT_CORE_RENDER_Flags_ISUPSIDEDOWN = 1
static

◆ NV_EFFECT_CORE_RENDER_FLAGS_SHOW_ANIMATED_STICKER_POSTER

final int com.meicam.effect.sdk.NvsEffectRenderCore.NV_EFFECT_CORE_RENDER_FLAGS_SHOW_ANIMATED_STICKER_POSTER = 8
static

◆ NV_EFFECT_CORE_RENDER_FLAGS_SHOW_CAPTION_POSTER

final int com.meicam.effect.sdk.NvsEffectRenderCore.NV_EFFECT_CORE_RENDER_FLAGS_SHOW_CAPTION_POSTER = 4
static

The documentation for this class was generated from the following file: