且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

设置AVMutableVideoComposition指令会导致不调用处理程序

更新时间:2023-12-04 23:21:10

我向Apple提交了一份错误报告,显然这种行为不是一个错误。这是他们的答复:

I filed a bug report with Apple, and apparently this behavior is not a bug. This was their response:


工程部提供了有关此问题的以下信息:

Engineering has provided the following information regarding this issue:

CoreImage过滤和基于图层指令的合成不能同时使用。添加到AVMutableVideoComposition时,不会运行图层指令,使用+ [videoCompositionWithAsset:applyingCIFiltersWithHandler:]初始化它。要在这种情况下使用图层指令,请将功能移到处理程序中,而不是将图层指令添加到AVMutableVideoComposition。

CoreImage filtering and layer instruction based composition can't be used simultaneously. Layer instructions won't be run when added to an AVMutableVideoComposition that it is initialized with +[videoCompositionWithAsset:applyingCIFiltersWithHandler:]. To use layer instructions in this case, move the functionality into the handler instead of adding the layer instructions to the AVMutableVideoComposition.

这解释了为什么指令似乎没有做任何事情,并且没有调用处理程序。他们说将转换功能移到处理程序而不是使用指令;不幸的是,我不太清楚如何实施这个解决方案 - 这是另一个问题。

This explains why the instructions seem to have not been doing anything, and the handler not called. They say to move the transform functionality to the handler instead of using instructions; unfortunately, I do not quite know how to implement this solution –– that is another question.