美摄SDK For Android  3.10.2
| Public 成员函数 | 静态 Public 属性 | Protected 成员函数 | 所有成员列表
com.meicam.effect.sdk.NvsEffectRenderCore类 参考

特效渲染类 更多...

class  GPUTexture
 
class  GPUTextureInfo
 

Public 成员函数

boolean initialize ()
 
boolean initialize (int flags)
 
int renderEffect (NvsEffect effect, int inputTexId, NvsVideoResolution inputVideoResolution, int outputTexId, long timeStamp, int flags)
 渲染特效 更多...
 
int renderEffect (NvsEffect effect, int inputTexId, byte[] inputBuddyBuffer, NvsVideoFrameInfo buddyBufferInfo, int physicalOrientation, NvsVideoResolution inputVideoResolution, int outputTexId, long timeStamp, int flags)
 渲染特效 更多...
 
int renderEffect (NvsEffect effect, int inputTexId, ByteBuffer BuddyBuffer, NvsVideoFrameInfo buddyBufferInfo, int physicalOrientation, NvsVideoResolution inputVideoResolution, int outputTexId, long timeStamp, int flags)
 渲染特效 更多...
 
ByteBuffer renderEffect (NvsEffect effect, byte[] inputBuffer, NvsVideoFrameInfo inputBufferInfo, int physicalOrientation, int outputFrameFormat, boolean isBT601, long timeStamp, int flags)
 渲染特效 更多...
 
ByteBuffer renderEffects (NvsEffect[] effects, byte[] inputBuffer, NvsVideoFrameInfo inputBufferInfo, int physicalOrientation, int outputFrameFormat, boolean isBT601, long timeStamp, int flags)
 渲染特效 更多...
 
int renderEffects (NvsEffect[] effects, int inputTexId, ByteBuffer buddyBuffer, NvsVideoFrameInfo buddyBufferInfo, int physicalOrientation, NvsVideoResolution inputVideoResolution, int outputTexId, long timeStamp, int flags)
 渲染特效 更多...
 
int renderEffect (NvsEffect effect, int[] inputTextureIds, int inputTextureCount, NvsVideoResolution inputVideoResolution, int outputTexId, long timeStamp, int flags)
 渲染特效 更多...
 
int calcVariantSizeEffectOutputSize (NvsEffect effect, GPUTexture[] inputTexs, int inputTextureCount, NvsVideoResolution expectVideoResolution, GPUTextureInfo outputTexInfo, long timeStamp, int flags)
 计算变画幅特效输出纹理大小 更多...
 
int renderVariantSizeEffect (NvsEffect effect, GPUTexture[] inputTexs, int inputTextureCount, GPUTexture outputTex, long timeStamp, int flags)
 渲染变画幅特效 更多...
 
int rotateTexture (int inputTexId, int orientation, NvsVideoResolution inputVideoResolution, int outputTexId, NvsVideoResolution outputVideoResolution, int flags)
 旋转纹理 更多...
 
int uploadVideoFrameToTexture (byte[] inputBuffer, NvsVideoFrameInfo inputbufferInfo, int ouputTexId)
 上传buffer到GPU纹理 更多...
 
int uploadBitmapToTexture (Bitmap inputBmp, int displayRotation, int ouputTexId)
 上传Bitmap到纹理 更多...
 
ByteBuffer downloadFromTexture (int inputTexId, NvsVideoResolution inputVideoResolution, int outputFrameFormat, int isBT601)
 从GPU纹理下传到buffer 更多...
 
ByteBuffer downloadFromTexture (int inputTexId, NvsVideoResolution inputVideoResolution, int outputFrameFormat, int isBT601, boolean isFullRange)
 从GPU纹理下传到buffer 更多...
 
void clearEffectResources (NvsEffect effect)
 清除特效中携带的OPenGL资源 更多...
 
void clearCacheResources ()
 清除缓存资源 更多...
 
void cleanUp ()
 清除NvsEffectRenderCore中的所有资源 更多...
 
void release ()
 释放内部使用的资源 更多...
 

静态 Public 属性

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 成员函数

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

详细描述

特效渲染类

特效渲染类整个SDK的特效渲染入口。

警告
NvsEffectRenderCore类中,所有public API都必须在OpenGL线程使用!!!

成员函数说明

◆ calcVariantSizeEffectOutputSize()

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

计算变画幅特效输出纹理大小

参数
effect要渲染的特效对象
inputTexs输入纹理数组
inputTextureCount输入纹理个数
expectVideoResolution期望输出纹理的视频解析度
outputTexInfo当前特效输出纹理信息
timeStamp当前渲染的时间戳
flags暂时为0
返回
返回NV_EFFECT_CORE_NO_ERROR为成功,其他值都是错误,参考错误码定义
自从
3.9.1

◆ cleanUp()

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

清除NvsEffectRenderCore中的所有资源

自从
2.3.0

◆ clearCacheResources()

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

清除缓存资源

自从
2.3.0

◆ clearEffectResources()

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

清除特效中携带的OPenGL资源

参数
effect要清除的特效对象
自从
2.3.0

◆ downloadFromTexture() [1/2]

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

从GPU纹理下传到buffer

参数
inputTexId输入纹理
inputVideoResolution输入纹理的视频解析度
outputFrameFormat返回下传的buffer格式(NV21, YUV420P或者RGBA格式) (VIDEO_FRAME_PIXEL_FROMAT)
isBT601是否按照BT.601的标准转化,如果返回下传的buffer格式为YUV,这个参数有意义
返回
返回下传的buffer
自从
2.12.0

◆ downloadFromTexture() [2/2]

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

