GPUImage源码解读(十六)

GPUImageTextureInput继承自GPUImageOutput,可以用传入的纹理生成帧缓存对象。因此,可以作为响应链源使用。

  • 构造方法。构造方法只有一个,接收的参数是纹理对象和纹理大小
- (id)initWithTexture:(GLuint)newInputTexture size:(CGSize)newTextureSize;
  • 构造的时候,主要是用传入的纹理生成帧缓存对象。
- (id)initWithTexture:(GLuint)newInputTexture size:(CGSize)newTextureSize;
{
    if (!(self = [super init]))
    {
        return nil;
    }

    runSynchronouslyOnVideoProcessingQueue(^{
        [GPUImageContext useImageProcessingContext];
    });

    textureSize = newTextureSize;

    runSynchronouslyOnVideoProcessingQueue(^{
        //分配一个GPUImageFramebuffer,缓存纹理单元的信息
        outputFramebuffer = [[GPUImageFramebuffer alloc] initWithSize:newTextureSize overriddenTexture:newInputTexture];
    });

    return self;
}
  • 其它方法。出去父类的方法,它只提供了一个数据处理的方法
- (void)processTextureWithFrameTime:(CMTime)frameTime;
  • 处理数据的过程就是将帧缓存对象传递给所有targets,驱动所有targets处理。
- (void)processTextureWithFrameTime:(CMTime)frameTime;
{
    runAsynchronouslyOnVideoProcessingQueue(^{
        // 遍历所有targets,驱动各个target处理数据
        for (id<GPUImageInput> currentTarget in targets)
        {
            NSInteger indexOfObject = [targets indexOfObject:currentTarget];
            NSInteger targetTextureIndex = [[targetTextureIndices objectAtIndex:indexOfObject] integerValue];

            [currentTarget setInputSize:textureSize atIndex:targetTextureIndex];
            [currentTarget setInputFramebuffer:outputFramebuffer atIndex:targetTextureIndex];
            [currentTarget newFrameReadyAtTime:frameTime atIndex:targetTextureIndex];
        }
    });
}
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
flowable解读是指对flowable工作流引擎的代码进行分析和理解。flowable是一个开的工作流引擎,用于实现和管理复杂的业务流程。在解读过程中,可以深入了解flowable的设计原理、核心组件和算法实现。 根据引用,流程定义是将一个流程XML文件部署到flowable中,从而创建一个定义好的流程。因此,在flowable的解读中,可以关注流程定义的实现方式和流程XML文件的解析过程。 引用中提到了从基础讲起,结合应用场景,由浅入深地解释BPMN和Flowable的相关组件,并结合具体实例演示功能的使用和注意事项。这表明在解读中,可以结合实际应用场景,逐步深入地了解Flowable的不同组件的实现原理和使用方式。 引用中介绍了BPMN2.0定义的流程元素,包括流程对象、连接对象、泳道和数据和制品。在解读中,可以重点关注这些元素的实现和它们在flowable代码中的具体实现方式。 总而言之,flowable解读是通过对flowable工作流引擎的代码进行分析和理解,来深入了解flowable的设计原理、核心组件和算法实现。通过结合实际应用场景和流程定义的解析过程,我们能够更加全面地理解flowable工作流引擎的实现原理和使用方式。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *3* [Flowable从入门到码分析](https://blog.csdn.net/weixin_46399870/article/details/130277499)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *2* [Flowable从入门到精通码](https://download.csdn.net/download/qq_36305027/85422953)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值