fix: replay paused scopes and bound per-pixel face masks

这个提交包含在:
mac 于 2026-11-08 16:41:55 +08:00 提交
1 父节点 cdf6ddc1d7
当前提交 8a434b8e40
14 个文件已更改
+105 -52

没有与搜索条件相匹配的文件

+12 -1
查看文件
@@ -8,11 +8,22 @@ static inline CMTime DYScopeDisplayTime(CMTime requested,CMTime start,CMTime dur
CMTime last=CMTimeSubtract(end,frame);return CMTimeCompare(last,start)<0?start:last;
}
// Custom-view time can land between rendered input frames. A cached frame
// covers its own interval only; the next frame boundary must get a fresh sample.
static inline bool DYScopeFrameContainsTime(CMTime captured,CMTime requested,CMTime frame){
if(!CMTIME_IS_NUMERIC(captured)||!CMTIME_IS_NUMERIC(requested)||captured.epoch!=requested.epoch)return false;
int comparison=CMTimeCompare(captured,requested);
if(comparison==0)return true;
return comparison<0&&CMTIME_IS_NUMERIC(frame)&&frame.value>0&&!frame.epoch&&
CMTimeCompare(CMTimeSubtract(requested,captured),frame)<0;
}
#import <FxPlug/FxPlugSDK.h>
// Caller must already hold a custom parameter action. OSC events keep their
// provided time; this only normalizes the custom-view clock used to guard them.
static inline CMTime DYHostDisplayedFrameTime(id<PROAPIAccessing> host,CMTime current){
static inline CMTime DYHostDisplayedFrameTime(id<PROAPIAccessing> host,CMTime current,CMTime *frameDuration=nullptr){
id<FxTimingAPI_v4>timing=[host apiForProtocol:@protocol(FxTimingAPI_v4)];CMTime start=kCMTimeInvalid,duration=kCMTimeInvalid,frame=kCMTimeInvalid;
if([timing respondsToSelector:@selector(startTimeOfInputToFilter:)]&&[timing respondsToSelector:@selector(durationTimeOfInputToFilter:)]&&[timing respondsToSelector:@selector(frameDuration:)]){[timing startTimeOfInputToFilter:&start];[timing durationTimeOfInputToFilter:&duration];[timing frameDuration:&frame];}
if(frameDuration)*frameDuration=frame;
return DYScopeDisplayTime(current,start,duration,frame);
}