从GPU纹理下传到buffer

参数
inputTexId输入纹理
inputVideoResolution输入纹理的视频解析度
outputFrameFormat返回下传的buffer格式(NV21, YUV420P或者RGBA格式) (VIDEO_FRAME_PIXEL_FROMAT)
isBT601是否按照BT.601的标准转化,如果返回下传的buffer格式为YUV,这个参数有意义
isFullRange是否是Full Range,如果返回下传的buffer格式为YUV,这个参数有意义
返回
返回下传的buffer
自从
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

释放内部使用的资源

自从
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

渲染特效

参数
effect要渲染的特效对象
inputBuffer输入Buffer
inputBufferInfo输入Buffer的信息
physicalOrientation物理方向
outputFrameFormat返回下传的buffer格式(NV21, YUV420P或者RGBA格式) (VIDEO_FRAME_PIXEL_FROMAT)
isBT601是否按照BT.601的标准转化,如果返回下传的buffer格式为YUV,这个参数有意义
timeStamp当前渲染的时间戳
flags暂时为0
返回
返回渲染的buffer
自从
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

渲染特效

参数
effect要渲染的特效对象
inputTexId输入纹理
inputBuddyBuffer输入纹理的伴随Buffer(NV21, YUV420P或者RGBA格式)
buddyBufferInfo伴随Buffer的信息
physicalOrientation物理方向
inputVideoResolution输入纹理的视频解析度
outputTexId输出纹理
timeStamp当前渲染的时间戳
flags暂时为0
返回
返回NV_EFFECT_CORE_NO_ERROR为成功,其他值都是错误,参考错误码定义
自从
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

渲染特效

参数
effect要渲染的特效对象
inputTexId输入纹理
inputBuddyBuffer输入纹理的伴随Buffer(NV21, NV12,YUV420P或者RGBA格式)
buddyBufferInfo伴随Buffer的信息
physicalOrientation物理方向
inputVideoResolution输入纹理的视频解析度
outputTexId输出纹理
timeStamp当前渲染的时间戳
flags暂时为0
返回
返回NV_EFFECT_CORE_NO_ERROR为成功,其他值都是错误,参考错误码定义
自从
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

渲染特效

参数
effect要渲染的特效对象
inputTexId输入纹理
inputVideoResolution输入纹理的视频解析度
outputTexId输出纹理
timeStamp当前渲染的时间戳
flags暂时为0
返回
返回NV_EFFECT_CORE_NO_ERROR为成功,其他值都是错误,参考错误码定义
自从
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

渲染特效

参数
effect要渲染的特效对象
inputTextureIds输入纹理数组
inputTextureCount输入纹理个数
inputVideoResolution输入纹理的视频解析度
outputTexId输出纹理
timeStamp当前渲染的时间戳
flags暂时为0
返回
返回NV_EFFECT_CORE_NO_ERROR为成功,其他值都是错误,参考错误码定义
自从
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

渲染特效

参数
effects要渲染的特效数组对象
inputBuffer输入Buffer
inputBufferInfo输入Buffer的信息
physicalOrientation物理方向
outputFrameFormat返回下传的buffer格式(NV21, YUV420P或者RGBA格式) (VIDEO_FRAME_PIXEL_FROMAT)
isBT601是否按照BT.601的标准转化,如果返回下传的buffer格式为YUV,这个参数有意义
timeStamp当前渲染的时间戳
flags暂时为0
返回
返回渲染的buffer
自从
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

渲染特效

参数
effects要渲染的特效数组对象
inputTexId输入纹理
buddyBuffer输入纹理的伴随Buffer(NV21, NV12,YUV420P或者RGBA格式)
buddyBufferInfo伴随Buffer的信息
physicalOrientation物理方向
inputVideoResolution输入纹理的视频解析度
outputTexId输出纹理
timeStamp当前渲染的时间戳
flags暂时为0
返回
返回NV_EFFECT_CORE_NO_ERROR为成功,其他值都是错误,参考错误码定义
自从
3.8.0

◆ renderVariantSizeEffect()

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

渲染变画幅特效

参数
effect要渲染的特效对象
inputTexs输入纹理数组
inputTextureCount输入纹理个数
outputTex输出纹理
timeStamp当前渲染的时间戳
flags暂时为0
返回
返回NV_EFFECT_CORE_NO_ERROR为成功,其他值都是错误,参考错误码定义
自从
3.9.1

◆ rotateTexture()

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

旋转纹理

参数
inputTexId输入纹理
orientation
inputVideoResolution输入纹理的视频解析度
outputTexId输出纹理
inputVideoResolution输出纹理的视频解析度
flags暂时为0
返回
返回NV_EFFECT_CORE_NO_ERROR为成功,其他值都是错误,参考错误码定义
自从
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

上传Bitmap到纹理

参数
inputBmp输入Bitmap
displayRotation输入bitmap显示方向 请参见VIDEO_ROTATION_*
outputTexId输出纹理
返回
返回NV_EFFECT_CORE_NO_ERROR为成功,其他值都是错误,参考错误码定义
自从
3.9.1

◆ uploadVideoFrameToTexture()

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

上传buffer到GPU纹理

参数
inputBuffer输入Buffer (NV21, YUV420P或者RGBA格式) (VIDEO_FRAME_PIXEL_FROMAT)
inputbufferInfoBuffer的信息
outputTexId输出纹理
返回
返回NV_EFFECT_CORE_NO_ERROR为成功,其他值都是错误,参考错误码定义
自从
2.12.0

类成员变量说明

◆ 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

该类的文档由以下文件生成: