AlivcLivePusher_Interactive v6.17.0
Aliyun Live Pusher Interactive SDK API Reference Manual for iOS Platforms
Loading...
Searching...
No Matches
<AlivcLivePusherCustomFilterDelegate> Protocol Reference

外置滤镜相关回调 More...

#include "AlivcLivePusher.h"

Inheritance diagram for <AlivcLivePusherCustomFilterDelegate>:

Instance Methods

(void) - onCreate:context:
 通知外置滤镜创建回调
 
(void) - onDestory:
 通知外置滤镜销毁回调
 
(int) - onProcess:texture:textureWidth:textureHeight:extra:
 通知外置滤镜处理回调(纹理回调)
 
(BOOL) - onProcessVideoSampleBuffer:sampleBuffer:
 通知外置滤镜处理回调,当前版本SDK在互动模式下默认回抛CVPixelBuffer,需要使用onProcessVideoSampleBuffer处理美颜,如果想要回抛纹理ID,需要设置enableLocalVideoTexture
 

Detailed Description

外置滤镜相关回调

Method Documentation

◆ onCreate:context:

- (void) onCreate: (AlivcLivePusher *)  pusher
context: (void *)  context 
required

通知外置滤镜创建回调

Parameters
pusher推流引擎对象
context上下文环境

◆ onDestory:

- (void) onDestory: (AlivcLivePusher *)  pusher
required

通知外置滤镜销毁回调

Parameters
pusher推流引擎对象

◆ onProcess:texture:textureWidth:textureHeight:extra:

- (int) onProcess: (AlivcLivePusher *)  pusher
texture: (int)  texture
textureWidth: (int)  width
textureHeight: (int)  height
extra: (long)  extra 
required

通知外置滤镜处理回调(纹理回调)

Parameters
pusher推流引擎对象
texture纹理ID
width图像宽
height图像高
extra额外信息
Returns
返回处理后的纹理ID
Note
互动模式下默认是回抛CVPixelBuffer用于美颜,如果想要回调纹理ID,需要设置enableLocalVideoTexture,设置后,互动模式会回抛纹理ID

◆ onProcessVideoSampleBuffer:sampleBuffer:

- (BOOL) onProcessVideoSampleBuffer: (AlivcLivePusher *)  pusher
sampleBuffer: (AlivcLiveVideoDataSample *)  sampleBuffer 
required

通知外置滤镜处理回调,当前版本SDK在互动模式下默认回抛CVPixelBuffer,需要使用onProcessVideoSampleBuffer处理美颜,如果想要回抛纹理ID,需要设置enableLocalVideoTexture

Parameters
pusher推流引擎对象
sampleBuffer视频sample data AlivcLiveVideoDataSample
Note
美颜SDK有两种处理方式:1.在SDK抛出的sampleBuffer.pixelBuffer上直接处理数据,不生成新的pixbuffer; 2.生成新的newPixelBuffer,在新的newPixelBuffer上处理美颜,这种情况需要将新生成的newPixelBuffer写会SDK,可以参考如下示例代码:
  • (BOOL)onProcessVideoSampleBuffer:(AlivcLivePusher *)pusher sampleBuffer:(AlivcLiveVideoDataSample *)sampleBuffer{ CVPixelBufferRef newPixelBuffer = thirdparty_process(sampleBuffer.pixelBuffer); sampleBuffer.pixelBuffer = newPixelBuffer; return YES; }
Returns
  • YES: 需要写回SDK
  • NO: 不需要写回SDK
Note
此回调只在livePushMode为AlivcLivePushInteractiveMode,即只在直播SDK工作在互动模式下才回回调

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