比较提交

...
作者 SHA1 备注 提交日期
mac a03a056bff release: package 1.18.0 build 105 with resident-app upgrade checks 2026-11-06 17:24:14 +08:00
mac edfbcd540b verify: accept 105 background diagnostics and cloud stack delivery 2026-11-06 17:22:49 +08:00
mac d018769558 fix: capture before symbolication and close resident app during upgrades 2026-11-06 17:07:18 +08:00
mac e26a7c68e4 Use FxPlug IOSurface object dimensions and verify deployed diagnostics contract 2026-11-06 16:50:38 +08:00
mac 2b2a98d665 Implement resident app and bounded continuous diagnostics for 1.18.0; offline checks pass 2026-11-06 16:49:15 +08:00
mac ecadafd8c3 Record cloud crash and stall evidence before diagnostics changes 2026-11-06 16:38:05 +08:00
mac ae0a64ec84 Finalize 1.17.1 handoff and recovery references after release 2026-11-06 16:21:50 +08:00
mac 31a4d0cd15 Complete 1.17.1 release download verification, recovery, cleanup and handoff 2026-11-06 16:21:02 +08:00
mac 7c0bfa5352 Prepare signed notarized 1.17.1 package for release 2026-11-06 16:16:08 +08:00
mac 880a321e72 Verify 1.17.1 formal app and inspector acceptance; package pending 2026-11-06 16:13:06 +08:00
mac 3b4c612edf Implement adaptive inspector, mask clock repair, and selectable face mosaic; validation pending 2026-11-06 15:56:42 +08:00
mac f05cf05451 docs: preserve baseline and define adaptive inspector and mosaic repair scope 2026-11-06 15:50:25 +08:00
mac 08d229b55b Record 1.17.0 release download verification recovery cleanup and handoff 2026-11-06 14:44:01 +08:00
共修改 58 个文件,包含 1460 行新增和 318 行删除

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

+4 -2
查看文件
@@ -17,11 +17,13 @@ SOURCE_BACKUP=大鱼调色仓库 Backend/
## 客户端
主 APP 检查更新与插件注册并行,检查结束且注册成功后显示3秒退出倒计时。发现更新则保留窗口;下载可取消,校验 SHA-256、字节数、Installer/App签名团队、Gatekeeper、包内 Bundle ID、版本、安装位置及模板。保存并退出 FCP/Motion 后打开系统安装器,不强杀宿主。下一次启动可记录已完成升级。
主 APP 检查更新与插件注册并行,注册后保持运行,关闭窗口后仍在后台收集诊断;菜单栏可重新打开或明确退出。发现更新会显示提示;下载可取消,校验 SHA-256、字节数、Installer/App签名团队、Gatekeeper、包内 Bundle ID、版本、安装位置及模板。保存并退出 FCP/Motion 后打开系统安装器,不强杀宿主。下一次启动可记录已完成升级。
主 APP 与 XPC 共享随机安装标识及诊断开关。诊断默认开启,界面明确说明并可关闭;不上传素材、LUT、预设、用户路径、账号、硬件 UUID 或原始崩溃文件。后台私有队列最多256条/384KB,批次16条,网络超时并延迟重试,服务端按事件 UUID 去重。关闭后清除待发摘要并停止新请求;已经送达的数据按保留期清理。
采集进程启动、初始化、检查器创建/慢刷新、Metal 管线准备、首次渲染、渲染错误、超过6秒的疑似阻塞,以及本插件近7天系统崩溃报告的脱敏摘要。疑似阻塞不等于根因;整个进程被停止、网络不可用、主机强制断电时无法保证即时送达。不会拦截崩溃信号,也不采集整个 FCP 的报告。本轮保留调色与宿主回调逻辑,尚未修复偶发卡死。
1.18.0(104)起每分钟汇总进程内存/CPU/线程数和渲染、参数读取、跟踪帧耗时;慢于100ms的单次事件最多每阶段30秒一条。超过6秒的疑似阻塞附当前阶段,并限频调用系统 sample 采样本进程1秒(间隔至少120秒,每小时最多6次,8秒超时,失败明确标记);仅提取调用栈,临时原文随即删除。主运行循环使用公共模式脉冲,避免正常菜单/模态循环被主队列探针误报。
主 APP 每分钟扫描本产品 APP 和 XPC 近7天 IPS,补采终止后的待发送队列;不要求用户重启主 APP。崩溃摘要记录故障实际版本/build、终止类别、故障线程的镜像UUID与偏移;排除自检和 ASAN 记录。已送达报告本地去重,云端继续按事件UUID去重。疑似阻塞不等于根因;整个进程被停止、网络不可用、主机强制断电时无法保证即时送达。不会拦截崩溃信号,也不采集整个 FCP 的报告;整个进程完全无法调度时,内部采样无法运行,须依靠系统生成的后续报告。本轮保留调色与宿主回调逻辑,尚未修复偶发卡死。
## 验证与发布
+1 -1
查看文件
@@ -75,7 +75,7 @@ def main():
result=deploy_file(local,NAS/relative,allow_new=True)
manifest=dict(bundle_id='com.dayu.color',channel='beta',version=version,build=build,package_type='pkg',install_mode='pkg_installer',
size=package.stat().st_size,sha256=digest,download_url='https://dayu.media/'+str(relative),minimum_system_version='14.6',
notes='公测版:接入自动更新与可关闭的云端诊断,记录插件加载耗时及错误摘要。请保存并退出 FCP / Motion 后安装。')
notes='公测诊断增强:主 APP 关闭窗口后保持后台运行;自动发送本产品崩溃、卡顿调用栈摘要及阶段耗时,可随时关闭诊断。安装器会提示正常退出 FCP、Motion 和大鱼调色主程序,请先保存工作。')
dest=NAS/UPLOAD/'beta.json';old=json.loads(dest.read_text()) if dest.exists() else None
if old:assert int(old['build'])<=build, '禁止更新通道倒退'
localManifest=LOCAL/UPLOAD/'beta.json';write_json(localManifest,manifest)
+3
查看文件
@@ -38,6 +38,9 @@ try {
$reply=Dayu_Color_Beta::ingest(request($body));
check($reply->status===200 && $reply->data['accepted'] && count($wpdb->rows)===1,'valid event accepted');
Dayu_Color_Beta::ingest(request($body));check(count($wpdb->rows)===1,'retry idempotency');
$newFields=array('source_build'=>'104','process_role'=>'plugin','termination_namespace'=>'DYLD','termination_code'=>1,'memory_mb'=>512,'cpu_percent'=>120,'thread_count'=>32,'resource_kind'=>'cube','pid'=>123,'width'=>3840,'height'=>2160,'sample_status'=>'captured','frames'=>'DYRenderer | image + 32 | UUID');
check(Dayu_Color_Beta::clean_fields($newFields)==$newFields,'new evidence fields survive server normalization');
foreach(array('render','plugin_state','tracking_frame','process_health','performance_summary','hang_sample') as $name){$b=$body;$b['events'][0]['event']=$name;$b['events'][0]['fields']=$newFields;check(Dayu_Color_Beta::ingest(request($b))->status===200,'new event accepted '.$name);}
foreach(array('version'=>array(),'build'=>array(),'event'=>'material_path','session_id'=>'bad','occurred_at'=>null) as $key=>$bad){$b=$body;$b['events'][0][$key]=$bad;check(Dayu_Color_Beta::ingest(request($b))->data['status']===400,'malformed '.$key);}
$b=$body;$b['events']=array_fill(0,33,$event);check(Dayu_Color_Beta::ingest(request($b))->data['status']===400,'batch limit');
$b=$body;$b['padding']=str_repeat('a',100000);check(Dayu_Color_Beta::ingest(request($b))->data['status']===413,'byte limit');
+3 -2
查看文件
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
"""Anonymous public-beta endpoint smoke test; no credentials or production settings."""
import datetime,json,time,urllib.request,urllib.error,uuid
import datetime,json,time,urllib.request,urllib.error,uuid,plistlib
from pathlib import Path
ROOT=Path(__file__).resolve().parent.parent
BASE='https://dayu.media/wp-json/dayu-color/v1/'
@@ -14,7 +14,8 @@ def main():
assert call('update?bundle_id=other&channel=beta')[0]==400
assert call('diagnostics')[0] in (401,403)
event_id=str(uuid.uuid4());installation=str(uuid.uuid4());session=str(uuid.uuid4())
event=dict(event_id=event_id,session_id=session,source='app',version='1.7.0',build=45,event='diagnostic_summary',occurred_at=time.time(),fields={'status':'deployment_smoke_test','count':1})
info=plistlib.loads((ROOT/'大鱼调色/Wrapper Application/Info.plist').read_bytes())
event=dict(event_id=event_id,session_id=session,source='app',version=info['CFBundleShortVersionString'],build=int(info['CFBundleVersion']),event='hang_sample',occurred_at=time.time(),fields={'status':'deployment_smoke_test','phase':'verification','sample_status':'contract_only','count':1})
payload=dict(bundle_id='com.dayu.color',installation_id=installation,events=[event])
for attempt in range(2):
status,reply=call('diagnostics',payload);assert status==200 and reply['accepted'] and reply['event_ids']==[event_id],(status,reply)
@@ -12,10 +12,10 @@ final class Dayu_Color_Beta {
const EVENTS = array('process_start','process_exit','plugin_init','inspector_create','inspector_refresh',
'device_prepare','gpu_pipeline','first_render','render_error','main_thread_stall',
'operation_stall','previous_session_pending','crash_summary','registration','host_confirmed',
'update_check','update_download','update_validation','update_installer','diagnostic_summary');
'render','plugin_state','tracking_frame','process_health','performance_summary','hang_sample','update_check','update_download','update_validation','update_installer','diagnostic_summary');
const FIELDS = array('phase','stage','pipeline','duration_ms','status','error_domain','error_code',
'exception','signal','frames','report_time','count','pending','model','os_version','fcp_version',
'cpu_cores','memory_gb','gpu','main_delay_ms','active_stages','source_version');
'cpu_cores','memory_gb','gpu','main_delay_ms','active_stages','source_version','source_build','process_role','termination_namespace','termination_code','pid','resource_kind','memory_mb','cpu_percent','thread_count','uptime_s','max_duration_ms','average_ms','width','height','layer_count','mask_count','sample_status');
public static function boot() {
add_action('rest_api_init', array(__CLASS__, 'routes'));
@@ -90,7 +90,7 @@ final class Dayu_Color_Beta {
$out = array();
foreach (self::FIELDS as $key) {
if (!array_key_exists($key,$input) || !is_scalar($input[$key])) continue;
if (in_array($key,array('duration_ms','main_delay_ms','memory_gb','cpu_cores','count','pending','error_code'),true)) {
if (in_array($key,array('duration_ms','main_delay_ms','memory_gb','cpu_cores','count','pending','error_code','pid','termination_code','memory_mb','cpu_percent','thread_count','uptime_s','max_duration_ms','average_ms','width','height','layer_count','mask_count'),true)) {
if (is_numeric($input[$key]) && is_finite((float)$input[$key])) $out[$key]=max(-1000000,min(86400000,(float)$input[$key]));
continue;
}
@@ -165,15 +165,17 @@ final class Dayu_Color_Beta {
echo '<h2>公测更新</h2><p>'.($manifest?'当前版本:'.esc_html($manifest['version']).'('.esc_html($manifest['build']).')':'尚未发布更新包').'</p>';
echo '<h2>诊断事件</h2><form method="get"><input type="hidden" name="page" value="dayu-color-beta">';
foreach (array('build'=>'构建号','event'=>'事件','installation'=>'完整报告标识') as $key=>$label) echo '<label>'.esc_html($label).' <input name="'.esc_attr($key).'" value="'.esc_attr($request->get_param($key)).'"></label> ';
echo '<button class="button">筛选</button></form><table class="widefat striped"><thead><tr><th>时间(UTC)</th><th>版本</th><th>报告标识</th><th>来源/事件</th><th>内容</th></tr></thead><tbody>';
echo '<button class="button">筛选</button></form><table class="widefat striped"><thead><tr><th>时间(UTC)</th><th>上传版本 / 故障版本</th><th>报告标识</th><th>来源/事件</th><th>内容</th></tr></thead><tbody>';
foreach ($result['events'] as $row) {
echo '<tr><td>'.esc_html($row['occurred_at']).'<br>送达 '.esc_html($row['received_at']).'</td><td>'.esc_html($row['client_version'].' ('.$row['client_build'].')').'</td><td><code>'.esc_html($row['installation_id']).'</code><br>会话 '.esc_html(substr($row['session_id'],0,8)).'</td><td>'.esc_html($row['source'].' / '.$row['event']).'</td><td><pre style="white-space:pre-wrap;max-width:760px">'.esc_html(wp_json_encode(json_decode($row['fields_json'],true),JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE)).'</pre></td></tr>';
$fields=json_decode($row['fields_json'],true)?:array();
$crashed=$row['event']==='crash_summary' ? '<br>故障:'.esc_html(($fields['source_version']??'未知').' ('.($fields['source_build']??'未采集').')') : '';
echo '<tr><td>'.esc_html($row['occurred_at']).'<br>送达 '.esc_html($row['received_at']).'</td><td>'.esc_html($row['client_version'].' ('.$row['client_build'].')').$crashed.'</td><td><code>'.esc_html($row['installation_id']).'</code><br>会话 '.esc_html(substr($row['session_id'],0,8)).'</td><td>'.esc_html($row['source'].' / '.$row['event']).'</td><td><pre style="white-space:pre-wrap;max-width:760px">'.esc_html(wp_json_encode(json_decode($row['fields_json'],true),JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE)).'</pre></td></tr>';
}
echo '</tbody></table><p>';
$base=array('page'=>'dayu-color-beta','build'=>$request->get_param('build'),'event'=>$request->get_param('event'),'installation'=>$request->get_param('installation'));
if ($result['page']>1) echo '<a class="button" href="'.esc_url(add_query_arg(array_merge($base,array('paged'=>$result['page']-1)),admin_url('tools.php'))).'">上一页</a> ';
if (count($result['events'])===50) echo '<a class="button" href="'.esc_url(add_query_arg(array_merge($base,array('paged'=>$result['page']+1)),admin_url('tools.php'))).'">下一页</a>';
echo '</p><p>仅包含产品版本、环境、阶段耗时、错误代码及本插件崩溃摘要,不接收素材、预设、硬件UUID或账户凭据。</p></div>';
echo '</p><p>仅包含产品版本、环境、阶段耗时、资源使用、错误代码及本产品崩溃/卡顿调用栈摘要,不接收素材、预设、硬件UUID或账户凭据。</p></div>';
}
}
Dayu_Color_Beta::boot();
+14
查看文件
@@ -0,0 +1,14 @@
大鱼调色 1.18.0(105)增强公测故障诊断,主 APP 注册成功及关闭窗口后继续在后台运行,菜单栏可重新打开、发送摘要或退出。
- 崩溃摘要记录故障发生时的实际版本、异常终止类别、镜像 UUID 和地址偏移,排除开发自检报告。
- 卡顿时限频采集本产品调用栈摘要,按分钟汇总渲染、状态构建、检视器刷新和跟踪耗时,以及内存、CPU 和线程数。正常菜单与模态事件循环继续响应探针。
- 沿用可关闭的公测诊断开关及 30 天保留,不上传素材、LUT、预设、账号或原始系统诊断文件。
- 安装器增加常驻主 APP 的正常退出检查,更新后启动正式版本。
云端历史报告中,外部 1.10.0 的通知回调崩溃对应 1.11.0 起已有的修复;历史卡顿与 dyld 报告信息不足,本版本用于补足现场证据,不宣称已解决全部用户闪退或卡顿。
实际编译提交:`d0187695581fa3a8fe5c3cfa8a1bc6337425f5f6`。APP 与 PKG 均使用 Developer ID 签名、Apple 公证及票据验证;系统要求 macOS 14.6+,Apple Silicon。安装前保存工作,按系统提示正常退出宿主和主 APP。
安装包与符号附件的 SHA-256、签名、公证和实际宿主验收范围见本标签下 verification/Package.json、verification/Symbols1.18.0.json 与 verification/Diagnostics1.18.0.json。
安装包:大鱼调色-1.18.0.pkg(46620783 字节),SHA-256:`4a52742a393ecaaa30f758d72c9e0ba68c606ed8e805316d48b9868068378a3f`。
+39 -3
查看文件
@@ -11,6 +11,7 @@ import shutil
import stat
import subprocess
import tempfile
import xml.etree.ElementTree as ET
import sys
ROOT = Path(__file__).resolve().parent.parent
@@ -57,6 +58,37 @@ def check_package_bundle_access(package):
return len(entries)
def prepare_resident_entry(skill, destination):
"""Reuse Forge core; add our resident wrapper to its normal-quit checks."""
runner = skill / "package_fxplug.py"
entry = skill / "PackageFxPlug.swift"
source = entry.read_text()
anchor = " var hosts = ApplicationToClose.presets\n"
assert source.count(anchor) == 1, "PKG 工坊入口变化,须重新核对常驻 APP 退出规则"
replacement = anchor + """ for item in items where item.kind == .fxPlug {
hosts.append(try ApplicationToClose.read(URL(fileURLWithPath: item.sourcePath)))
}
"""
destination.mkdir()
shutil.copy2(runner, destination / runner.name)
(destination / entry.name).write_text(source.replace(anchor, replacement))
return dict(upstreamEntrySHA256=hashlib.sha256(entry.read_bytes()).hexdigest(),
adaptedEntrySHA256=hashlib.sha256((destination / entry.name).read_bytes()).hexdigest(),
requiredApplication="com.dayu.color")
def check_resident_close(package):
with tempfile.TemporaryDirectory(dir=CACHE) as scratch:
expanded = Path(scratch) / "expanded"
run("pkgutil", "--expand", str(package), str(expanded))
distribution = ET.parse(expanded / "Distribution")
identifiers = [x.attrib.get("id") for x in distribution.findall(".//must-close/app")]
assert "com.dayu.color" in identifiers, "安装器必须正常退出常驻主 APP"
preinstalls = list(expanded.glob("*.pkg/Scripts/preinstall"))
assert preinstalls and all("'com.dayu.color'" in p.read_text() for p in preinstalls)
return dict(identifiers=identifiers, preinstallGuardCount=len(preinstalls), normalQuit=True)
def main():
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("--pkg-forge-repo", type=Path,
@@ -112,11 +144,13 @@ def main():
appearance=dict(title="大鱼调色", subtitle="适用于 Final Cut Pro 与 Motion 的原生调色效果",
badgeImage=str(ROOT / "design/dayu-color-app-icon-v1.png"), authorContact="https://dayu.media"),
pages=dict(welcome="安装大鱼调色 " + version + ",包含原生 FxPlug 调色插件和 Final Cut Pro 效果入口。",
readme="系统要求:macOS 14.6 或更高版本。本发行构建适用于 Apple Silicon Mac。\n\n安装内容:\n/Library/Plug-Ins/FxPlug/大鱼调色.app\n登录用户“影片/Motion Templates/Effects/大鱼调色”中的效果模板与预览图。\n\n重新打开 Final Cut Pro 后,在“效果 → 大鱼调色”中应用;Motion 中可选择原生滤镜。\n本安装包不包含用户自选 LUT、预设或媒体文件。\n\n公测诊断默认开启,可在主 APP 关闭。仅发送版本、系统环境、加载耗时与本插件错误摘要到 dayu.media;不发送素材、预设或账号,保留30天。主 APP 启动时检查更新,新版由用户确认安装。",
license="", conclusion="大鱼调色已安装。主 APP 自动注册插件,成功后显示3秒倒计时退出。可点击“打开 FCP 检查”保留窗口,并在宿主中实际检查效果。"))
readme="系统要求:macOS 14.6 或更高版本。本发行构建适用于 Apple Silicon Mac。\n\n安装内容:\n/Library/Plug-Ins/FxPlug/大鱼调色.app\n登录用户“影片/Motion Templates/Effects/大鱼调色”中的效果模板与预览图。\n\n重新打开 Final Cut Pro 后,在“效果 → 大鱼调色”中应用;Motion 中可选择原生滤镜。\n本安装包不包含用户自选 LUT、预设或媒体文件。\n\n公测诊断默认开启,可在主 APP 关闭。仅发送版本、系统环境、阶段耗时、资源使用与本产品崩溃/卡顿调用栈摘要到 dayu.media;不发送素材、预设或账号,保留30天。主 APP 启动时检查更新,新版由用户确认安装。",
license="", conclusion="大鱼调色已安装。主 APP 自动注册插件,成功后保持运行。关闭窗口仍在后台收集已开启的诊断;菜单栏可重新打开或退出。请重开宿主并实际检查效果。"))
manifest_path = CACHE / "dayu-color-package-manifest.json"
manifest_path.write_text(json.dumps(manifest, ensure_ascii=False, indent=2) + "\n")
command = ["/usr/bin/python3", str(skill / "package_fxplug.py"), "--repo", str(forge), "--manifest", str(manifest_path)]
adapter = stage / "forge-entry"
adapter_record = prepare_resident_entry(skill, adapter)
command = ["/usr/bin/python3", str(adapter / "package_fxplug.py"), "--repo", str(forge), "--manifest", str(manifest_path)]
subprocess.run(command + ["--check"], check=True)
if args.prepare_only:
print("清单:" + str(manifest_path))
@@ -127,6 +161,7 @@ def main():
subprocess.run(command, stdout=log, stderr=subprocess.STDOUT, check=True)
package = args.output_dir / ("大鱼调色-" + version + ".pkg")
verified_payload_entries = check_package_bundle_access(package)
resident_close = check_resident_close(package)
report_path = ROOT / "verification/Package.json"
subprocess.run(["/usr/bin/python3", str(skill / "verify_fxplug_package.py"), "--manifest", str(manifest_path),
"--package", str(package), "--report", str(report_path)], check=True)
@@ -138,6 +173,7 @@ def main():
report = json.loads(report_path.read_text())
report.update(notarization=job, appCompiledSource=delivery["sourceCommit"], appBuild=info["CFBundleVersion"],
packageBuilderRemote="https://dayu.media/git/dayu/pkg-forge.git",
residentAppClosing=resident_close, packageEntryAdaptation=adapter_record,
packageBuilderCommit=run("git", "rev-parse", "HEAD", cwd=forge), templateSHA256=hashes,
payloadBundleAccess=dict(entries=verified_payload_entries, scope="Read/traverse modes for installer-owned app entries, from the package BOM"),
installedAppHostAcceptance=delivery.get("hostVerification", "verification/HostLUTLoading.json"),
+23
查看文件
@@ -0,0 +1,23 @@
# 大鱼调色 1.17.1(103)
检查器恢复折叠和内部滚动。新建整合效果默认展开一级调色、基础调整、蜘蛛盘,其他模块保留折叠标题;滚动容量按这组默认内容测量,展开更多模块或追加工具层后在内部滚动。独立效果默认展开自己的根模块。已保存的折叠选择继续读取,颜色设置可展开或收起。
手绘矩形、椭圆和钢笔的保存不再直接比较 FCP 画布回调与检视器 Action 的不同时间起点。草稿保留到保存完成;同一次手势内播放头变化、已有蒙版被外部修改、Esc 取消仍有保护。
马赛克全部人脸模式改用 640 像素长边的人脸框检测,肤色保护仍按其原有算法处理。需要指定人脸时:
1. 开启“全部人脸 · 快速逐帧识别”,暂停在目标画面。
2. 再打开“局部马赛克”,选择“将本帧 N 张人脸转为可选跟踪蒙版”。
3. 在菜单勾选需要遮挡的一个或多个人脸;在控制面板的蒙版页逐个选择,执行正向、反向或双向跟踪。
生成的人脸蒙版在跟踪前是静态区域;跟踪后按各自保存的轨迹运动,不用每帧的人脸序号判断身份。矩形、椭圆及钢笔蒙版也可多选用于马赛克。完整预设和工程保存保留选择及轨迹。
本版本提供代码集成、原生回归及正式安装检查;真实运动片段中的遮挡、交叉、漏检和播放流畅度待用户实测,不宣称已完成这些场景验收。
平台:Apple Silicon,macOS 14.6+,Final Cut Pro / Motion。
正式安装位置:`/Library/Plug-Ins/FxPlug/大鱼调色.app`。
发行验证:实际编译源码 `3b4c612edf99c0ef2b972b7305cd7ba44244a7c6`,版本 1.17.1/构建 103,961 项正式原生检查通过。APP 与 PKG 均由团队 B3W25FX5H5 的 Developer ID 签名,Apple 公证 Accepted、票据及 Gatekeeper 验证通过;PKG 展开结构 20 项与 198 条 APP 载荷权限检查通过。本机正式 APP 已独立安装验收,未再次运行 PKG 的系统安装脚本。
安装包:`大鱼调色-1.17.1.pkg`,46,600,407 字节。
SHA-256:`5c1240d9f262c977495016cd9c19bd55cc0e374fcf9f99128e8cb2231309d710`。
+1 -1
查看文件
@@ -94,7 +94,7 @@ PQ/HLG 输出或跟随 Rec.2020 宿主暂只接受一级与印片;存在活跃
1.7.1 兼容颜色数据行夹带文字的 Cube:保留数值前缀、未读取通道补 0、保持原行位置。用户原文件 65³ 全表与本机 FCP 自定 LUT 读取规则对照通过;正式路径407项原生检查、FCP导入/缩略图/应用/冷重开通过,原始字节保留。见[兼容依据](research/LUTNotes1.7.1.md)、[宿主验证](verification/HostLUTNotes1.7.1.json)和[1.7.1安装包 Release](https://dayu.media/git/dayu/dayu-color/releases/tag/v1.7.1-lut-notes-20261102)。网站公测更新清单仍为原1.7.0,本轮未改动后端。
主 APP 保留深色介绍、置顶发布地址、自动注册和3秒退出倒计时;加入启动自动检查公测更新和可关闭的云端诊断。更新使用完整 PKG,由用户确认下载并通过完整性、签名与产品校验后打开系统安装器;安装前要求保存并退出 FCP/Motion。诊断记录版本、环境、启动/界面/管线/首次渲染耗时及错误摘要,后台限量重试、云端去重并保留30天,不发送素材、LUT、预设、账号或硬件 UUID。暂未加入登录、授权及业务加密模块。
主 APP 保留深色介绍、置顶发布地址和自动注册;1.18.0 起保持后台运行,关闭窗口不退出,菜单栏可重新打开或退出;加入启动自动检查公测更新和可关闭的云端诊断。更新使用完整 PKG,由用户确认下载并通过完整性、签名与产品校验后打开系统安装器;安装前要求保存并退出 FCP/Motion。诊断记录版本、环境、启动/界面/管线/首次渲染耗时及错误摘要,后台限量重试、云端去重并保留30天,不发送素材、LUT、预设、账号或硬件 UUID。暂未加入登录、授权及业务加密模块。
[1.7.0站点公测安装包](https://dayu.media/wp-content/uploads/dayu-color-beta/updates/dayu-color-1-7-0-45.pkg)、[1.7.0 Release](https://dayu.media/git/dayu/dayu-color/releases/tag/v1.7.0-beta-20261102)、[日志管理页](https://dayu.media/wp-admin/tools.php?page=dayu-color-beta)(管理员)。反馈可附主 APP 的报告标识与发生时间。详见[公测前后端与隐私/恢复说明](Backend/README.md)、[1.7.0发行说明](Packaging/Release-1.7.0.md)和[正式宿主/日志验证](verification/BetaClientQA.json)。本轮保留既有调色与宿主回调逻辑,收集偶发卡死证据,尚未宣称解决该问题。
+23 -5
查看文件
@@ -1,12 +1,30 @@
# 2026-11-06:1.17.0 未交付开发检查点
# 2026-11-06 折叠检视器与指定人脸 1.17.1(103)
正式安装和 Release 仍为 1.16.0(97)。本轮候选 98—101 已正式签名公证后在固定位置验收,检查器动态高度未通过,已回滚并清理候选。**不要把当前源码直接打包发布**:`DYPlugIn.mm` 的实验高度重建须替换,等待用户确定检查器重构或独立面板路线。
远程 `https://dayu.media/git/dayu/dayu-color.git`,分支 `main`。实际编译源码 **`3b4c612edf99c0ef2b972b7305cd7ba44244a7c6`**。独立远端检出核对全部 714 个跟踪文件与 Git blob,`git fsck --full --strict` 通过,无 LFS 指针/子模块。发行标签 **`v1.17.1-inspector-mosaic-20261106`** 指向 **`7c0bfa5352f282bcec0aedf43be29af4432f2ba8`**,独立检出核对 718 个文件;差异仅为交付记录与模板模型来源哈希,编译输入一致。[恢复核验](verification/Recovery1.17.1.json)
恢复候选 101 实际源码:从 `https://dayu.media/git/dayu/dayu-color.git` 克隆,检出 `2c2af3695b6dbe661db7adf544a60c58766a4e73`;完整已知验收/回滚文档节点为 `ea9884d266cc1326826ff5853cff49a2c4573075`,后续 main 保存本段恢复和清理报告。两节点分别 704、707 个跟踪文件已从远端独立检出并逐个核对 Git blob,无 LFS 指针或子模块;Git 完整性通过。未重复冷构建全部第三方依赖。见 [检查点恢复核验](verification/Recovery1.17.0-checkpoint.json)。
构建环境:Xcode 27.1、FxPlug SDK 4.3.5、Apple Silicon、macOS 14.6+、Release;ThirdParty 的依赖源包/锁和 `tools/build_tracking_opencv.py` 沿用。克隆后 `git switch --detach <完整提交>`,使用 `tools/deliver.py` 完成正式构建、签名、公证、安装与原生检查;保持交互输入,在宿主验证后输入 complete。主 ID `com.dayu.color`、服务 `com.dayu.color.XPC`,团队 B3W25FX5H5。证书私钥、公证 profile 与 Git 登录须独立恢复,源码仓库不含秘密。
已完成的源码与宿主覆盖:16 个缩略图;显式 V4 全链路输出默认末层、移动与撤销;逐帧人脸/共享蒙版马赛克。950 项候选原生自检和 FCP 人像实测不等于动态高度合格,详见 [开发交接](开发交接.md) 和 [候选宿主报告](verification/HostUnified1.17.0-candidate101.json)。当前 `Delivery.json`、`InstalledSelfTest.json` 已恢复为正式 97;候选报告单独保留。
APP 公证 **`36ecb7e6-5cfc-4b85-8363-11272d880b18`** Accepted,票据和 Gatekeeper 通过。唯一正式路径 `/Library/Plug-Ins/FxPlug/大鱼调色.app` 为 1.17.1(103),961 项正式原生检查通过;FCP 12.4 已确认默认三组、折叠标题、展开后内部滚动、收起后移除滚动以及当前帧转人脸蒙版入口。外层行高仍受 FCP 缓存限制,内部视窗收缩不代表宿主外框缩短。实鼠松手保存、真实多人运动/遮挡/交叉与播放性能由用户后续复测。[宿主检查](verification/HostInspectorMosaic1.17.1.json) · [专项回归](verification/InspectorMosaic1.17.1.json)
构建环境沿用 Xcode 27.1、FxPlug 4.3.5、Apple Silicon、Release,Developer ID 团队 B3W25FX5H5,正式路径 `/Library/Plug-Ins/FxPlug/大鱼调色.app`。钥匙串、签名私钥和公证认证需独立恢复,Git 不含密钥。保留任务的 QA 素材库和 REA 证据 JSON;本轮远端恢复临时 clone 与 Apple 二进制分析副本已清理,见 [清理记录](verification/Cleanup1.17.0-checkpoint.json)。没有 1.17.0 安装包/版本标签/Release 附件,本轮没有修改站点文章和更新通道。
使用 `Packaging/build_pkg.py` 从已签名公证且正式安装验收的 APP 打包,随后 `Packaging/publish_release.py` 发布已验证标签的安装包。正式包 `/Volumes/备份/大鱼调色/发行包/大鱼调色-1.17.1.pkg`,46,600,407 字节,SHA-256 `5c1240d9f262c977495016cd9c19bd55cc0e374fcf9f99128e8cb2231309d710`;PKG 公证 `8e122236-9ca6-4d92-ad6a-b9c2411280e7` Accepted,票据、Gatekeeper、20 项展开与 198 条载荷权限检查通过。本机没有重复运行系统 PKG 安装脚本。Release **400**/附件 **44** 已按公测标记发布,草稿与正式下载均完整核对大小与 SHA-256。[发行页](https://dayu.media/git/dayu/dayu-color/releases/tag/v1.17.1-inspector-mosaic-20261106) · [发布核验](verification/Release.json)。本轮恢复 clone、下载副本、构建 APP、公证 ZIP、旧替换备份和包暂存已核验后清理。[清理记录](verification/Cleanup1.17.1.json) · [开发交接](开发交接.md)
---
# 2026-11-06 全链路输出、马赛克与全展开检查器 1.17.0(102)
远程 `https://dayu.media/git/dayu/dayu-color.git`,分支 `main`。实际编译源码 **`03a1e2452ec665fe6574b07d1899988fd6852cf1`**;发行标签 **`v1.17.0-unified-mosaic-20261106`** 指向 **`a458bbeb5397153a458706b0bfbb4e8692108a65`**。克隆后按所需节点 `git switch --detach <完整提交>`。独立远端恢复核对编译节点 709 个、发行标签 711 个文件的 Git blob 和完整性;两者间差异仅为交付记录与说明,编译输入一致。没有 LFS 指针或子模块,未重复第三方依赖冷构建。[恢复核验](verification/Recovery1.17.0.json)
构建环境:Xcode 27.1、FxPlug SDK 4.3.5、Apple Silicon、macOS 14.6+、Release;沿用 ThirdParty 中的依赖源包/锁和 `tools/build_tracking_opencv.py`。用 `tools/deliver.py` 执行正式构建、签名、公证、固定位置安装及原生检查;保持交互输入,只有 FCP 实测通过后输入 complete。团队 B3W25FX5H5,唯一路径 `/Library/Plug-Ins/FxPlug/大鱼调色.app`,主 Bundle ID `com.dayu.color`,服务 `com.dayu.color.XPC`。证书私钥和公证登录需独立恢复,Git 不含密钥。
APP 公证 `6143097e-7a1b-4e95-9388-434e82acf3bc` Accepted;票据、Gatekeeper、唯一 PluginKit 路径与 951 项正式原生检查通过。用户选择“全部模块展开,然后计算所需高度”,102 移除失败的动态重建方案,在返回自定义视图前测量全部展开内容。FCP 12.4 顶底、追加一层、旧独立 HSL、输出移动/撤销、人脸及矩形马赛克、冷重开通过。初始容量仍受宿主缓存约束,不承诺无限动态加层;OSC 自动鼠标和运动视频实窗跟踪仍未完成复核。[宿主报告](verification/HostUnified1.17.0.json)
通过 `Packaging/build_pkg.py` 从已验收正式 APP 打包;PKG 公证 `a9bba972-0743-469f-9869-13f94e1a1a83` Accepted、票据、20 项展开检查和 198 条载荷权限检查通过。本机未重复执行 PKG 安装脚本。正式包 `/Volumes/备份/大鱼调色/发行包/大鱼调色-1.17.0.pkg`,**46,594,729 字节**,SHA-256 **`f372ee6a421f833c4619dcc4891ae66f90b56f40b431ee75529806bec762157e`**。[安装包记录](verification/Package.json)
Release **399**/附件 **43** 已按原有公测标记发布,草稿下载和发布后完整下载均核对大小与哈希;没有更改仓库可见性。模板和独立功能缩略图一同打包;V4 仍需在颜色设置显式选择,默认输出末层;已有 nil/V2/V3 工程不自动迁移。[发行页](https://dayu.media/git/dayu/dayu-color/releases/tag/v1.17.0-unified-mosaic-20261106) · [下载安装包](https://dayu.media/git/dayu/dayu-color/releases/download/v1.17.0-unified-mosaic-20261106/%E5%A4%A7%E9%B1%BC%E8%B0%83%E8%89%B2-1.17.0.pkg) · [发布回读](verification/Release.json)
本轮构建 APP、公证 ZIP、旧替换备份、包暂存、远端恢复 clone 和草稿下载副本已核验后清理;保留 QA 素材库、研究证据 JSON、正式发行包及用户历史包。[清理](verification/Cleanup1.17.0.json)。站点文章与主 APP 更新通道本轮未更新,最后状态见 [开发交接](开发交接.md)。
候选 98—101 的拒收历史仍可恢复:101 实际编译 `2c2af3695b6dbe661db7adf544a60c58766a4e73`,当时验收/回滚节点 `ea9884d266cc1326826ff5853cff49a2c4573075`,分别 704/707 个文件远端检出核对。[旧检查点报告](verification/Recovery1.17.0-checkpoint.json)。它们不是当前交付节点,不要再次发布失败的动态高度实验。
---
+34
查看文件
@@ -0,0 +1,34 @@
# 云端闪退与卡顿调查 · 2026-11-06
基线:main `ae0a64ec843fd450329083cb703890d8b2684007`,正式安装 1.17.1(103)。生产 MU 插件、专项副本及仓库副本 SHA-256 均为 `d2b73816e871765bc2f7d1604a1beda98b99e2d9ac4f62039de7bf3a81107593`。现有 project.pbxproj 三处 Security 引用排序为前序未提交内容,不纳入本任务。
## 云端证据
通过已登录的管理员页面 `https://dayu.media/wp-admin/tools.php?page=dayu-color-beta` 只读筛选,2026-11-06 16:34–16:37(北京时间)看到近七天 85 个匿名报告标识。它们不是实名用户数;包含本机开发与验收。原始报告和安装标识不复制到源码。
- `crash_summary` 共 43 条(筛选结果不足一页,无下一页):39 条 source_version=1.10.0,1 条 1.13.3,2 条 1.7.4,1 条 1.8.0。上传客户端常为 1.14.3/1.14.4,不能据此称为新版崩溃。
- 1.10.0 的外部记录集中在 `DYRenderer renderLegacy:...` 的异步 block 和 `NSNotificationCenter postNotificationName:object:userInfo:`,异常 EXC_BAD_ACCESS/SIGSEGV。既有提交 `1c3e294ce991b0205969486c330dba57714aeacc` 已将 C++ lambda 内异步通知移入 Objective-C 方法,修复对象生命周期;1.11.0 起包含该修复。样本支持同一历史故障特征,不证明最新版本仍有该故障或所有反馈均解决。
- 7 条可关联本机开发标识,含 `DYRunDiagnostics`、ASAN 及早期原生回归;需与外部故障分开。外部共有 36 条:34 条来自 1.10.0,2 条来自 1.7.4。
- 1.7.4 两条为 dyld 启动终止,旧采集未保存 termination 原因和镜像偏移,无法判定缺库、兼容性还是安装问题。
- `main_thread_stall` 最近 50 条包含外部 1.14.4 的约 6–30 秒和 1.12.0 的约 6–36 秒无响应;全部 active_stages 为空。本机 1.17.1 的连续 6–357 秒记录也混在其中,可能包括菜单/模态循环导致的主队列探针延迟,不能当作真实死锁结论。本次未做全量卡顿数量统计。
- `operation_stall` 筛选为空。`render_error` 存在同一外部标识反复上报 NSCocoaErrorDomain/260(文件不存在),涉及 1.10.0 和 1.14.4;未带资源类别,无法从摘要判断是 LUT、内置资源还是其他文件。保留用户路径隐私,后续只增加阶段和文件扩展名等限定信息。
## 本轮实施范围
取消主 APP 注册后倒计时退出,关闭窗口后保留后台运行,提供重新打开与明确退出入口。补充持续扫描自身 APP/插件系统报告、崩溃实际版本与 build、异常终止类别、镜像 UUID/偏移;卡顿使用公共运行循环探针、限频调用栈摘要与资源统计;渲染与跟踪持续阶段、慢操作摘要,避免每帧磁盘和网络发送。现有诊断开关及 30 天保留不变,不上传素材、LUT、预设、账号和原始诊断文件。
正式路径采集验收见下方;发行状态见开发交接及版本记录。卡顿具体根因和 dyld 历史报告仍待新版本现场数据。
数据结构依据:[Apple IPS JSON 说明](https://developer.apple.com/documentation/xcode/interpreting-the-json-format-of-a-crash-report);运行循环依据:[CFRunLoop](https://developer.apple.com/documentation/corefoundation/cfrunloop)。
## 正式路径候选 104 的验收修正
FCP 12.4 加载、播放和阶段汇总上报通过。受控主线程暂停 12 秒时,采样以 timeout_or_disabled 送达,因此候选未发布。移除 sample 的 -mayDie(避免采样前预读符号),后台符号处理上限改为 30 秒;采集本身仍为 1 秒/10 ms 间隔,保留限频、关闭诊断取消及临时文件清理。后续以 105 正式路径再次验证实际调用栈。
## 105 实际运行结果
75 项离线诊断检查、27 项后端合同检查与正式安装的 961 项原生回归通过。受控 12 秒主 APP 卡顿在 17:17:01(本地)生成 captured 调用栈,17:17:02 云端送达,明确包含 AppDelegate runDiagnosticsProbe → NSThread sleepForTimeInterval → nanosleep,标记 verification。关闭诊断超过一分钟且宿主启动/播放时没有新增上报,待发送队列清零;重新开启后两进程恢复上报。关窗后同一普通 APP 进程跨两轮分钟统计持续送达。
FCP 12.4 显示 1.18.0,当前 11.4 秒片段可播放到末尾,无新增宿主崩溃记录。但 3840×2160 输入在该轮 28 次渲染的平均调用耗时 601.4 ms、最大 1716.8 ms;41 次 plugin_state 平均 4.31 ms、最大 8.68 ms。证据将该样本主要耗时指向渲染而非状态构建;尚不能从聚合值确定渲染内部算法,也不能直接当作播放 FPS。保留这一待优化项,不宣称卡顿已解决。
用户刚才疑似闪退已与本轮正常退出操作及系统退出码 0 对齐,并经用户确认。10:30 的历史 FCP ProOSC 中止另行记录;没有证据将其归因于本轮诊断。详见 verification/LocalHostExit1.18.0.json。
+24
查看文件
@@ -0,0 +1,24 @@
# 1.17.1 检视器与马赛克
2026-11-06。基线 08d229b55b6e13e8d2086b03c4582322a2d6bd30(1.17.0 / 102)。工作区已有 project.pbxproj 的 Security 引用排序,不属于本任务;原差异保存在固定构建缓存的 task-1.17.1/preexisting.patch。
本轮用户要求:整合检查器恢复折叠与内部自适应滚动,初始化只展开一级调色、基础调整、蜘蛛盘,其余模块保留折叠标题;默认内容完整容纳,展开或追加后才滚动。修复手绘蒙版松手复位;降低人脸马赛克开销,并接入多人脸指定,实拍由用户继续验证。
实现约束:沿用 AppKit / FxPlug 原生检查器,不恢复失败的宿主参数删除重建路线。初始滚动上限从三个展开模块和其余折叠标题测量,独立效果按自己的根模块测量。折叠不改启用或调色值。完整文档保存蒙版与选择,指定人脸使用稳定蒙版 ID 和既有跟踪轨迹,不依赖逐帧人脸数组排序。
验证计划:已有原生自检补充不同 OSC/Action 时钟、松手保存、冲突/取消、默认无内部滚动、展开/追加滚动、多人脸选区与保存回读。仅从正式签名公证安装运行用户可见界面;最终实拍识别、遮挡、交叉和性能由用户复测。
## 实现与原生验证
- `DYInspector.mm` 按 280 pt 最窄宽度测量默认三组及全部折叠标题,上限 3501 pt;宽度变化、折叠、展开和追加均在内部 ScrollView 布局,默认文档可完整容纳。FCP 外层检查器仍自行滚动,并保留初次分配的行高;不宣称宿主本身可动态缩短,内部视窗可以收缩。
- `DYToolCanvasEditing.inc.h` 异步记录手势开始时的 Action 时钟;提交比较同一 Action 时钟是否移动,蒙版几何/轨迹键继续使用 OSC 时间,非动画文档通过当前 Action 读写。重绘时间不同不再丢弃草稿,实际输入事件换帧、Esc、外部冲突仍拒绝覆盖。
- `DYMosaicRender.inc.h` 使用独立 640 长边 Vision 人脸框检测及同像素缓存,不调用肤色保护的特征点分析。该选择不关闭用户已有的肤色保护;启用肤色保护时仍有其自身计算成本。[Apple API](https://developer.apple.com/documentation/vision/vndetectfacerectanglesrequest)
- `DYViewerParameterBridge.inc.h` 支持当前帧多人脸一次转成独立共享蒙版,多选使用稳定 ID。每个人脸先生成静态框,用户在控制面板逐个运行现有 OpenCV 跟踪。无身份识别或全片自动人脸身份归并;重叠、遮挡和交叉仍需实拍检查。
- 961 项原生 Release 预检通过。新增双时钟手绘保存/回读、默认无滚动、展开/追加滚动、多人脸导入一次撤销、单人选择区域外像素完全一致和完整文档回读检查。两个人脸来自公共 NASA 人像的并排合成,不能替代两名不同人物的运动视频测试。
- 16 个独立效果及整合模板静态检查通过;仅刷新模型来源哈希,模板文件与上一版一致。独立远端恢复编译提交 714 个文件逐一校验,无 LFS 指针/子模块。
## 正式交付
1.17.1(103)APP 公证 `36ecb7e6-5cfc-4b85-8363-11272d880b18` Accepted,正式路径 961 项检查通过;FCP 12.4 冷加载、默认三组、展开内部滚动、折叠复位及本帧人脸转换菜单已验证。实鼠手绘和运动多人由用户继续测试。
PKG 公证 `8e122236-9ca6-4d92-ad6a-b9c2411280e7` Accepted,20 项展开检查与 198 条载荷权限检查通过。发行标签 `v1.17.1-inspector-mosaic-20261106` 指向 `7c0bfa5352f282bcec0aedf43be29af4432f2ba8`,Release 400/附件 44 的草稿及正式完整下载验证一致,保留产品公测标记。编译节点 714 文件与发行标签 718 文件独立远端恢复通过。详细证据见 `verification/HostInspectorMosaic1.17.1.json`、`Recovery1.17.1.json`、`Release.json`、`Cleanup1.17.1.json`。
+1 -1
查看文件
@@ -3721,7 +3721,7 @@
"大鱼调色/Plugin/DYModel.mm": "e5bdf3177e164c0b97e535be7e6d14ea56d49f3f74c3622078374e7a9597d2c1",
"大鱼调色/Plugin/DYSpiderState.h": "0c80747e41e8fc97762e301b011bd08c18865a825eaafde086ed79ace37b22f9",
"大鱼调色/Plugin/DYToolState.h": "96eff1bd54be127e527595da7cbf38e58f4dfd4a16c9491d8630f7b1d1045c84",
"大鱼调色/Plugin/DYToolState.mm": "cb51ebe02f836434b3dda43999625cc82cee7726574e19e7273f1644c68554f0",
"大鱼调色/Plugin/DYToolState.mm": "a0bf1a613e280a56ade97303e87f376878e459debd68f72adc0895d6bf67ad61",
"大鱼调色/Plugin/DYUniforms.h": "4901446fa6b2a6987a6a137baa458df70f5e25a1e64fdb5c502f765b20edc0c0",
"大鱼调色/Plugin/MaskCore/DYMask.h": "5b9aa44390d4a1fca1baf5e34cb9eefc8483c939a65cc2a0412b7b41fc85bc16",
"大鱼调色/Plugin/MaskCore/DYMaskOperator.h": "43fa701ad574f38ce0ab4f4d3900bb034edaaa1adc09821d2f4443ee2b687ba2",
+24
查看文件
@@ -32,6 +32,30 @@ int main(int argc,char **argv){@autoreleasepool{
NSDictionary *safe=DYBetaSafeFields(@{@"phase":@"end",@"frames":@"/Users/test/secret.mov",@"error_domain":@"token=secret",@"email":@"private@example.invalid",@"duration_ms":@(NAN)});
check([safe[@"frames"]isEqual:@"[REDACTED]"]&&[safe[@"error_domain"]isEqual:@"[REDACTED]"]&&!safe[@"email"]&&!safe[@"duration_ms"],@"privacy allowlist and redaction");
check(DYBetaSafeFields((id)@[]).count==0,@"bad fields do not crash");
NSDictionary *header=@{@"bundleID":@"com.dayu.color.XPC",@"app_version":@"1.10.0",@"build_version":@"72",@"timestamp":@"2026-11-05 10:00:00 +0800"};
NSDictionary *body=@{@"faultingThread":@0,@"pid":@123,@"exception":@{@"type":@"EXC_BAD_ACCESS",@"signal":@"SIGSEGV"},
@"termination":@{@"namespace":@"DYLD",@"code":@1,@"details":@[@"Library not loaded: /Users/private/movie.mov"]},
@"usedImages":@[@{@"name":@"大鱼调色 XPC Service",@"uuid":@"12345678-1234-4234-8234-123456789012",@"path":@"/Users/private/test.app"}],
@"threads":@[@{@"frames":@[@{@"imageIndex":@0,@"imageOffset":@456},@{@"symbol":@"DYRenderer",@"imageIndex":@0,@"imageOffset":@789}]}]};
NSDictionary *evidence=DYBetaCrashEvidence(header,body);
check([evidence[@"source_version"]isEqual:@"1.10.0"]&&[evidence[@"source_build"]isEqual:@"72"],@"crashed version independent from uploader");
check([evidence[@"frames"]containsString:@"456"]&&[evidence[@"frames"]containsString:@"12345678-1234-4234-8234-123456789012"],@"unsymbolicated frames preserve UUID and offset");
check([evidence[@"status"]isEqual:@"library_missing"]&&![[evidence description]containsString:@"private"],@"dyld classification without user paths");
check(DYBetaCrashEvidence(@{@"bundleID":@"com.apple.FinalCut"},body)==nil,@"no collection from unrelated host");
NSMutableDictionary *dev=[[body mutableCopy]autorelease];dev[@"threads"]=@[@{@"frames":@[@{@"symbol":@"DYRunDiagnostics"}]}];
check(DYBetaCrashEvidence(header,dev)==nil,@"development crashes excluded");
dev[@"threads"]=@[@{@"frames":@[@{@"symbol":@"__asan_report_load8"}]}];check(DYBetaCrashEvidence(header,dev)==nil,@"sanitizer crashes excluded");
check(DYBetaCrashEvidence((id)@[],(id)@[])==nil,@"malformed report safely rejected");
NSString *sample=@"Path: /Users/private/sample.app\nCall graph:\n 10 Thread_1 DispatchQueue_1: com.apple.main-thread\n + 10 _dispatch_semaphore_wait_slow (in libdispatch.dylib) + 4 [0x1234]\n + 10 private (in /Users/private/secret)\n 10 Thread_2\n + 10 DYRenderer (in 大鱼调色 XPC Service) + 32 [0x1234]\nBinary Images:\n/Users/private/media.mov";
NSString *sampleFrames=DYBetaSampleFrames(sample);
check([sampleFrames containsString:@"_dispatch_semaphore_wait_slow"]&&[sampleFrames containsString:@"DYRenderer"]&&![sampleFrames containsString:@"private"],@"sample extracts call graph only");
check(DYBetaSampleFrames(@"sampling denied").length==0,@"unavailable sampling stays explicit");
NSError *missing=[NSError errorWithDomain:NSCocoaErrorDomain code:260 userInfo:@{NSFilePathErrorKey:@"/Users/private/look.cube"}];
NSDictionary *errorFields=DYBetaErrorFields(missing,@"render_source");
check([errorFields[@"resource_kind"]isEqual:@"cube"]&&![[errorFields description]containsString:@"private"],@"missing LUT classified without filename");
double started=NSProcessInfo.processInfo.systemUptime;
for(int i=0;i<10000;i++)DYBetaSpanEnd(DYBetaSpanBegin(@"render",nil),nil);
check(NSProcessInfo.processInfo.systemUptime-started<1,@"disabled test process avoids per-frame work and transport");
if(argc==3){NSData *data=[NSData dataWithContentsOfFile:[NSString stringWithUTF8String:argv[2]]];NSDictionary *real=[NSJSONSerialization JSONObjectWithData:data options:0 error:nil];NSError *error=nil;
BOOL verified=[DYBetaUpdater validatePackage:[NSURL fileURLWithPath:[NSString stringWithUTF8String:argv[1]]] manifest:real error:&error];
if(!verified)fprintf(stderr,"%s\n",error.localizedDescription.UTF8String);check(verified,@"signed notarized full product package");
+5 -5
查看文件
@@ -1,10 +1,10 @@
{
"path": "/Volumes/dayumedia (存储空间1)/wwwroot/dayu_media/wp-content/mu-plugins/dayu-color-beta.php",
"sha256": "d2b73816e871765bc2f7d1604a1beda98b99e2d9ac4f62039de7bf3a81107593",
"backup": "/Volumes/dayumedia (存储空间1)/wwwroot/dayu_media/wp-content/mu-plugins/dayu-color-beta-202611021738.phpbak",
"size": 14220,
"timestamp": "202611021738",
"sha256": "08c15754c07c09984f3ecc00cac802bcab2ef7dc1bf0bf6f4600af7e7294b8eb",
"backup": "/Volumes/dayumedia (存储空间1)/wwwroot/dayu_media/wp-content/mu-plugins/dayu-color-beta-202611061649.phpbak",
"size": 15008,
"timestamp": "202611061649",
"mount": "//dayu@192.168.31.21/dayumedia%20%28%E5%AD%98%E5%82%A8%E7%A9%BA%E9%97%B41%29 on /Volumes/dayumedia (存储空间1) (smbfs, nodev, nosuid, mounted by mac)",
"localProject": "/Users/mac/Downloads/dayumedia/dayu-color-beta",
"sourceCommit": "e37330a4b5a1ad8c10a05fbc6cd3c37be87dc530"
"sourceCommit": "2b2a98d6658f7dc09f0b2c91a3c7bef9f7682a4f"
}
+10 -10
查看文件
@@ -1,6 +1,6 @@
{
"passed": true,
"checked_at": "2026-11-02T09:40:25.115993+00:00",
"checked_at": "2026-11-06T08:49:49.654581+00:00",
"checks": [
"update GET",
"product isolation",
@@ -9,21 +9,21 @@
"retry same UUID ACK",
"foreign upload denied"
],
"test_event_id": "fe84a41b-84a4-41f8-ba22-afd62655506e",
"test_installation_id": "c1f91498-dda9-4219-bb86-decaba573e18",
"test_event_id": "58c48897-fb01-4ad5-923e-b118d13d561b",
"test_installation_id": "9f2ba0ca-abca-4a8d-b229-c01312f35aa0",
"update": {
"bundle_id": "com.dayu.color",
"channel": "beta",
"version": "1.7.0",
"build": 45,
"version": "1.12.0",
"build": 79,
"package_type": "pkg",
"install_mode": "pkg_installer",
"size": 40898751,
"sha256": "a3578ee95aa7333e64d556061173fb73a42be0e45442ae844c94147b421d34bb",
"download_url": "https://dayu.media/wp-content/uploads/dayu-color-beta/updates/dayu-color-1-7-0-45.pkg",
"size": 45329742,
"sha256": "d4b557fec283f5e06f605bc6b1d99a0c8649f9d65e405eba452f525e8454cdfe",
"download_url": "https://dayu.media/wp-content/uploads/dayu-color-beta/updates/dayu-color-1-12-0-79.pkg",
"minimum_system_version": "14.6",
"notes": "公测版:接入自动更新与可关闭的云端诊断,记录插件加载耗时及错误摘要。请保存并退出 FCP / Motion 后安装。",
"notes": "1.12.0 公测版加入统一调色工作区、共享蒙版、最近使用 LUT 和四宫格示波器。画布工具移至左下角,改善检视器重开与片尾示波器加载。请保存项目并退出 Final Cut Pro 和 Motion 后安装。",
"update_available": true,
"checked_at": "2026-11-02T09:40:23+00:00"
"checked_at": "2026-11-06T08:49:47+00:00"
}
}
+10 -10
查看文件
@@ -1,12 +1,12 @@
{
"status": "published-after-verified-draft-download",
"releaseID": 392,
"releaseURL": "https://dayu.media/git/dayu/dayu-color/releases/tag/v1.13.1-pixel-clone-20261105",
"tag": "v1.13.1-pixel-clone-20261105",
"commit": "46153a26edfbf44c5f22fbad5953ec74c0d33883",
"assetID": 36,
"downloadURL": "https://dayu.media/git/attachments/ee0a09fc-58b0-4883-9923-d5eb8aced007",
"bytes": 45352349,
"sha256": "8a19afadda6317d186541f37a221c46261a22ddabcdddec90d02e1315b693965",
"finalDownloadURL": "https://dayu.media/git/dayu/dayu-color/releases/download/v1.13.1-pixel-clone-20261105/%E5%A4%A7%E9%B1%BC%E8%B0%83%E8%89%B2-1.13.1.pkg"
"status": "published-after-verified-download",
"releaseID": 399,
"releaseURL": "https://dayu.media/git/dayu/dayu-color/releases/tag/v1.17.0-unified-mosaic-20261106",
"tag": "v1.17.0-unified-mosaic-20261106",
"commit": "a458bbeb5397153a458706b0bfbb4e8692108a65",
"assetID": 43,
"downloadURL": "https://dayu.media/git/dayu/dayu-color/releases/download/v1.17.0-unified-mosaic-20261106/%E5%A4%A7%E9%B1%BC%E8%B0%83%E8%89%B2-1.17.0.pkg",
"bytes": 46594729,
"sha256": "f372ee6a421f833c4619dcc4891ae66f90b56f40b431ee75529806bec762157e",
"publishedReport": "verification/Release.json"
}
+34
查看文件
@@ -0,0 +1,34 @@
{
"version": "1.17.0",
"build": "102",
"formalApp": "/Library/Plug-Ins/FxPlug/大鱼调色.app",
"keptInstaller": "/Volumes/备份/大鱼调色/发行包/大鱼调色-1.17.0.pkg",
"removed": [
"/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/recovery-1.17.0-final-fej13yjq",
"/Volumes/备份/大鱼调色-1.17.0.pkg",
"/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/DerivedData/Build/Products/Release/大鱼调色.app",
"/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/DerivedData/Build/Products/Release/大鱼调色 XPC Service.pluginkit",
"/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/notarization-submission.zip",
"/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/pkg-inputs-jrnzspg4"
],
"replacementBackup": "Removed by successful delivery completion; no com.dayu.color previous app remains beside formal install.",
"auditScope": [
"/Users/mac/Library/Caches/CodexBuilds/com.dayu.color",
"/Volumes/备份/大鱼调色",
"/Applications/大鱼调色.app",
"/Users/mac/Library/Plug-Ins/FxPlug/大鱼调色.app",
"/Library/Plug-Ins/FxPlug"
],
"extraLooseProductAppsInAuditedTaskRoots": [],
"pluginKitEntries": 1,
"retained": [
"Formal app and package",
"User historical packages",
"Source and recovery checkpoints",
"QA library and media",
"REA evidence JSON",
"Pre-existing pkg-inputs cache",
"Other products including primary color and color panel"
],
"limits": "Only task roots and known installation paths audited; no whole-disk uniqueness claim. No other product files removed."
}
+29
查看文件
@@ -0,0 +1,29 @@
{
"pass": true,
"date": "2026-11-06",
"version": "1.17.1",
"build": "103",
"removed": [
"/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/task-1.17.1/recovery",
"/Volumes/备份/大鱼调色-1.17.1.pkg"
],
"generatedAlreadyRemoved": [
"/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/DerivedData/Build/Products/Release/大鱼调色.app",
"/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/DerivedData/Build/Products/Release/大鱼调色 XPC Service.pluginkit",
"/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/notarization-submission.zip"
],
"oldReplacementBackups": "absent",
"packageInputStaging": "absent",
"formalApp": "/Library/Plug-Ins/FxPlug/大鱼调色.app",
"knownTopLevelProductApps": [
"/Library/Plug-Ins/FxPlug/大鱼调色.app"
],
"preserved": [
"Current signed 1.17.1 release package",
"User historical packages",
"QA media and FCP library",
"Preexisting project.pbxproj diff",
"Task diagnostics and baseline patch"
],
"scope": "Known product installation/build paths and task-created recovery/download copies; not a whole-machine scan"
}
+5 -5
查看文件
@@ -2,13 +2,13 @@
"status": "verified",
"path": "/Library/Plug-Ins/FxPlug/大鱼调色.app",
"bundleID": "com.dayu.color",
"version": "1.17.0",
"build": "102",
"version": "1.18.0",
"build": "105",
"team": "B3W25FX5H5",
"notaryID": "6143097e-7a1b-4e95-9388-434e82acf3bc",
"notaryID": "5a98cab1-23af-4034-abc9-0c9e7b1dc77d",
"notaryStatus": "Accepted",
"gatekeeper": "/Library/Plug-Ins/FxPlug/大鱼调色.app: accepted\nsource=Notarized Developer ID",
"sourceCommit": "03a1e2452ec665fe6574b07d1899988fd6852cf1",
"sourceCommit": "d0187695581fa3a8fe5c3cfa8a1bc6337425f5f6",
"templatePath": "/Users/mac/Movies/Motion Templates.localized/Effects.localized/大鱼调色/大鱼调色/大鱼调色.moef",
"templateSHA256": "eaf60224f8d970f8841a03fe0325adc4af73d1c017375b020bcc0e256f0cd803",
"installedTemplateSHA256": {
@@ -65,5 +65,5 @@
"CST 色彩空间转换/small.png": "677353684eeaa1986bd21580eb0f2dcf4486f8cfba3985686c2ecb67afed5dbc"
},
"shaderSHA256": "443ef7e178a5bbd6418a4d2eaac5d42f023f1a6a0a5c4ddd54c7c831af50eb6a",
"hostVerification": "verification/HostUnified1.17.0.json"
"hostVerification": "verification/Diagnostics1.18.0.json"
}
+69
查看文件
@@ -0,0 +1,69 @@
{
"status": "installed-awaiting-host-verification",
"path": "/Library/Plug-Ins/FxPlug/大鱼调色.app",
"bundleID": "com.dayu.color",
"version": "1.18.0",
"build": "104",
"team": "B3W25FX5H5",
"notaryID": "d766ba9e-dcb5-462a-9497-83505e7dd239",
"notaryStatus": "Accepted",
"gatekeeper": "/Library/Plug-Ins/FxPlug/大鱼调色.app: accepted\nsource=Notarized Developer ID",
"sourceCommit": "e26a7c68e46bbd3f65f6052056d25a12f154123e",
"templatePath": "/Users/mac/Movies/Motion Templates.localized/Effects.localized/大鱼调色/大鱼调色/大鱼调色.moef",
"templateSHA256": "eaf60224f8d970f8841a03fe0325adc4af73d1c017375b020bcc0e256f0cd803",
"installedTemplateSHA256": {
"大鱼调色/大鱼调色.moef": "eaf60224f8d970f8841a03fe0325adc4af73d1c017375b020bcc0e256f0cd803",
"大鱼调色/large.png": "ab12611e8801cff86332ccc505a4cffa0c1120541c2efb9bb9908be2c9fe631a",
"大鱼调色/small.png": "41fec3138aee904fc39d6982e6fde809243ffec55298dbfe966f4f48d89caf8a",
"一级调色/一级调色.moef": "50e772b3670563ddce99fa2de63d87e5a14c81a8b7e37f15be32836c59ddafcb",
"一级调色/large.png": "b9b990a46f3fd9b6974a1aba1a3e9bff11a287fd1615d4cd0f9e7393c302631b",
"一级调色/small.png": "77b36c042fb82219651e5bd22c1057b644c06a528a8962d4afecdcb8cab52635",
"蜘蛛盘校色仪/蜘蛛盘校色仪.moef": "3c2af55314cdc4457bb3300138caa4ed87b5e6d9ec8dc2d2e3ba208bbacfd1a8",
"蜘蛛盘校色仪/large.png": "52de21d5fc598fda331cd472b937cf4aaf69a09c80d49e7b168ac7804e9cd040",
"蜘蛛盘校色仪/small.png": "ea9b69d12948c5cd5f6acd9d000822d9fff6df3beec9dd278077a8ab66d455cd",
"基础调整/基础调整.moef": "4a6b336349974fb0395d5218aeb501095eab7d501236fd238f9916cbf2071a12",
"基础调整/large.png": "a25e2b5ed50628ebe77220719528d14f21c25b5eecf37a5d60f211d2179ece43",
"基础调整/small.png": "3da91ae3461b882f5e1a557b4191d9aedaa6d329da70999eb7f26cbfb63a057f",
"肤色保护/肤色保护.moef": "83990f9e58c8ce1a59e4e52c597bd16831af94c3be679c53e9283fb04dd42cef",
"肤色保护/large.png": "f124e8f3d93c2be76ba26ba06d8b9c0b42e2c10dcb6300ae6ee7b7d7c7eb3025",
"肤色保护/small.png": "51fe525e67903101920a994d3540f368780d3aa9c0e54ebdb847871c82d81562",
"风格 LUT/风格 LUT.moef": "d424258d579c049df95ce361cee5373b7dc7d5a4f21cff5b1dd24adcdbc19942",
"风格 LUT/large.png": "a9a4b48885752282535ec3ec2ffbe19bcd27af7132337e4a4ad3d104a2082692",
"风格 LUT/small.png": "9ae76ba957b1e94a5a03a600140f59e98861917d13da9124082810c509400e36",
"HSL/HSL.moef": "baf84ec3b719c3a369ef0760713ba44b203bbfd0821c7a8d68919fef57d58fda",
"HSL/large.png": "eaa2e7b025dc59416fddb8de8b9c56f0a7d34ba70facd7aa45cfb84660f7da78",
"HSL/small.png": "3a54428bc6821e75935aa1be0f149aac6e6ce05fcc059b7f0e90ceef9a41981e",
"曲线/曲线.moef": "b2737c1b39fa039ee7876f3b473943168a15da65459b00802262a931feca3674",
"曲线/large.png": "273899eb6aa60fc0f7c8d41cc0e1f5a15b4c88a8803c00020a085ea874160870",
"曲线/small.png": "c17a2343b076650344b1c53ce92acf32f7696d66e32bda2d156996d4e3b834f5",
"颜色分级/颜色分级.moef": "9fe0319d878b8885d62e199bdea67d804e76f14104bcd233e33be22d60d1ad13",
"颜色分级/large.png": "f9afe6c3a76080a2a7c7ea98f24e62a74ab2e6fd8b4ad16ba9eb6065fef5d2ed",
"颜色分级/small.png": "9e9d7759f829d25a01a77422c989949b02ad34de81013f6b91505c4a3d1397e9",
"三原色/三原色.moef": "80894559be59396d6e06adc8d3343339cbf76f56bed12797446cbb568d6e10de",
"三原色/large.png": "bf7bfc893e294fc38c0f97e5594b6ba6e5c7126b9aae643754c89647e8bd5a1f",
"三原色/small.png": "2e28988e6bae0503edadef22cf7793ce51a1b8e5930623b2eff3c01212e57ee8",
"色阶/色阶.moef": "885c51e81f270078b6c05978a98e7d55ccafc7cd41035b0adbda068cb7149f2d",
"色阶/large.png": "fcea12f4367039ea1512d2e23d51b9ca5198172dc5b10a1ff94a828fe94f4802",
"色阶/small.png": "41cd1a9c4d3b68972181534abe0e91bdb9e01ef5559b6b1f7ef6bf305f450a76",
"黑白混色/黑白混色.moef": "6a7de91a44cd22aa5689c9aad725dccc7e4a29b6dd4e69a4158da7d02f7e559b",
"黑白混色/large.png": "6df07fb223ab43b2b5b6115bef4a1a97eed5cbeb6afab84e005c3a2bdfe01979",
"黑白混色/small.png": "5382be0d29b4a195b8639b3c325f80e9b8cecaa9c12837ab5cf57b6ea877ecbc",
"色彩平衡/色彩平衡.moef": "175ed9f890adf13e712dec264068fffde11accf6dc2e33c3bb278c4438f68362",
"色彩平衡/large.png": "fa2ce9071dee52d7ab9dc7cf6020f8679df3af707663c9a57a28fcde73e6801e",
"色彩平衡/small.png": "12a72a9f26e6ee41613b16ed2402f94a04837e55895addc8f5c25137ad7feaa6",
"通道混合器/通道混合器.moef": "06f497fffbcee034cfbf21e7f39a4b10e41ad49cafd0476f4825903e9169521d",
"通道混合器/large.png": "5ae9d2683450a3a515822520911885a774e202aa924465602f7369a1e67c0c4c",
"通道混合器/small.png": "23bfafb79287855e037f98f0ab5cee10914384824b1a65f0247cad2dd239ef1c",
"胶片模拟/胶片模拟.moef": "528835a129e158c9edf2b48d4a9521b2b9a40e845f04160eecd56e125473bbde",
"胶片模拟/large.png": "d36a794f9640874f6ad7f3523b9eac92ba7c6ef8fa7b63c4594fc68e87c2eee7",
"胶片模拟/small.png": "f125deaf0c8d55ecc04e555cfb133c40ff3703f34a663548c6b38b3196780eb1",
"镜头畸变修复/镜头畸变修复.moef": "0a75525f6e2203527f20a2945aac1a262aa2db57683065ab0ca793da7f5ecd0a",
"镜头畸变修复/large.png": "a00136fb9276c41518ba6096314fb6772ad1dc9be4f4d766409239fa923cfcd1",
"镜头畸变修复/small.png": "1b2480cfa33e1ab54a1ffcd81d9496aac1354b0d2974d6616fe7128965c2ede3",
"CST 色彩空间转换/CST 色彩空间转换.moef": "1399d6906748b206b2673a1d8460f83d9ddda07722d2214d85a9909f24171c17",
"CST 色彩空间转换/large.png": "816db272970491181aca4b872f09ca1900ebf0e7f21fee5bd6e2b4daedea5306",
"CST 色彩空间转换/small.png": "677353684eeaa1986bd21580eb0f2dcf4486f8cfba3985686c2ecb67afed5dbc"
},
"shaderSHA256": "443ef7e178a5bbd6418a4d2eaac5d42f023f1a6a0a5c4ddd54c7c831af50eb6a",
"previousInstallBackup": "/Library/Plug-Ins/FxPlug/.dayu-color-previous-45dca8475efb4d6cb133b14d45d8372b.app"
}
+88
查看文件
@@ -0,0 +1,88 @@
{
"version": "1.18.0",
"build": 105,
"offlineClientChecks": 75,
"backendContractChecks": 27,
"appSyntax": "passed",
"productionBaselineSHA256": "d2b73816e871765bc2f7d1604a1beda98b99e2d9ac4f62039de7bf3a81107593",
"scope": [
"crash original version/build",
"unsymbolicated UUID and offset",
"development crash exclusion",
"sample stack-only privacy",
"resource category without filename",
"new server allowlist"
],
"formalRuntimeValidation": {
"hangProbe": {
"pass": true,
"occurredUTC": "2026-11-06 09:17:01",
"deliveredUTC": "2026-11-06 09:17:02",
"phase": "verification",
"sample_status": "captured",
"verifiedFrames": [
"-[AppDelegate runDiagnosticsProbe] AppDelegate.m:163",
"+[NSThread sleepForTimeInterval:]",
"nanosleep",
"__semwait_signal"
],
"duration": "Intentional 12-second wrapper-only main-thread stall; host untouched",
"rawSampleFile": "Removed after extraction; only stack summary sent"
},
"ordinaryBackgroundRun": {
"pass": true,
"closedWindowLocal": "around 17:19:43",
"continuedDeliveryUTC": [
"09:20:42",
"09:21:45"
],
"sameProcess": true,
"probeArgumentAbsent": true,
"mainIdleResourceSample": {
"memoryMB": 96.8125,
"cpuPercent": 0.0006506293332152795,
"threads": 5
},
"scope": "Short local observation, not long-duration soak test"
},
"diagnosticToggle": {
"pass": true,
"disabledWindowLocal": "17:17:47–17:19 (over 60 seconds)",
"latestCloudEventBeforeReenableUTC": "09:17:36",
"localJournalEventsWhileDisabled": 0,
"UI": "queue cleared, send button disabled; original enabled setting restored",
"pluginAtStartup": "no events emitted while disabled"
},
"host105": {
"pass": true,
"host": "Final Cut Pro 12.4",
"pluginDisplayVersion": "1.18.0",
"installedExecutable": "/Library/Plug-Ins/FxPlug/大鱼调色.app/Contents/PlugIns/大鱼调色 XPC Service.pluginkit/Contents/MacOS/大鱼调色 XPC Service",
"playback": "Existing 11.4-second clip played to end; no new host crash observed",
"renderInput": [
3840,
2160
],
"renderSummary": {
"count": 28,
"averageMS": 601.407418150172,
"maxMS": 1716.7992916656658
},
"pluginStateSummary": {
"count": 41,
"averageMS": 4.306948178720365,
"maxMS": 8.675583347212523
},
"finding": "Slow source rendering observed; not a frame-rate benchmark or a completed performance fix. No footage or filenames stored."
}
},
"candidate104": {
"hostPlayback": "passed",
"performanceSummary": "render/plugin_state/inspector_refresh reached cloud",
"hangProbe": "timeout_or_disabled; not accepted for release",
"correction": "sample before symbolication, 30-second background deadline"
},
"installedNativeChecks": 961,
"actualCompiledSource": "d0187695581fa3a8fe5c3cfa8a1bc6337425f5f6",
"pass": true
}
+10
查看文件
@@ -0,0 +1,10 @@
{
"pass": true,
"releaseID": 400,
"assetID": 44,
"url": "https://dayu.media/git/dayu/dayu-color/releases/download/v1.17.1-inspector-mosaic-20261106/%E5%A4%A7%E9%B1%BC%E8%B0%83%E8%89%B2-1.17.1.pkg",
"downloadPath": "/Volumes/备份/大鱼调色-1.17.1.pkg",
"bytes": 46600407,
"sha256": "5c1240d9f262c977495016cd9c19bd55cc0e374fcf9f99128e8cb2231309d710",
"method": "Authenticated Edge draft asset download; completed UI download and independent file SHA-256; staple validate passed"
}
@@ -0,0 +1,49 @@
{
"version": "1.17.1",
"build": "103",
"sourceCommit": "3b4c612edf99c0ef2b972b7305cd7ba44244a7c6",
"host": "Final Cut Pro 12.4",
"status": "verified",
"testedFrom": "/Library/Plug-Ins/FxPlug/大鱼调色.app",
"date": "2026-11-06",
"scope": "Formal host loading, inspector interaction and mosaic menu; moving footage acceptance deferred to user",
"actualHostChecks": [
{
"name": "cold loaded formal version",
"passed": true,
"scope": "FCP header 1.17.1, formal XPC executable path, restored static NASA portrait face mosaic"
},
{
"name": "default compact disclosure",
"passed": true,
"scope": "Primary, spider and base open; all other headers collapsed; no inner scroll bar initially; FCP outer scroll remains"
},
{
"name": "expanded module scrolling",
"passed": true,
"scope": "Opened film then curve: inner scroll area exposes vertical scroll bar, moved from 0 to 1; bottom output reachable. Collapsing curve removed inner scroll bar; film also restored collapsed. Outer FCP row retains initial allocation and trailing reserved space."
},
{
"name": "person selection menu",
"passed": true,
"scope": "Fast face mode, convert this frame 1 face to selectable tracking mask, multiselect mask and per-mask tracking hint shown. Menu closed without converting; original mosaic preserved."
}
],
"automatedChecks": {
"report": "verification/InstalledSelfTest.json",
"passed": 961,
"failed": 0
},
"limitations": [
"Real mouse shape-draw/release fix is covered by native OSC callback tests; actual host mouse drawing remains for user retest.",
"Two-face selection tested with duplicated NASA public-domain portrait; real moving multiple persons, occlusion, crossing and performance unverified.",
"Converted face rectangles are static until each is tracked; no face identity recognition across cuts.",
"FCP outer inspector caches initial row height; only inner viewport contracts.",
"Legacy saved folding choices are preserved."
],
"qaProject": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/fcp-qa/level-1.15.0/未命名.fcpbundle",
"qaEvent": "大鱼调色1.17.0全链路与马赛克验收",
"processPaths": [
"77303 /Library/Plug-Ins/FxPlug/大鱼调色.app/Contents/PlugIns/大鱼调色 XPC Service.pluginkit/Contents/MacOS/大鱼调色 XPC Service"
]
}
+156
查看文件
@@ -0,0 +1,156 @@
{
"pass": true,
"checks": 961,
"scope": "Release native diagnostics; host and real moving footage acceptance separate",
"results": [
{
"name": "inspector-recreation-restores-independent-disclosure",
"pass": true
},
{
"name": "native-osc-mask-gesture-keeps-capture-when-crossing-the-open-viewer-panel",
"pass": true
},
{
"name": "native-osc-shape-drag-updates-local-bbox-without-author-or-undo-write",
"pass": true
},
{
"name": "native-osc-shape-release-commits-final-bbox-once-to-all-shared-modules",
"pass": true
},
{
"name": "native-osc-shape-escape-keeps-author-and-all-shared-bindings",
"pass": true
},
{
"name": "native-osc-shape-click-without-area-does-not-write-or-create-undo",
"pass": true
},
{
"name": "native-osc-shape-playhead-change-cancels-before-write",
"pass": true
},
{
"name": "native-osc-shape-keeps-draft-across-different-redraw-clock",
"pass": true
},
{
"name": "native-osc-mask-release-saves-with-different-action-clock",
"pass": true
},
{
"name": "native-osc-drawn-mask-persists-after-secure-reopen",
"pass": true
},
{
"name": "inspector-add-pen-enters-empty-drawing-mode",
"pass": true
},
{
"name": "inspector-parameter-burst-coalesces-to-one-deferred-refresh",
"pass": true
},
{
"error": "未提供错误信息",
"name": "mosaic-baseline",
"pass": true
},
{
"error": "未提供错误信息",
"name": "mosaic-shared-rectangle-render",
"pass": true
},
{
"inside": 0.39990234375,
"name": "mosaic-changes-selection-and-preserves-outside",
"outside": 0,
"pass": true
},
{
"error": "未提供错误信息",
"name": "mosaic-follow-existing-tracking",
"pass": true
},
{
"name": "mosaic-tracked-selection-vacates-previous-region",
"pass": true
},
{
"error": "未提供错误信息",
"name": "mosaic-missing-mask",
"pass": true
},
{
"name": "mosaic-missing-mask-does-not-cover-whole-frame",
"pass": true
},
{
"name": "mosaic-refuses-incomplete-cube-export",
"pass": true
},
{
"name": "mosaic-invalid-block-size-rejected",
"pass": true
},
{
"height": 3501,
"name": "inspector-default-opens-three-tools-and-retains-other-headers",
"pass": true,
"visibleModules": 15
},
{
"name": "inspector-default-complete-stack-fits-without-inner-scroll",
"pass": true
},
{
"name": "inspector-expansion-enters-scroll-with-stable-host-allocation",
"pass": true
},
{
"name": "inspector-collapse-removes-scroll-and-clamps-former-bottom-offset",
"pass": true
},
{
"name": "inspector-added-module-is-reachable-in-scroll",
"pass": true
},
{
"name": "inspector-saved-disclosure-is-restored-without-grading-changes",
"pass": true
},
{
"backgroundChange": 0,
"faceChange": 0.6928863525390625,
"name": "mosaic-real-face-includes-feature-region-and-excludes-background",
"pass": true
},
{
"faces": 2,
"name": "mosaic-fast-rectangles-detect-two-faces-without-landmarks",
"pass": true
},
{
"name": "mosaic-import-faces-creates-two-stable-masks-in-one-undo",
"pass": true
},
{
"name": "mosaic-imported-selection-matches-live-two-face-render",
"pass": true
},
{
"name": "mosaic-selects-one-person-with-other-person-pixel-identical",
"pass": true,
"selectedChange": 0.9094352722167969,
"unselectedChange": 0
},
{
"name": "mosaic-person-selection-survives-secure-save-and-reopen",
"pass": true
},
{
"name": "mosaic-duplicate-mask-identities-rejected",
"pass": true
}
]
}
+60 -17
查看文件
@@ -1,6 +1,6 @@
{
"bundlePath": "/Library/Plug-Ins/FxPlug/大鱼调色.app/Contents/PlugIns/大鱼调色 XPC Service.pluginkit",
"checks": 951,
"checks": 961,
"gpu": "Apple M4",
"limitations": [
"Finite states and a 64x48 frame; live FCP discovery, inspector interaction, timeline persistence and real host export require separate acceptance.",
@@ -12,7 +12,7 @@
"error": "未提供错误信息",
"name": "runtime-directory",
"pass": true,
"path": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/D5FD284B-24D2-4017-B4FA-D829C6B9ACF9"
"path": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/D31C6795-AF34-44D5-8CC5-D08EF6E641C4"
},
{
"descriptors": 285,
@@ -122,7 +122,7 @@
},
{
"modules": 16,
"name": "default-all-available-modules-visible-and-expanded",
"name": "default-three-expanded-and-other-modules-folded",
"pass": true
},
{
@@ -898,7 +898,7 @@
"error": "未提供错误信息",
"name": "renderer-export-33cube",
"pass": true,
"path": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/D5FD284B-24D2-4017-B4FA-D829C6B9ACF9/diagnostic-export.cube"
"path": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/D31C6795-AF34-44D5-8CC5-D08EF6E641C4/diagnostic-export.cube"
},
{
"bytes": 1186074,
@@ -918,7 +918,7 @@
},
{
"heartbeats": 1,
"maximumGapMS": 78.47200002288446,
"maximumGapMS": 118.30725002801046,
"name": "external-activation-main-loop-responsive",
"pass": true
},
@@ -1389,7 +1389,7 @@
"closePixels": 128,
"name": "workspace-offscreen-compact-icons-and-close-render-pixels",
"pass": true,
"path": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/D5FD284B-24D2-4017-B4FA-D829C6B9ACF9/workspace-topbar.png",
"path": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/D31C6795-AF34-44D5-8CC5-D08EF6E641C4/workspace-topbar.png",
"toolbarPixels": 3867
},
{
@@ -1460,7 +1460,7 @@
},
{
"name": "workspace-independent-style-fixture-inserted",
"node": "0B8C6BCB-00C5-4CDE-9D1D-DDB7F1468978",
"node": "CB75309D-6F1B-4BFC-873F-5C2D7525FF7A",
"pass": true,
"validDocument": true
},
@@ -1469,10 +1469,10 @@
"error": "none",
"name": "workspace-independent-style1-writes-target-node-inside-undo",
"nodePaths": {
"look0": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/D5FD284B-24D2-4017-B4FA-D829C6B9ACF9/node.cube"
"look0": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/D31C6795-AF34-44D5-8CC5-D08EF6E641C4/node.cube"
},
"pass": true,
"rootStyle1": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/D5FD284B-24D2-4017-B4FA-D829C6B9ACF9/user-new.cube",
"rootStyle1": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/D31C6795-AF34-44D5-8CC5-D08EF6E641C4/user-new.cube",
"undoStartsAfter": 3,
"undoStartsBefore": 2,
"written": true
@@ -2873,6 +2873,18 @@
"name": "native-osc-ellipse-draws-reverse-direction-with-positive-shared-extents",
"pass": true
},
{
"name": "native-osc-shape-keeps-draft-across-different-redraw-clock",
"pass": true
},
{
"name": "native-osc-mask-release-saves-with-different-action-clock",
"pass": true
},
{
"name": "native-osc-drawn-mask-persists-after-secure-reopen",
"pass": true
},
{
"name": "canvas-curve-histogram-updates-from-final-output-at-the-same-playhead",
"pass": true
@@ -3984,25 +3996,29 @@
"pass": true
},
{
"height": 7060,
"name": "inspector-all-existing-modules-expanded-before-host-creation",
"height": 3501,
"name": "inspector-default-opens-three-tools-and-retains-other-headers",
"pass": true,
"visibleModules": 15
},
{
"name": "inspector-returned-frame-contains-complete-expanded-document",
"name": "inspector-default-complete-stack-fits-without-inner-scroll",
"pass": true
},
{
"name": "inspector-complete-content-has-no-inner-scroll-view",
"name": "inspector-expansion-enters-scroll-with-stable-host-allocation",
"pass": true
},
{
"name": "inspector-headers-keep-modules-expanded-without-editing-grade",
"name": "inspector-collapse-removes-scroll-and-clamps-former-bottom-offset",
"pass": true
},
{
"name": "inspector-old-fold-state-does-not-collapse-new-presentation",
"name": "inspector-added-module-is-reachable-in-scroll",
"pass": true
},
{
"name": "inspector-saved-disclosure-is-restored-without-grading-changes",
"pass": true
},
{
@@ -4398,7 +4414,7 @@
{
"name": "viewer-real-osc-draws-minimal-curve-on-clear-canvas",
"pass": true,
"path": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/D5FD284B-24D2-4017-B4FA-D829C6B9ACF9/viewer-workspace.png"
"path": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/D31C6795-AF34-44D5-8CC5-D08EF6E641C4/viewer-workspace.png"
},
{
"name": "canvas-hsl-plot-captures-outside-and-commits-one-undo",
@@ -4526,6 +4542,33 @@
"name": "mosaic-real-face-includes-feature-region-and-excludes-background",
"pass": true
},
{
"faces": 2,
"name": "mosaic-fast-rectangles-detect-two-faces-without-landmarks",
"pass": true
},
{
"name": "mosaic-import-faces-creates-two-stable-masks-in-one-undo",
"pass": true
},
{
"name": "mosaic-imported-selection-matches-live-two-face-render",
"pass": true
},
{
"name": "mosaic-selects-one-person-with-other-person-pixel-identical",
"pass": true,
"selectedChange": 0.9094352722167969,
"unselectedChange": 0
},
{
"name": "mosaic-person-selection-survives-secure-save-and-reopen",
"pass": true
},
{
"name": "mosaic-duplicate-mask-identities-rejected",
"pass": true
},
{
"error": "",
"name": "face-none-protected-render",
@@ -4770,6 +4813,6 @@
"pass": true
}
],
"runtimePath": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/D5FD284B-24D2-4017-B4FA-D829C6B9ACF9",
"runtimePath": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/verification-runtime/D31C6795-AF34-44D5-8CC5-D08EF6E641C4",
"scope": "Native model and renderer integration with real Metal/IOSurface textures and fake FxPlug host selectors; no GUI or live host document."
}
+51
查看文件
@@ -0,0 +1,51 @@
{
"date": "2026-11-06",
"timezone": "Asia/Shanghai",
"recentUserReport": "User saw host disappear and then agreed it likely corresponded to our normal quit.",
"systemEvidence": [
{
"time": "16:48:30",
"pid": 77285,
"termination": [
0,
0,
0
]
},
{
"time": "17:03:55",
"pid": 83505,
"termination": [
0,
0,
0
]
},
{
"time": "17:06:52",
"pid": 83858,
"termination": [
0,
0,
0
]
}
],
"newCrashReport": false,
"conclusion": "Recent observed exits match the normal Cmd-Q verification actions; do not count as crashes.",
"olderCrash": {
"captureTime": "2026-11-06 10:30:52 +0800",
"host": "Final Cut Pro 12.4 (454072)",
"exception": "EXC_CRASH / SIGABRT",
"faultingThread": 20,
"frames": [
"pcAbortImpl",
"-[POOnScreenControl renderWithDrawProperties:]",
"-[FFProOSC drawRect:toContext:drawProperties:]",
"-[FFPlayerVideoModule drawOSCsAtTime:inRect:drawDestination:drawProperties:isDisplaying:]"
],
"mainThread": "-[FFInspectorModuleChannels _setupChannelInspector:] / _filtersChangedFinal removes NSScrollView",
"scope": "Host screen-control rendering aborted while inspector was rebuilding. No Dayu frames in the host report; insufficient to attribute to a specific plugin. Predates this diagnostic change."
},
"rawReport": "Kept only in system DiagnosticReports/Retired; not uploaded or committed."
}
+32 -16
查看文件
@@ -1,7 +1,7 @@
{
"package": "/Volumes/备份/大鱼调色/发行包/大鱼调色-1.17.0.pkg",
"sha256": "f372ee6a421f833c4619dcc4891ae66f90b56f40b431ee75529806bec762157e",
"bytes": 46594729,
"package": "/Volumes/备份/大鱼调色/发行包/大鱼调色-1.18.0.pkg",
"sha256": "4a52742a393ecaaa30f758d72c9e0ba68c606ed8e805316d48b9868068378a3f",
"bytes": 46620783,
"testUnsigned": false,
"installationExecuted": false,
"checks": [
@@ -31,28 +31,44 @@
"source": "/Library/Plug-Ins/FxPlug/大鱼调色.app",
"payload": "Library/Plug-Ins/FxPlug/大鱼调色.app",
"bundleID": "com.dayu.color",
"version": "1.17.0",
"build": "102"
"version": "1.18.0",
"build": "105"
},
{
"source": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/pkg-inputs-jrnzspg4/大鱼调色",
"payload": "Library/Application Support/PKGForge/Payload/com.dayu.color.installer.e873a7bc-b359-48c2-8f63-a505f4cdec0c/D63DC618-C1E8-43D1-B037-E8D94952DF38/大鱼调色"
"source": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/pkg-inputs-eqipkz7y/大鱼调色",
"payload": "Library/Application Support/PKGForge/Payload/com.dayu.color.installer.8b6fe9d5-0d23-4953-a3b8-a668fdf704ee/0ED2AA69-F1AC-4FC5-BFE1-C5D58E384F6C/大鱼调色"
}
],
"signature": "Package \"大鱼调色-1.17.0.pkg\":\n Status: signed by a developer certificate issued by Apple for distribution\n Notarization: trusted by the Apple notary service\n Signed with a trusted timestamp on: 2026-11-06 06:36:43 +0000\n Certificate Chain:\n 1. Developer ID Installer: zhong luo (B3W25FX5H5)\n Expires: 2027-02-01 22:12:15 +0000\n SHA256 Fingerprint:\n C0 19 01 3C 67 88 8F 34 65 56 C5 91 3C E5 B6 12 4C 5D A6 DA F9 D8 \n DA 00 37 52 DF F0 F3 E6 00 B4\n ------------------------------------------------------------------------\n 2. Developer ID Certification Authority\n Expires: 2027-02-01 22:12:15 +0000\n SHA256 Fingerprint:\n 7A FC 9D 01 A6 2F 03 A2 DE 96 37 93 6D 4A FE 68 09 0D 2D E1 8D 03 \n F2 9C 88 CF B0 B1 BA 63 58 7F\n ------------------------------------------------------------------------\n 3. Apple Root CA\n Expires: 2035-02-09 21:40:36 +0000\n SHA256 Fingerprint:\n B0 B1 73 0E CB C7 FF 45 05 14 2C 49 F1 29 5E 6E DA 6B CA ED 7E 2C \n 68 C5 BE 91 B5 A1 10 01 F0 24",
"gatekeeper": "/Volumes/备份/大鱼调色/发行包/大鱼调色-1.17.0.pkg: accepted\nsource=Notarized Developer ID",
"signature": "Package \"大鱼调色-1.18.0.pkg\":\n Status: signed by a developer certificate issued by Apple for distribution\n Notarization: trusted by the Apple notary service\n Signed with a trusted timestamp on: 2026-11-06 09:23:02 +0000\n Certificate Chain:\n 1. Developer ID Installer: zhong luo (B3W25FX5H5)\n Expires: 2027-02-01 22:12:15 +0000\n SHA256 Fingerprint:\n C0 19 01 3C 67 88 8F 34 65 56 C5 91 3C E5 B6 12 4C 5D A6 DA F9 D8 \n DA 00 37 52 DF F0 F3 E6 00 B4\n ------------------------------------------------------------------------\n 2. Developer ID Certification Authority\n Expires: 2027-02-01 22:12:15 +0000\n SHA256 Fingerprint:\n 7A FC 9D 01 A6 2F 03 A2 DE 96 37 93 6D 4A FE 68 09 0D 2D E1 8D 03 \n F2 9C 88 CF B0 B1 BA 63 58 7F\n ------------------------------------------------------------------------\n 3. Apple Root CA\n Expires: 2035-02-09 21:40:36 +0000\n SHA256 Fingerprint:\n B0 B1 73 0E CB C7 FF 45 05 14 2C 49 F1 29 5E 6E DA 6B CA ED 7E 2C \n 68 C5 BE 91 B5 A1 10 01 F0 24",
"gatekeeper": "/Volumes/备份/大鱼调色/发行包/大鱼调色-1.18.0.pkg: accepted\nsource=Notarized Developer ID",
"pass": true,
"scope": "Expanded package structural and payload verification only; no installer scripts executed and no host quit or registration performed.",
"notarization": {
"id": "a9bba972-0743-469f-9869-13f94e1a1a83",
"message": "Successfully received submission info",
"name": "大鱼调色-1.18.0.pkg",
"status": "Accepted",
"createdDate": "2026-11-06T06:36:45.817Z",
"name": "大鱼调色-1.17.0.pkg"
"id": "8c4fa3f6-4866-429a-8750-8567f7db4766",
"createdDate": "2026-11-06T09:23:04.653Z",
"message": "Successfully received submission info"
},
"appCompiledSource": "03a1e2452ec665fe6574b07d1899988fd6852cf1",
"appBuild": "102",
"appCompiledSource": "d0187695581fa3a8fe5c3cfa8a1bc6337425f5f6",
"appBuild": "105",
"packageBuilderRemote": "https://dayu.media/git/dayu/pkg-forge.git",
"residentAppClosing": {
"identifiers": [
"com.apple.FinalCut",
"com.apple.FinalCutApp",
"com.apple.motionapp",
"com.apple.motionappApp",
"com.dayu.color"
],
"preinstallGuardCount": 1,
"normalQuit": true
},
"packageEntryAdaptation": {
"upstreamEntrySHA256": "a1a8bc8920cfa2dfe4a7d65c4403eec8a8f3ec81b0736951578a81a80389bfc0",
"adaptedEntrySHA256": "4d9cef08673a690427de0757a5cfe42251d01aa47e40902a5155d46d01c71503",
"requiredApplication": "com.dayu.color"
},
"packageBuilderCommit": "eb53707c0e67d8ddeab8c1270bb079f1050cfafe",
"templateSHA256": {
"大鱼调色/大鱼调色.moef": "eaf60224f8d970f8841a03fe0325adc4af73d1c017375b020bcc0e256f0cd803",
@@ -111,6 +127,6 @@
"entries": 198,
"scope": "Read/traverse modes for installer-owned app entries, from the package BOM"
},
"installedAppHostAcceptance": "verification/HostUnified1.17.0.json",
"installedAppHostAcceptance": "verification/Diagnostics1.18.0.json",
"installScope": "本轮仅生成并验包,未再次执行系统安装;正式 APP 已有独立宿主验收。"
}
+24
查看文件
@@ -0,0 +1,24 @@
{
"date": "2026-11-06",
"remote": "https://dayu.media/git/dayu/dayu-color.git",
"compiledSource": "03a1e2452ec665fe6574b07d1899988fd6852cf1",
"compiledVerifiedFiles": 709,
"tag": "v1.17.0-unified-mosaic-20261106",
"tagCommit": "a458bbeb5397153a458706b0bfbb4e8692108a65",
"tagVerifiedFiles": 711,
"lfsPointers": [],
"submodules": [],
"gitIntegrity": true,
"compiledInputDifferencesAtTag": [
"Publishing/1.17.0/Release.md",
"research/UnifiedPipeline1.17.0.md",
"verification/Delivery.json",
"verification/HostUnified1.17.0.json",
"verification/InstalledSelfTest.json",
"verification/Package.json"
],
"packageSHA256": "f372ee6a421f833c4619dcc4891ae66f90b56f40b431ee75529806bec762157e",
"scope": "Independent remote clone; all tracked Git blob bytes verified at compiled commit and release tag; source inputs unchanged between them. No cold rebuild of third-party dependencies.",
"temporaryClone": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/recovery-1.17.0-final-fej13yjq/source",
"temporaryCloneRemoved": true
}
+40
查看文件
@@ -0,0 +1,40 @@
{
"repository": "https://dayu.media/git/dayu/dayu-color.git",
"branch": "main",
"source": {
"commit": "3b4c612edf99c0ef2b972b7305cd7ba44244a7c6",
"files": 714,
"lfs": [],
"submodules": 0,
"fsck": "passed"
},
"build": {
"sourceCommit": "3b4c612edf99c0ef2b972b7305cd7ba44244a7c6",
"certificateTeam": "B3W25FX5H5",
"certificateValidUntilUTC": "2027-02-01T22:12:15Z",
"preflightChecks": 961,
"templateChecks": "16 standalone and full effect passed; existing templates byte-identical",
"unrelatedDiff": "project.pbxproj three Security reference reorderings preserved"
},
"scope": "Independent remote checkout of compiled source and release tag; every tracked file checked against its Git blob; package record matched. No third-party cold rebuild.",
"release": {
"tag": "v1.17.1-inspector-mosaic-20261106",
"commit": "7c0bfa5352f282bcec0aedf43be29af4432f2ba8",
"files": 718,
"fsck": "passed",
"packageRecord": "matches exact signed package",
"changesFromCompiledCommit": [
"Publishing/1.17.1/Release.md",
"RECOVERY.md",
"research/InspectorMosaic1.17.1.md",
"template/sources/RegisteredParameters.json",
"verification/Delivery.json",
"verification/HostInspectorMosaic1.17.1.json",
"verification/InspectorMosaic1.17.1.json",
"verification/InstalledSelfTest.json",
"verification/Package.json",
"verification/Recovery1.17.1.json",
"开发交接.md"
]
}
}
+11
查看文件
@@ -0,0 +1,11 @@
{
"sourceCommit": "d0187695581fa3a8fe5c3cfa8a1bc6337425f5f6",
"remote": "https://dayu.media/git/dayu/dayu-color.git",
"compiledSourceFilesVerified": 724,
"fsck": "passed",
"lfs": "no LFS pointers",
"submodules": "none",
"scope": "Independent remote clone, exact committed file bytes; third-party cold build not repeated",
"releaseTag": "pending",
"sourceByteComparison": "passed"
}
+13 -33
查看文件
@@ -3,40 +3,20 @@
"repository": "dayu/dayu-color",
"repositoryID": 52,
"private": false,
"tag": "v1.16.0-leveling-modules-20261106",
"releaseCommit": "0483e76a1762b1dc3d2e049453d4c85e473cfc50",
"releaseID": 398,
"releaseURL": "https://dayu.media/git/dayu/dayu-color/releases/tag/v1.16.0-leveling-modules-20261106",
"assetID": 42,
"assetName": "大鱼调色-1.16.0.pkg",
"downloadURL": "https://dayu.media/git/dayu/dayu-color/releases/download/v1.16.0-leveling-modules-20261106/%E5%A4%A7%E9%B1%BC%E8%B0%83%E8%89%B2-1.16.0.pkg",
"bytes": 55485504,
"sha256": "99a571c5b2c43d0c4ce3080d3f1026b90b1a3f79356825e38a06a1a7021df52d",
"tag": "v1.17.1-inspector-mosaic-20261106",
"releaseCommit": "7c0bfa5352f282bcec0aedf43be29af4432f2ba8",
"releaseID": 400,
"releaseURL": "https://dayu.media/git/dayu/dayu-color/releases/tag/v1.17.1-inspector-mosaic-20261106",
"assetID": 44,
"assetName": "大鱼调色-1.17.1.pkg",
"downloadURL": "https://dayu.media/git/dayu/dayu-color/releases/download/v1.17.1-inspector-mosaic-20261106/%E5%A4%A7%E9%B1%BC%E8%B0%83%E8%89%B2-1.17.1.pkg",
"bytes": 46600407,
"sha256": "5c1240d9f262c977495016cd9c19bd55cc0e374fcf9f99128e8cb2231309d710",
"existingAssetReused": true,
"verification": "Authenticated full download SHA-256 and byte count, then release/asset read-back.",
"credentialSource": "macOS Keychain: dayu-git-api",
"draftDownload": {
"method": "Authenticated Microsoft Edge download of the draft attachment",
"bytes": 55485504,
"sha256": "99a571c5b2c43d0c4ce3080d3f1026b90b1a3f79356825e38a06a1a7021df52d",
"releaseID": 398,
"assetID": 42,
"url": "https://dayu.media/git/dayu/dayu-color/releases/download/v1.16.0-leveling-modules-20261106/%E5%A4%A7%E9%B1%BC%E8%B0%83%E8%89%B2-1.16.0.pkg",
"ticketValidated": true
},
"independentRemoteCheckout": {
"compiledSource": "27ba2b53ca6809081269f95ca6caaddeb3933c79",
"remote": "https://dayu.media/git/dayu/dayu-color.git",
"files": 657,
"gitFsck": "full --strict passed",
"trackedContents": "all match compiled source Git objects",
"clone": "/Users/mac/Library/Caches/CodexBuilds/com.dayu.color/recovery-1.16.0",
"submodules": false,
"lfs": false,
"releaseTag": "v1.16.0-leveling-modules-20261106",
"releaseCommit": "0483e76a1762b1dc3d2e049453d4c85e473cfc50",
"releaseFiles": 660,
"releaseTreeMatches": true,
"packageRecordMatches": true
}
"prerelease": true,
"draft": false,
"draftVerification": "verification/DraftDownload1.17.1.json",
"releaseClassification": "Retains the product public-beta classification used by previous release 399; app update channel unchanged."
}
+22
查看文件
@@ -0,0 +1,22 @@
{
"version": "1.18.0",
"build": 105,
"sourceCommit": "d0187695581fa3a8fe5c3cfa8a1bc6337425f5f6",
"images": [
{
"symbol": "大鱼调色.app.dSYM",
"uuid": "F952A83C-8229-3789-9945-3936C3C617B9",
"binary": "大鱼调色.app/Contents/MacOS/大鱼调色"
},
{
"symbol": "大鱼调色 XPC Service.pluginkit.dSYM",
"uuid": "B5B02C34-12E6-3056-9337-6CFB0929804B",
"binary": "大鱼调色.app/Contents/PlugIns/大鱼调色 XPC Service.pluginkit/Contents/MacOS/大鱼调色 XPC Service"
}
],
"purpose": "Exact dSYM files for UUID/offset crash symbolication; no executable app or user reports.",
"path": "/Volumes/备份/大鱼调色/发行包/大鱼调色-1.18.0-symbols.zip",
"bytes": 3562272,
"sha256": "a5bf3a6cc836c5da0471d9a70d2eb9e81a5166c63bbfae993a910ba859936c9c",
"remoteStatus": "pending"
}
@@ -61,6 +61,33 @@ if(faceFixture.length){
privacy[@"mosaic"] = @{@"enabled":@NO,@"source":@"face",@"size":@64};BOOL privacyOff=[face renderSource:src destination:dst uniforms:privacyU paths:@{} spider:nil tools:privacy colorManagement:nil hostPrimaries:kFxColorPrimaries_Rec709 error:&maskError];Pixels privateReference=read(dst,gpu);
double privateInside=0,privateOutside=0;for(NSUInteger y=85;y<145;y++)for(NSUInteger x=200;x<260;x++)for(int c=0;c<3;c++)privateInside=MAX(privateInside,fabs((float)privateFrame[(y*w+x)*4+c]-(float)privateReference[(y*w+x)*4+c]));for(NSUInteger y=410;y<470;y++)for(NSUInteger x=410;x<470;x++)for(int c=0;c<3;c++)privateOutside=MAX(privateOutside,fabs((float)privateFrame[(y*w+x)*4+c]-(float)privateReference[(y*w+x)*4+c]));
run.record(@"mosaic-real-face-includes-feature-region-and-excludes-background",privacyOK&&privacyOff&&privateInside>.05&&privateOutside==0,@{@"faceChange":@(privateInside),@"backgroundChange":@(privateOutside)});
// The same production menu writer turns two detected faces into independent,
// serializable masks, then toggles only one while preserving the other pixels.
privacy[@"mosaic"]=@{@"enabled":@YES,@"source":@"face",@"size":@64};
BOOL fastOK=[face renderSource:twoSource destination:twoDest uniforms:privacyU paths:@{} spider:nil tools:DYToolRenderSnapshot(privacy,kCMTimeZero) colorManagement:nil hostPrimaries:kFxColorPrimaries_Rec709 error:&maskError];
NSDictionary *detected=[face mosaicFaceSnapshot];Pixels bothFaces=read(twoDest,gpu);
run.record(@"mosaic-fast-rectangles-detect-two-faces-without-landmarks",fastOK&&[detected[@"boxes"]count]==2,@{@"faces":@([detected[@"boxes"]count])});
if([detected[@"boxes"]count]==2){
DYDiagnosticManager *base=[[[DYDiagnosticManager alloc]init]autorelease];DYCreateParameters(base,nil);DYWriteTools(base,privacy,kCMTimeZero);
DYToolCanvasProbe *host=[[[DYToolCanvasProbe alloc]init]autorelease];host->_base=base;host->_time=kCMTimeZero;
id bridge=[[NSClassFromString(@"DYViewerParameterBridge")alloc]initWithAPIManager:host];[bridge setValue:face forKey:@"renderer"];
NSMenuItem *item=[[[NSMenuItem alloc]init]autorelease];item.representedObject=@{@"importFaces":detected,@"actionTime":detected[@"time"]};
int undo=base->_undoStarts;[bridge performSelector:@selector(applyMosaicMenu:) withObject:item];
NSDictionary *saved=DYReadTools(host,kCMTimeZero).document;NSArray *IDs=saved[@"mosaic"][@"maskIDs"];
run.record(@"mosaic-import-faces-creates-two-stable-masks-in-one-undo",IDs.count==2&&DYSharedMasks(saved).count==2&&base->_undoStarts==undo+1&&base->_undoEnds==undo+1);
BOOL savedOK=[face renderSource:twoSource destination:twoDest uniforms:privacyU paths:@{} spider:nil tools:DYToolRenderSnapshot(saved,kCMTimeZero) colorManagement:nil hostPrimaries:kFxColorPrimaries_Rec709 error:&maskError];
run.record(@"mosaic-imported-selection-matches-live-two-face-render",savedOK&&difference(bothFaces,read(twoDest,gpu)).maximum<.002);
if(IDs.count==2){
item.representedObject=@{@"toggleMask":IDs[1]};[bridge performSelector:@selector(applyMosaicMenu:) withObject:item];saved=DYReadTools(host,kCMTimeZero).document;
[face renderSource:twoSource destination:twoDest uniforms:privacyU paths:@{} spider:nil tools:DYToolRenderSnapshot(saved,kCMTimeZero) colorManagement:nil hostPrimaries:kFxColorPrimaries_Rec709 error:&maskError];Pixels single=read(twoDest,gpu);
privacy[@"mosaic"]=@{@"enabled":@NO,@"source":@"face",@"size":@64};[face renderSource:twoSource destination:twoDest uniforms:privacyU paths:@{} spider:nil tools:privacy colorManagement:nil hostPrimaries:kFxColorPrimaries_Rec709 error:&maskError];Pixels reference=read(twoDest,gpu);
double left=0,right=0;for(NSUInteger y=0;y<512;y++)for(NSUInteger x=0;x<1024;x++)for(int c=0;c<3;c++){double delta=fabs((float)single[(y*1024+x)*4+c]-(float)reference[(y*1024+x)*4+c]);if(x<512)left=MAX(left,delta);else right=MAX(right,delta);}
run.record(@"mosaic-selects-one-person-with-other-person-pixel-identical",left>.05&&right==0&&[saved[@"mosaic"][@"maskIDs"]count]==1,@{@"selectedChange":@(left),@"unselectedChange":@(right)});
NSData *archive=[NSKeyedArchiver archivedDataWithRootObject:DYReadTools(host,kCMTimeZero) requiringSecureCoding:YES error:nil];DYToolDocument *restored=[NSKeyedUnarchiver unarchivedObjectOfClass:DYToolDocument.class fromData:archive error:nil];run.record(@"mosaic-person-selection-survives-secure-save-and-reopen",[restored.document isEqual:saved]);
NSMutableDictionary *malformed=DYMutablePlist(saved);malformed[@"mosaic"][@"maskIDs"]=@[IDs[0],IDs[0]];run.record(@"mosaic-duplicate-mask-identities-rejected",!DYValidToolDocument(malformed));
}
[bridge invalidate];[bridge release];
}
Pixels noFace(w*h*4);for(NSUInteger i=0;i<w*h;i++){noFace[i*4]=.35;noFace[i*4+1]=.18;noFace[i*4+2]=.1;noFace[i*4+3]=1;}upload(noFace);u.skinVisualize=0;Pixels noFaceProtected=render(run,face,src,dst,gpu,u,@{},@"face-none-protected-render");u.skinProtection.x=0;Pixels noFacePlain=render(run,face,src,dst,gpu,u,@{},@"face-none-unprotected-reference");run.record(@"face-no-detection-clears-prior-frame-and-fails-closed",difference(noFaceProtected,noFacePlain).maximum<.002);
}
@@ -1,21 +1,25 @@
// Presentation-only changes must never rewrite a host's grading parameters.
{
DYDiagnosticManager *host=[[[DYDiagnosticManager alloc]init]autorelease];DYCreateParameters(host,nil);
NSDictionary *values=[[host->_values copy]autorelease],*custom=[[host->_custom copy]autorelease];int starts=host->_undoStarts,ends=host->_undoEnds;
NSDictionary *values=[[host->_values copy]autorelease],*custom=[[host->_custom copy]autorelease];(void)custom;int starts=host->_undoStarts,ends=host->_undoEnds;
DYInspector *view=[[[DYInspector alloc]initWithAPIManager:host]autorelease];
NSButton *settings=[view valueForKey:@"colorSettings"];NSView *panel=[view valueForKey:@"managedPanel"];NSArray *cards=[view valueForKey:@"cards"];
BOOL expanded=YES;NSUInteger visible=0;CGFloat bottom=0;
for(NSDictionary *card in cards)if(![card[@"removed"]boolValue]){expanded&=![card[@"collapsed"]boolValue];visible++;bottom=MAX(bottom,NSMaxY([card[@"view"]frame]));}
NSView *document=[view valueForKey:@"document"];NSView *brandLabel=[view valueForKey:@"brand"];
run.record(@"inspector-all-existing-modules-expanded-before-host-creation",expanded&&visible==DYToolTypes().count&&!panel.hidden,@{@"visibleModules":@(visible),@"height":@(view.frame.size.height)});
run.record(@"inspector-returned-frame-contains-complete-expanded-document",NSMaxY(document.frame)<=view.frame.size.height&&bottom<=document.bounds.size.height&&view.frame.size.height==view.intrinsicContentSize.height);
run.record(@"inspector-complete-content-has-no-inner-scroll-view",[view valueForKey:@"scroll"]==nil&&NSContainsRect(view.bounds,brandLabel.frame));
for(int i=0;i<10;i++){[settings performClick:nil];for(NSDictionary *card in cards)[card[@"header"]performClick:nil];[view layoutSubtreeIfNeeded];}
expanded=YES;for(NSDictionary *card in cards)expanded&=![card[@"collapsed"]boolValue];
run.record(@"inspector-headers-keep-modules-expanded-without-editing-grade",expanded&&!panel.hidden&&[values isEqual:host->_values]&&[custom isEqual:host->_custom]&&starts==host->_undoStarts&&ends==host->_undoEnds);
DYInspectorToken *folds=[[[DYInspectorToken alloc]init]autorelease];folds.folds=@{@"primary":@YES,@"hsl":@YES};[host setCustomParameterValue:folds toParameter:DYInspectorParameterID atTime:kCMTimeZero];
[view refresh];expanded=YES;for(NSDictionary *card in cards)expanded&=![card[@"collapsed"]boolValue];
run.record(@"inspector-old-fold-state-does-not-collapse-new-presentation",expanded&&[DYReadTools(host,kCMTimeZero).document isKindOfClass:NSDictionary.class]);
BOOL defaults=YES;NSUInteger visible=0,expanded=0;CGFloat bottom=0;
for(NSDictionary *card in cards)if(![card[@"removed"]boolValue]){BOOL open=[@[@"primary",@"base",@"spider"]containsObject:card[@"section"][@"key"]];defaults&=[card[@"collapsed"]boolValue]!=open;expanded+=![card[@"collapsed"]boolValue];visible++;bottom=MAX(bottom,NSMaxY([card[@"view"]frame]));}
NSView *document=[view valueForKey:@"document"],*brandLabel=[view valueForKey:@"brand"];NSScrollView *scroll=[view valueForKey:@"scroll"];
run.record(@"inspector-default-opens-three-tools-and-retains-other-headers",defaults&&expanded==3&&visible==DYToolTypes().count&&panel.hidden,@{@"visibleModules":@(visible),@"height":@(view.frame.size.height)});
run.record(@"inspector-default-complete-stack-fits-without-inner-scroll",scroll&&!scroll.hasVerticalScroller&&document.bounds.size.height<=scroll.contentSize.height+.5&&bottom<=document.bounds.size.height&&NSContainsRect(view.bounds,brandLabel.frame));
CGFloat originalHeight=view.frame.size.height;
for(NSDictionary *card in cards)if([card[@"collapsed"]boolValue])[card[@"header"]performClick:nil];[view layoutSubtreeIfNeeded];
run.record(@"inspector-expansion-enters-scroll-with-stable-host-allocation",scroll.hasVerticalScroller&&document.bounds.size.height>scroll.contentSize.height&&view.frame.size.height==originalHeight);
[document scrollPoint:NSMakePoint(0,document.bounds.size.height)];
for(NSDictionary *card in cards)if(![@[@"primary",@"base",@"spider"]containsObject:card[@"section"][@"key"]])[card[@"header"]performClick:nil];[view layoutSubtreeIfNeeded];
run.record(@"inspector-collapse-removes-scroll-and-clamps-former-bottom-offset",!scroll.hasVerticalScroller&&scroll.contentView.bounds.origin.y==0&&[values isEqual:host->_values]&&starts==host->_undoStarts&&ends==host->_undoEnds);
NSMutableDictionary *doc=DYMutablePlist(DYReadTools(host,kCMTimeZero).document);DYInsertTool(doc,@"spider",@"base:spider");DYWriteTools(host,doc,kCMTimeZero);[view refresh];[view layoutSubtreeIfNeeded];
run.record(@"inspector-added-module-is-reachable-in-scroll",scroll.hasVerticalScroller&&view.frame.size.height==originalHeight&&[[view valueForKey:@"stackViews"]count]==1);
DYInspectorToken *folds=[[[DYInspectorToken alloc]init]autorelease];folds.folds=@{@"primary":@YES,@"hsl":@NO};[host setCustomParameterValue:folds toParameter:DYInspectorParameterID atTime:kCMTimeZero];[view refresh];
BOOL restored=YES;for(NSDictionary *card in cards){NSString *key=card[@"section"][@"key"];if([key isEqual:@"primary"])restored&=[card[@"collapsed"]boolValue];if([key isEqual:@"hsl"])restored&=![card[@"collapsed"]boolValue];}
run.record(@"inspector-saved-disclosure-is-restored-without-grading-changes",restored&&[values isEqual:host->_values]);
for(NSDictionary *state in @[@{},DYManagedColorDefaults(),DYPrimaryColorDefaults(),DYUnifiedColorDefaults()]){
DYAssetState *assets=[[[DYAssetState alloc]init]autorelease];assets.colorManagement=state.count?state:nil;DYWriteAssets(host,assets,kCMTimeZero);[view refresh];NSDictionary *snapshot=[view presetSnapshot];[settings performClick:nil];
run.record([NSString stringWithFormat:@"expanded-settings-preserve-CMS-version-%@",state[@"version"]?:@1],[[view presetSnapshot]isEqual:snapshot]);
+3 -3
查看文件
@@ -267,10 +267,10 @@ extern "C" int DYRunDiagnostics(void) { @autoreleasepool {
DYDiagnosticManager *uiHost=[[[DYDiagnosticManager alloc]init]autorelease];DYCreateParameters(uiHost,nil);
DYInspector *inspector=[[[DYInspector alloc]initWithAPIManager:uiHost]autorelease];[inspector refresh];
NSArray *cards=[inspector valueForKey:@"cards"];BOOL initialUI=YES;
for(NSDictionary *card in cards){BOOL expected=![card[@"section"][@"key"]isEqual:@"output"];initialUI&=![card[@"collapsed"]boolValue]&&[card[@"removed"]boolValue]!=expected;}
run.record(@"default-all-available-modules-visible-and-expanded",initialUI,@{@"modules":@(cards.count)});
for(NSDictionary *card in cards){BOOL expected=![card[@"section"][@"key"]isEqual:@"output"];initialUI&=([card[@"collapsed"]boolValue]!=[@[@"primary",@"base",@"spider"]containsObject:card[@"section"][@"key"]])&&[card[@"removed"]boolValue]!=expected;}
run.record(@"default-three-expanded-and-other-modules-folded",initialUI,@{@"modules":@(cards.count)});
DYUniforms uiBefore,uiAfter;DYReadUniforms(uiHost,kCMTimeZero,&uiBefore);BOOL foldingIndependent=YES;
for(NSDictionary *card in cards){NSButton *header=card[@"header"];[header performClick:nil];[inspector refresh];DYReadUniforms(uiHost,kCMTimeZero,&uiAfter);foldingIndependent&=![card[@"collapsed"]boolValue]&&memcmp(&uiBefore,&uiAfter,sizeof(uiBefore))==0;[header performClick:nil];[inspector refresh];}
for(NSDictionary *card in cards){NSButton *header=card[@"header"];BOOL was=[card[@"collapsed"]boolValue];[header performClick:nil];[inspector refresh];DYReadUniforms(uiHost,kCMTimeZero,&uiAfter);foldingIndependent&=([card[@"collapsed"]boolValue]!=was)&&memcmp(&uiBefore,&uiAfter,sizeof(uiBefore))==0;[header performClick:nil];[inspector refresh];}
run.record(@"expanded-header-actions-preserve-every-render-parameter",foldingIndependent);
NSDictionary *first=cards[0];if(![first[@"collapsed"]boolValue]){[(NSButton*)first[@"header"]performClick:nil];[inspector refresh];}BOOL wasFolded=[first[@"collapsed"]boolValue];[(NSButton*)first[@"enabled"]performClick:nil];[inspector refresh];DYReadUniforms(uiHost,kCMTimeZero,&uiAfter);
run.record(@"eye-only-toggles-enable-retains-disclosure",[first[@"collapsed"]boolValue]==wasFolded&&uiAfter.inputSectionEnabled==0);
+53 -45
查看文件
@@ -487,7 +487,7 @@ NSView<DYWorkspaceMaskEditing> *DYCreateWorkspaceMaskEditor(id<PROAPIAccessing>
NSInteger _visibleLooks;
NSButton *_colorSettings;BOOL _colorSettingsExpanded;
BOOL _refreshing,_graphicUndoOpen,_graphicCancelled;CMTime _graphicTime;NSMutableDictionary *_graphicExpected;
BOOL _embedded,_workspaceEditor,_unified,_measuringFullHeight;NSArray *_renderOrder;NSMutableDictionary *_stackViews;NSArray *_stackOrder;NSDictionary *_stackRoots;CGFloat _stackHeight,_preferredHeight;
BOOL _embedded,_workspaceEditor,_unified,_measuringDefaultHeight;NSArray *_renderOrder;NSMutableDictionary *_stackViews;NSArray *_stackOrder;NSDictionary *_stackRoots;CGFloat _stackHeight,_preferredHeight,_maximumViewportHeight;
DYSpiderPanel *_spiderPanel;
NSMutableDictionary *_assetLoads,*_assetLoadIDs;
NSUInteger _nextAssetLoadID;
@@ -533,7 +533,7 @@ NSView<DYWorkspaceMaskEditing> *DYCreateWorkspaceMaskEditor(id<PROAPIAccessing>
_save=[DYButton(@"保存预设",self,@selector(savePreset:)) retain];
_load=[DYButton(@"载入预设",self,@selector(loadPreset:)) retain];
_export=[DYButton(@"导出 LUT",self,@selector(exportLUT:)) retain];
_colorSettings=[DYButton(@"颜色设置",self,@selector(toggleColorSettings:))retain];_colorSettings.toolTip=@"颜色设置已完整展开;点击定位";_colorSettings.accessibilityLabel=@"颜色设置";_colorSettings.accessibilityValue=@"已展开";_colorSettingsExpanded=YES;
_colorSettings=[DYButton(@"颜色设置",self,@selector(toggleColorSettings:))retain];_colorSettings.toolTip=@"展开或折叠颜色设置";_colorSettings.accessibilityLabel=@"颜色设置";_colorSettings.accessibilityValue=@"已折叠";_colorSettingsExpanded=NO;
_save.identifier=@"primaryAction";
_workspaceButton=[DYButton(@"控制面板",self,@selector(openWorkspace:))retain];_workspaceButton.accessibilityLabel=@"打开调色控制面板";
_addModule=[[DYThemePopUpButton alloc]initWithFrame:NSZeroRect pullsDown:YES];_addModule.font=[NSFont systemFontOfSize:11];_addModule.accessibilityLabel=@"添加模块";[_addModule addItemWithTitle:@"+ 添加模块"];
@@ -544,7 +544,7 @@ NSView<DYWorkspaceMaskEditing> *DYCreateWorkspaceMaskEditor(id<PROAPIAccessing>
NSButton *b=DYButton(DYThemeNames()[i],self,@selector(selectTheme:));[b setButtonType:NSButtonTypePushOnPushOff];b.tag=i+7;b.identifier=@"appearanceToggle";
b.toolTip=[DYThemeNames()[i] stringByAppendingString:@"主题"];b.accessibilityLabel=b.toolTip;[self addSubview:b];b.hidden=_embedded||_workspaceEditor;[themes addObject:b];
}_themeButtons=[themes copy];
if(_workspaceEditor)_scroll=[[DYInspectorScrollView alloc] initWithFrame:NSZeroRect];
if(!_embedded||_workspaceEditor)_scroll=[[DYInspectorScrollView alloc] initWithFrame:NSZeroRect];
_scroll.hasVerticalScroller=NO; _scroll.hasHorizontalScroller=_workspaceEditor;_scroll.scrollerStyle=NSScrollerStyleOverlay;_scroll.automaticallyAdjustsContentInsets=NO;_scroll.contentInsets=NSEdgeInsetsZero; _scroll.drawsBackground=NO;
_scroll.autohidesScrollers=YES; _scroll.borderType=NSNoBorder;
_scroll.clipsToBounds=YES;_scroll.wantsLayer=YES;_scroll.layer.masksToBounds=YES;
@@ -555,7 +555,7 @@ NSView<DYWorkspaceMaskEditing> *DYCreateWorkspaceMaskEditor(id<PROAPIAccessing>
_document.accessibilityLabel=@"调色参数";_document.identifier=@"inspectorBackground";
if(_scroll){_scroll.documentView=_document;[self addSubview:_scroll];}
else [self addSubview:_document];
if(!_embedded&&!_workspaceEditor){_managedPanel=[[DYManagedColorPanel alloc]initWithManager:_manager renderer:_renderer assetTarget:self];_managedPanel.hidden=NO;[_document addSubview:_managedPanel];}
if(!_embedded&&!_workspaceEditor){_managedPanel=[[DYManagedColorPanel alloc]initWithManager:_manager renderer:_renderer assetTarget:self];_managedPanel.hidden=YES;[_document addSubview:_managedPanel];}
[self buildCards];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(modelChanged:) name:@"DYModelChanged" object:_manager];
[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(themeChanged:) name:DYThemeDidChange object:nil];
@@ -569,21 +569,20 @@ NSView<DYWorkspaceMaskEditing> *DYCreateWorkspaceMaskEditor(id<PROAPIAccessing>
}
[self themeChanged:nil];
[self setAccessibilityLabel:@"大鱼调色检查器"];
// FxPlug snapshots the returned frame when it allocates the host row.
// Supply the document's actual height before that snapshot is taken.
[self refresh];
[self setNeedsLayout:YES];[self layoutSubtreeIfNeeded];
if(!_embedded&&!_workspaceEditor){
// FCP samples the frame once. Measure all expanded modules at the
// narrow supported width and reserve the largest existing tab body.
// FCP allocates the host row once. Measure the useful default stack
// at the narrow width; later expansions scroll within that budget.
CGFloat width=self.frame.size.width;
_measuringFullHeight=YES;[self setFrameSize:NSMakeSize(280,_preferredHeight)];
_measuringDefaultHeight=YES;
[self setFrameSize:NSMakeSize(280,406)];
[self setNeedsLayout:YES];[self layoutSubtreeIfNeeded];
CGFloat measured=_preferredHeight;
_measuringFullHeight=NO;[self setFrameSize:NSMakeSize(width,measured)];
[self setNeedsLayout:YES];[self layoutSubtreeIfNeeded];
_preferredHeight=measured;[self setFrameSize:NSMakeSize(width,measured)];
_maximumViewportHeight=ceil(_stackHeight+212);
_measuringDefaultHeight=NO;
_preferredHeight=_maximumViewportHeight;
[self setFrameSize:NSMakeSize(width,_preferredHeight)];
}
[self setNeedsLayout:YES];[self layoutSubtreeIfNeeded];
}
DYBetaSpanEnd(beta,nil);return self;
}
@@ -636,7 +635,10 @@ NSView<DYWorkspaceMaskEditing> *DYCreateWorkspaceMaskEditor(id<PROAPIAccessing>
- (void)showMosaicMenu:(NSView*)sender {[NSNotificationCenter.defaultCenter postNotificationName:@"DYMosaicMenuRequested" object:_manager userInfo:@{@"anchor":sender}];}
- (void)selectTheme:(NSButton *)button {DYSetThemeIndex(button.tag);}
- (void)toggleColorSettings:(id)sender {
[_managedPanel scrollRectToVisible:_managedPanel.bounds];
_colorSettingsExpanded=!_colorSettingsExpanded;
_managedPanel.hidden=!_colorSettingsExpanded;
_colorSettings.accessibilityValue=_colorSettingsExpanded?@"已展开":@"已折叠";
[self setNeedsLayout:YES];
}
- (void)openWorkspace:(id)sender {
if(_embedded||_workspaceEditor||!self.window||!_renderer)return;
@@ -855,19 +857,11 @@ NSView<DYWorkspaceMaskEditing> *DYCreateWorkspaceMaskEditor(id<PROAPIAccessing>
CGFloat cw=MAX(244,(_scroll?_scroll.contentSize.width:w)-32),y=8;
if(_managedPanel&&!_managedPanel.hidden){_managedPanel.frame=NSMakeRect(28,y,cw-24,_managedPanel.contentHeight);y+=_managedPanel.contentHeight+12;}
for(NSMutableDictionary *c in _cards) {
DYCard *card=c[@"view"];BOOL collapsed=[c[@"collapsed"]boolValue];NSString *key=c[@"section"][@"key"];
DYCard *card=c[@"view"];NSString *key=c[@"section"][@"key"];
BOOL collapsed=_measuringDefaultHeight?![self initiallyExpandedSection:key]:[c[@"collapsed"]boolValue];
card.hidden=[c[@"removed"]boolValue];if(card.hidden){y=[self layoutRepeatedToolsAfter:[@"base:" stringByAppendingString:key] y:y width:w];continue;}
NSArray *body=c[@"body"];CGFloat contentHeight=0;
for(NSView *row in body)if([self showRow:row section:key]&&!collapsed)contentHeight+=[self heightForRow:row];
if(_measuringFullHeight){
NSNumber *selected=[[_tabs[key]retain]autorelease];
for(NSInteger tab=0;tab<9;tab++){
_tabs[key]=@(tab);CGFloat candidate=0;
for(NSView *row in body)if([self showRow:row section:key])candidate+=[self heightForRow:row];
contentHeight=MAX(contentHeight,candidate);
}
if(selected)_tabs[key]=selected;else[_tabs removeObjectForKey:key];
}
[c[@"enabled"]setFrame:NSMakeRect(12,12,20,20)];
BOOL narrow=cw<300;CGFloat titleWidth=MIN(cw-(narrow?60:171),MAX(94,[[(NSButton *)c[@"header"]title]sizeWithAttributes:@{NSFontAttributeName:[NSFont boldSystemFontOfSize:12]}].width+36));
[c[@"header"]setFrame:NSMakeRect(42,8,titleWidth,28)];
@@ -945,7 +939,7 @@ NSView<DYWorkspaceMaskEditing> *DYCreateWorkspaceMaskEditor(id<PROAPIAccessing>
if(_unified&&!_embedded&&!_workspaceEditor){
NSMutableDictionary *views=[NSMutableDictionary dictionary];
for(NSDictionary *card in _cards){NSString *key=card[@"section"][@"key"];NSView *view=card[@"view"];if(!view.hidden)views[[key isEqual:@"output"]?@"output":[@"base:" stringByAppendingString:key]]=view;}
[views addEntriesFromDictionary:_stackViews];y=(_managedPanel&&!_managedPanel.hidden)?NSMaxY(_managedPanel.frame)+12:8;
if(!_measuringDefaultHeight)[views addEntriesFromDictionary:_stackViews];y=(_managedPanel&&!_managedPanel.hidden)?NSMaxY(_managedPanel.frame)+12:8;
for(NSString *ID in _renderOrder){NSView *view=views[ID];if(!view||view.hidden)continue;NSRect frame=view.frame;frame.origin.y=y;view.frame=frame;y+=frame.size.height+([ID hasPrefix:@"base:"]||[ID isEqual:@"output"]?12:0);}
}
for(NSDictionary *card in _cards)if([card[@"section"][@"key"]isEqual:@"output"]){
@@ -954,24 +948,28 @@ NSView<DYWorkspaceMaskEditing> *DYCreateWorkspaceMaskEditor(id<PROAPIAccessing>
}
_stackHeight=y;CGFloat documentWidth=_scroll?_scroll.contentSize.width:w;if(_workspaceEditor)for(NSDictionary *card in _cards)documentWidth=MAX(documentWidth,[card[@"view"]frame].size.width);
_document.frame=NSMakeRect(0,(_embedded||_workspaceEditor)?0:top,documentWidth,_workspaceEditor?_scroll.contentSize.height:y);
_document.frame=NSMakeRect(0,0,documentWidth,_workspaceEditor?_scroll.contentSize.height:y);
if(!_embedded&&!_workspaceEditor){
CGFloat preferred=ceil(top+MAX(12,y));
if(_measuringFullHeight){
if(_managedPanel)preferred+=MAX(0,238-_managedPanel.contentHeight);
// Switching into V4 adds a separate output header. Reserve that
// existing module's measured rows even while legacy mode hides it.
for(NSDictionary *card in _cards)if([card[@"section"][@"key"]isEqual:@"output"]&&[card[@"removed"]boolValue]){
CGFloat output=69+8+12;for(NSView *row in card[@"body"])if([self showRow:row section:@"output"])output+=[self heightForRow:row];preferred+=output;
}
}
// Never delete/re-create a published parameter to resize its host row.
// The host owns attached geometry; detached/new views can be measured.
if(!self.window){_preferredHeight=MAX(_preferredHeight,preferred);[self invalidateIntrinsicContentSize];}
CGFloat budget=_maximumViewportHeight>0?_maximumViewportHeight:top+y;
CGFloat viewport=MIN(MAX(12,y),MAX(12,MIN(h,budget)-top));
_scroll.frame=NSMakeRect(0,top,w,viewport);
_scroll.hasVerticalScroller=y>viewport+.5;
NSPoint origin=_scroll.contentView.bounds.origin;
origin.y=MAX(0,MIN(origin.y,MAX(0,y-viewport)));
[_scroll.contentView scrollToPoint:origin];[_scroll reflectScrolledClipView:_scroll.contentView];
// Keep the row allocation stable; only the inner viewport contracts.
// Never hide/recreate the FxPlug parameter to force host resizing.
[self invalidateIntrinsicContentSize];
}
[self curveOutputChanged:nil];
}
- (id<FxCustomParameterActionAPI_v4>)actionAPI { return [_manager apiForProtocol:@protocol(FxCustomParameterActionAPI_v4)]; }
- (BOOL)initiallyExpandedSection:(NSString*)key {
if(_embedded||_workspaceEditor)return YES;
NSUInteger roots=0;NSString *only=nil;
for(NSDictionary *card in _cards)if(![card[@"removed"]boolValue]&&![card[@"section"][@"key"]isEqual:@"output"]){roots++;only=card[@"section"][@"key"];}
return (roots==1&&[only isEqual:key])||[@[@"primary",@"base",@"spider"]containsObject:key];
}
- (void)refresh {
if(_refreshing||!_manager)return;
id<FxCustomParameterActionAPI_v4> action=[self actionAPI]; if(!action)return;
@@ -990,6 +988,8 @@ NSView<DYWorkspaceMaskEditing> *DYCreateWorkspaceMaskEditor(id<PROAPIAccessing>
for(NSView *row in output[@"body"]){if([row.identifier isEqual:@"toolMasks"])continue;[body removeObjectIdenticalTo:row];[(_unified?output:primary)[@"view"]addSubview:row];if(!_unified)[body addObject:row];}
primary[@"body"]=body;
}
NSDictionary *initialTools=DYReadTools(_embedded?[(DYToolManager*)_manager host]:_manager,t).document;
for(NSMutableDictionary *card in _cards){NSString *type=card[@"section"][@"key"];card[@"removed"]=@([type isEqual:@"output"]?!_unified:!_embedded&&DYBaseToolRemoved(initialTools,type));}
NSMutableDictionary *graphicValues=[NSMutableDictionary dictionary];
for(NSNumber *pid in _controls) {
NSDictionary *r=_controls[pid],*d=r[@"descriptor"]; double v=[d[@"default"] doubleValue];
@@ -1009,11 +1009,12 @@ NSView<DYWorkspaceMaskEditing> *DYCreateWorkspaceMaskEditor(id<PROAPIAccessing>
NSNumber *extra=c[@"section"][@"extraEnabled"];double extraValue=0;
if(extra)[get getFloatValue:&extraValue fromParameter:extra.unsignedIntValue atTime:t];
BOOL enabled=v>=.5||extraValue>=.5;
// Presentation only: retain archived folds for old versions, but
// this inspector opens every existing module before host sizing.
BOOL collapsed=NO;groupingChanged|=collapsed!=[c[@"collapsed"]boolValue];c[@"collapsed"]=@(collapsed);
DYInspectorToken *token=nil;[get getCustomParameterValue:&token fromParameter:DYInspectorParameterID atTime:t];
NSNumber *saved=[token isKindOfClass:DYInspectorToken.class]?token.folds[c[@"section"][@"key"]]:nil;
BOOL collapsed=_workspaceEditor?NO:saved?saved.boolValue:![self initiallyExpandedSection:c[@"section"][@"key"]];
groupingChanged|=collapsed!=[c[@"collapsed"]boolValue];c[@"collapsed"]=@(collapsed);
[c[@"header"]setState:collapsed?NSControlStateValueOff:NSControlStateValueOn];
[c[@"header"]setToolTip:@"本模块已完整展开;双击还原本组"];
[c[@"header"]setToolTip:collapsed?@"展开界面,不改变启用状态;双击还原本组":@"折叠界面,保持当前效果;双击还原本组"];
[c[@"header"]setAccessibilityHelp:[c[@"header"]toolTip]];[c[@"header"]setNeedsDisplay:YES];
[c[@"enabled"]setState:enabled?NSControlStateValueOn:NSControlStateValueOff];
[c[@"enabled"]setImage:[NSImage imageWithSystemSymbolName:enabled?@"eye":@"eye.slash" accessibilityDescription:enabled?@"停用本组":@"启用本组"]];
@@ -1139,8 +1140,15 @@ NSView<DYWorkspaceMaskEditing> *DYCreateWorkspaceMaskEditor(id<PROAPIAccessing>
- (void)toggleSection:(NSButton *)sender {
if(sender.tag<0||sender.tag>=_cards.count)return;
if(!_workspaceEditor){id host=_embedded?[(DYToolManager*)_manager host]:_manager;NSString *node=_embedded?[(DYToolManager*)_manager nodeID]:[@"base:" stringByAppendingString:_cards[sender.tag][@"section"][@"key"]];[NSNotificationCenter.defaultCenter postNotificationName:@"DYWorkspaceToolSelection" object:host userInfo:@{@"node":node,@"source":@"inspector"}];}
// All modules stay expanded so their initial measured host row remains valid.
[sender setState:NSControlStateValueOn];
id<FxCustomParameterActionAPI_v4> action=[self actionAPI];if(!action)return;
[action startAction:self];@try{
id<FxParameterRetrievalAPI_v6> get=[_manager apiForProtocol:@protocol(FxParameterRetrievalAPI_v6)];
DYInspectorToken *old=nil;[get getCustomParameterValue:&old fromParameter:DYInspectorParameterID atTime:action.currentTime];
DYInspectorToken *token=[old isKindOfClass:DYInspectorToken.class]?[[old copy]autorelease]:[[[DYInspectorToken alloc]init]autorelease];
NSMutableDictionary *folds=[[token.folds mutableCopy]autorelease];NSString *key=_cards[sender.tag][@"section"][@"key"];
folds[key]=@(![_cards[sender.tag][@"collapsed"]boolValue]);token.folds=folds;
[[_manager apiForProtocol:@protocol(FxParameterSettingAPI_v6)]setCustomParameterValue:token toParameter:DYInspectorParameterID atTime:action.currentTime];
}@finally{[action endAction:self];}[self postChanged];
}
- (void)useCST:(id)sender {
+1 -1
查看文件
@@ -98,7 +98,7 @@
if([tools[@"mosaic"][@"enabled"]boolValue]){
if(!DYValidToolDocument(tools))return fail(error,@"局部马赛克设置无效。");
FxImageTile *mosaic=[self sourceByApplyingMosaic:tools source:src registry:dst.deviceRegistryID error:error];if(!mosaic)return NO;
NSMutableDictionary *remaining=[[tools mutableCopy]autorelease];[remaining removeObjectForKey:@"mosaic"];[remaining removeObjectForKey:@"mosaicRenderMask"];
NSMutableDictionary *remaining=[[tools mutableCopy]autorelease];[remaining removeObjectForKey:@"mosaic"];[remaining removeObjectForKey:@"mosaicRenderMask"];[remaining removeObjectForKey:@"mosaicRenderMasks"];
return [self renderColorSource:mosaic destination:dst uniforms:u paths:paths spider:spider tools:remaining colorManagement:state hostPrimaries:primaries error:error];
}
if(tools[@"sharedMasks"]){
+1 -1
查看文件
@@ -55,7 +55,7 @@
- (NSDictionary*)mask{for(NSDictionary *m in DYMasksForTool(_document,_nodeID))if([m[@"id"]isEqual:_maskID])return m;return nil;}
- (void)refreshWithDocument:(NSDictionary*)doc time:(CMTime)time{
_refreshing=YES;NSDictionary *saved=[doc copy];[_document release];_document=saved;_time=time;NSArray *masks=DYMasksForTool(doc,_nodeID);if(masks.count)[self buildControls];[_list removeAllItems];NSInteger selected=0,index=0;
for(NSDictionary *m in masks){DYMaskParameters p=DYMaskAtTime(m,time);[_list addItemWithTitle:[NSString stringWithFormat:@"%@ %ld",m[@"stampSource"]?@"仿制图章":@[@"椭圆",@"矩形",@"钢笔",@"线性渐变",@"HSL 选区",@"亮度选区"][p.kind],(long)index+1]];if([m[@"id"]isEqual:_maskID])selected=index;index++;}
for(NSDictionary *m in masks){DYMaskParameters p=DYMaskAtTime(m,time);[_list addItemWithTitle:m[@"label"]?:[NSString stringWithFormat:@"%@ %ld",m[@"stampSource"]?@"仿制图章":@[@"椭圆",@"矩形",@"钢笔",@"线性渐变",@"HSL 选区",@"亮度选区"][p.kind],(long)index+1]];if([m[@"id"]isEqual:_maskID])selected=index;index++;}
if(!masks.count){_contentHeight=0;_drawing=_canvasActive=NO;[_maskID release];_maskID=nil;_refreshing=NO;return;}[_list selectItemAtIndex:selected];if(![_maskID isEqual:masks[selected][@"id"]])_drawing=_canvasActive=NO;[_maskID release];_maskID=[masks[selected][@"id"]copy];NSDictionary *m=[self mask];DYMaskParameters p=DYMaskAtTime(m,time);if(p.kind!=DYMaskBezier)_drawing=NO;
BOOL stamp=m[@"stampSource"]!=nil;_combine.hidden=_invert.hidden=stamp;
_eye.state=[m[@"enabled"]boolValue]?NSControlStateValueOn:NSControlStateValueOff;_eye.image=[NSImage imageWithSystemSymbolName:[m[@"enabled"]boolValue]?@"eye":@"eye.slash" accessibilityDescription:@"启用蒙版"];[_combine selectItemAtIndex:[m[@"combine"]integerValue]];_invert.state=(p.flags&DYMaskInvert)?NSControlStateValueOn:NSControlStateValueOff;
+42 -4
查看文件
@@ -1,3 +1,37 @@
// Privacy needs face boxes only. Keep the more expensive 76-point landmark
// request exclusively for skin protection. Reuse boxes only for identical pixels.
- (NSDictionary*)mosaicFaceSnapshot {@synchronized(_previewLock){return [[_mosaicFaceSnapshot retain]autorelease];}}
- (NSData*)mosaicFaces:(FxImageTile*)source time:(NSDictionary*)time error:(NSError**)error {
NSMutableDictionary *entry=[self device:source.deviceRegistryID error:error];if(!entry)return nil;
id<MTLTexture>texture=[source metalTextureForDevice:entry[@"device"]];if(!texture)return nil;
if(!_faceContext)_faceContext=[[CIContext contextWithMTLDevice:entry[@"device"] options:@{kCIContextCacheIntermediates:@NO}]retain];
CGColorSpaceRef linear=CGColorSpaceCreateWithName(kCGColorSpaceLinearSRGB);
CIImage *input=[CIImage imageWithMTLTexture:texture options:@{kCIImageColorSpace:(id)linear}];CGColorSpaceRelease(linear);if(!input)return nil;
if(source.imageOrigin==kFxImageOrigin_TOP_LEFT)input=[input imageByApplyingTransform:CGAffineTransformMake(1,0,0,-1,0,input.extent.size.height)];
CGFloat scale=MIN(1.,640./MAX(input.extent.size.width,input.extent.size.height));input=[input imageByApplyingTransform:CGAffineTransformMakeScale(scale,scale)];
CGColorSpaceRef srgb=CGColorSpaceCreateWithName(kCGColorSpaceSRGB);CGImageRef cg=[_faceContext createCGImage:input fromRect:input.extent format:kCIFormatRGBA8 colorSpace:srgb];CGColorSpaceRelease(srgb);if(!cg)return nil;
CFDataRef raster=CGDataProviderCopyData(CGImageGetDataProvider(cg));BOOL same=raster&&[_mosaicRaster isEqual:(NSData*)raster];
NSMutableArray *boxes=[NSMutableArray array];
if(same){[boxes addObjectsFromArray:[self mosaicFaceSnapshot][@"boxes"]?:@[]];}
else{
VNDetectFaceRectanglesRequest *request=[VNDetectFaceRectanglesRequest new];request.revision=VNDetectFaceRectanglesRequestRevision3;
VNImageRequestHandler *handler=[[VNImageRequestHandler alloc]initWithCGImage:cg orientation:kCGImagePropertyOrientationUp options:@{}];
BOOL ok=[handler performRequests:@[request] error:error];
if(ok)for(VNFaceObservation *face in request.results){CGRect box=face.boundingBox;if(boxes.count>=DYSharedMaskLimit||face.confidence<.5||box.size.width<.015||box.size.height<.015)continue;
[boxes addObject:@[@(CGRectGetMidX(box)),@(1-CGRectGetMidY(box)),@(box.size.width*1.2),@(box.size.height*1.25)]];
}
[handler release];[request release];
if(!ok){if(raster)CFRelease(raster);CGImageRelease(cg);return nil;}
[boxes sortUsingComparator:^NSComparisonResult(NSArray *a,NSArray *b){NSComparisonResult x=[a[0]compare:b[0]];return x==NSOrderedSame?[a[1]compare:b[1]]:x;}];
std::vector<DYToolMaskEntry> entries;
for(NSArray *box in boxes){DYToolMaskEntry m{};m.section=-102;m.mask.parameters=dyDefaultMaskParameters();auto &p=m.mask.parameters;p.kind=DYMaskRectangle;p.centerX=[box[0]floatValue];p.centerY=[box[1]floatValue];p.width=[box[2]floatValue];p.height=[box[3]floatValue];p.feather=0;entries.push_back(m);}
[_mosaicEntries release];_mosaicEntries=[[NSData alloc]initWithBytes:entries.data() length:entries.size()*sizeof(DYToolMaskEntry)];
[_mosaicRaster release];_mosaicRaster=raster?[(NSData*)raster copy]:nil;
}
if(raster)CFRelease(raster);CGImageRelease(cg);
@synchronized(_previewLock){[_mosaicFaceSnapshot release];_mosaicFaceSnapshot=[@{@"boxes":boxes,@"time":time?:@{}}copy];}
return _mosaicEntries;
}
// Runs on the original frame before grading, then follows the same spatial
// transforms as the picture. Geometry has already been evaluated at render time.
- (FxImageTile*)sourceByApplyingMosaic:(NSDictionary*)tools source:(FxImageTile*)src registry:(uint64_t)registry error:(NSError**)error {
@@ -5,13 +39,17 @@
FxRect image=src.imagePixelBounds,bounds=src.tilePixelBounds;
if(memcmp(&image,&bounds,sizeof(FxRect))!=0){fail(error,@"局部马赛克需要完整源画面。");return nil;}
BOOL face=[settings[@"source"]isEqual:@"face"];
NSDictionary *mask=tools[@"mosaicRenderMask"]?:DYSharedMaskWithID(tools,settings[@"maskID"]);
if(!face&&(!mask||mask[@"stampSource"]||![mask[@"enabled"]boolValue]))return src;
NSMutableArray *masks=[NSMutableArray array];
NSArray *selected=tools[@"mosaicRenderMasks"];
if(!selected){NSMutableArray *raw=[NSMutableArray array];for(NSString *ID in settings[@"maskIDs"]?: (settings[@"maskID"]?@[settings[@"maskID"]]:@[])){NSDictionary *m=DYSharedMaskWithID(tools,ID);if(m)[raw addObject:m];}selected=tools[@"mosaicRenderMask"]?@[tools[@"mosaicRenderMask"]]:raw;}
for(NSDictionary *mask in selected)if(!mask[@"stampSource"]&&[mask[@"enabled"]boolValue]){NSMutableDictionary *m=[[mask mutableCopy]autorelease];m[@"combine"]=@0;[masks addObject:m];}
if(!face&&!masks.count)return src;
NSMutableDictionary *entry=[self device:registry error:error];if(!entry)return nil;
if(face)[self prepareFaceSupport:src];else{[_faceEntries release];_faceEntries=nil;}
NSData *faces=face?[self mosaicFaces:src time:tools[@"renderTime"] error:error]:nil;if(face&&!faces){fail(error,@"当前帧人脸识别失败,请重试或改用跟踪蒙版。");return nil;}
DYToolMaskHeader header{};header.section=face?-102:0;
id<MTLDevice>device=entry[@"device"];id<MTLTexture>input=[src metalTextureForDevice:device];
id<MTLBuffer>buffer=[self maskBuffer:face?@{}:@{@"primary":@[mask]} tile:src device:device header:&header];
NSData *skinEntries=_faceEntries;_faceEntries=faces;
id<MTLBuffer>buffer=[self maskBuffer:face?@{}:@{@"primary":masks} tile:src device:device header:&header];_faceEntries=skinEntries;
MTLTextureDescriptor *desc=[MTLTextureDescriptor texture2DDescriptorWithPixelFormat:MTLPixelFormatRGBA32Float width:input.width height:input.height mipmapped:NO];desc.storageMode=MTLStorageModePrivate;desc.usage=MTLTextureUsageShaderRead|MTLTextureUsageShaderWrite;
id<MTLTexture>output=[[device newTextureWithDescriptor:desc]autorelease];
id<MTLComputePipelineState>pipeline=[self managedKernel:@"dyLocalMosaic" entry:entry error:error];
+3 -1
查看文件
@@ -41,12 +41,14 @@
// remote parameter read and view rebuild for every scalar in the burst.
if(!_modelRefreshPending.exchange(true)){id host=_apiManager;dispatch_async(dispatch_get_main_queue(),^{self->_modelRefreshPending.store(false);[NSNotificationCenter.defaultCenter postNotificationName:DYModelChanged object:host];});}return YES;}
- (BOOL)pluginState:(NSData**)state atTime:(CMTime)t quality:(FxQuality)q error:(NSError**)e{
uint64_t stateSpan=DYBetaSpanBegin(@"plugin_state",nil);@try{
DYUniforms u;DYReadUniforms(_apiManager,t,&u);CMTime frameDuration=kCMTimeInvalid,origin=kCMTimeZero;id<FxTimingAPI_v4>timing=[_apiManager apiForProtocol:@protocol(FxTimingAPI_v4)];if([timing respondsToSelector:@selector(frameDuration:)])[timing frameDuration:&frameDuration];if([timing respondsToSelector:@selector(startTimeForEffect:)])[timing startTimeForEffect:&origin];int64_t frame=DYFilmFrameIndex(t,frameDuration,origin);u.filmFrameKey=DYFilmFrameKey(frame,u.film.grainHold,u.film.grainSeed);DYAssetState*a=DYReadAssets(_apiManager,t);DYToolDocument *tools=DYReadTools(_apiManager,t);[self adoptToolCanvasDocument:tools.document];[_viewerParameterBridge publishUniforms:&u document:tools.document atTime:t];[_viewerParameterBridge publishAssets:a atTime:t];double copyAuto=0;[[_apiManager apiForProtocol:@protocol(FxParameterRetrievalAPI_v6)]getFloatValue:&copyAuto fromParameter:8800 atTime:t];NSDictionary *snapshot=DYToolRenderSnapshot(tools.document,t);for(NSMutableDictionary *node in snapshot[@"layers"])if([node[@"type"]isEqual:@"film"]){DYUniforms layer=DYToolUniforms(node);node[@"filmFrameKey"]=@(DYFilmFrameKey(frame,layer.film.grainHold,layer.film.grainSeed));}NSInteger primaries=-1;id<FxColorGamutAPI_v2>gamut=[_apiManager apiForProtocol:@protocol(FxColorGamutAPI_v2)];if([gamut respondsToSelector:@selector(colorPrimaries)])primaries=gamut.colorPrimaries;NSDictionary*s=@{@"colorManagement":a.colorManagement?:@{},@"hostPrimaries":@(primaries),@"schema":@2,@"tools":snapshot,@"copyAuto":@(copyAuto>.5),@"uniforms":[NSData dataWithBytes:&u length:sizeof(u)],@"paths":a.paths?:@{},@"spider":a.spiderMesh?:[NSData data]};*state=[NSPropertyListSerialization dataWithPropertyList:s format:NSPropertyListBinaryFormat_v1_0 options:0 error:e];return *state!=nil;
}@finally{DYBetaSpanEnd(stateSpan,nil);}
}
- (BOOL)destinationImageRect:(FxRect*)rect sourceImages:(NSArray<FxImageTile*>*)src destinationImage:(FxImageTile*)dst pluginState:(NSData*)s atTime:(CMTime)t error:(NSError**)e{if(!src.count)return NO;*rect=src[0].imagePixelBounds;return YES;}
- (BOOL)sourceTileRect:(FxRect*)rect sourceImageIndex:(NSUInteger)i sourceImages:(NSArray<FxImageTile*>*)src destinationTileRect:(FxRect)dstRect destinationImage:(FxImageTile*)dst pluginState:(NSData*)s atTime:(CMTime)t error:(NSError**)e{if(i>=src.count)return NO;*rect=src[i].imagePixelBounds;return YES;}
- (BOOL)renderDestinationImage:(FxImageTile*)dst sourceImages:(NSArray<FxImageTile*>*)src pluginState:(NSData*)s atTime:(CMTime)t error:(NSError**)e{
if(!src.count||!src[0].ioSurface||!dst.ioSurface||!s.length)return NO;NSDictionary*p=[NSPropertyListSerialization propertyListWithData:s options:NSPropertyListImmutable format:NULL error:e];if(![p isKindOfClass:NSDictionary.class])return NO;NSData*b=p[@"uniforms"];if(![@[@1,@2]containsObject:p[@"schema"]]||![b isKindOfClass:NSData.class]||b.length!=sizeof(DYUniforms)||![p[@"paths"]isKindOfClass:NSDictionary.class])return NO;DYUniforms u;[b getBytes:&u length:sizeof(u)];uint64_t beta=!_betaFirstRenderStarted.exchange(true)?DYBetaSpanBegin(@"first_render",nil):0;BOOL ok=[_renderer renderSource:src[0] destination:dst uniforms:u paths:p[@"paths"] spider:p[@"spider"] tools:p[@"tools"] colorManagement:p[@"colorManagement"] hostPrimaries:p[@"hostPrimaries"]?[p[@"hostPrimaries"]integerValue]:-1 error:e];DYBetaSpanEnd(beta,@{@"status":ok?@"passed":@"failed"});if(!ok)DYBetaEvent(@"render_error",@{@"error_domain":(e&&*e)?(*e).domain:@"unknown",@"error_code":@((e&&*e)?(*e).code:0)});if(ok){[_renderer captureScopeTile:dst atTime:t];@synchronized(self){
if(!src.count||!src[0].ioSurface||!dst.ioSurface||!s.length)return NO;NSDictionary*p=[NSPropertyListSerialization propertyListWithData:s options:NSPropertyListImmutable format:NULL error:e];if(![p isKindOfClass:NSDictionary.class])return NO;NSData*b=p[@"uniforms"];if(![@[@1,@2]containsObject:p[@"schema"]]||![b isKindOfClass:NSData.class]||b.length!=sizeof(DYUniforms)||![p[@"paths"]isKindOfClass:NSDictionary.class])return NO;DYUniforms u;[b getBytes:&u length:sizeof(u)];uint64_t renderSpan=DYBetaSpanBegin(@"render",@{@"width":@(src[0].ioSurface.width),@"height":@(src[0].ioSurface.height),@"layer_count":@([p[@"tools"][@"layers"]count])});uint64_t beta=!_betaFirstRenderStarted.exchange(true)?DYBetaSpanBegin(@"first_render",nil):0;BOOL ok=NO;@try{ok=[_renderer renderSource:src[0] destination:dst uniforms:u paths:p[@"paths"] spider:p[@"spider"] tools:p[@"tools"] colorManagement:p[@"colorManagement"] hostPrimaries:p[@"hostPrimaries"]?[p[@"hostPrimaries"]integerValue]:-1 error:e];}@finally{DYBetaSpanEnd(renderSpan,@{@"status":ok?@"passed":@"failed"});}DYBetaSpanEnd(beta,@{@"status":ok?@"passed":@"failed"});if(!ok)DYBetaEvent(@"render_error",DYBetaErrorFields((e&&*e)?*e:nil,@"render_source"));if(ok){[_renderer captureScopeTile:dst atTime:t];@synchronized(self){
FxRect image=src[0].imagePixelBounds;
double aspect=src[0].pixelAspect,height=image.top-image.bottom,width=image.right-image.left;
_toolSourceAspect=width>0&&height>0&&std::isfinite(aspect)&&aspect>0?width*aspect/height:0;
+2
查看文件
@@ -13,6 +13,8 @@
- (BOOL)exportLUT:(NSURL*)url uniforms:(DYUniforms)uniforms paths:(NSDictionary*)paths spider:(NSData*)spider error:(NSError**)error;
- (BOOL)renderSource:(FxImageTile*)source destination:(FxImageTile*)destination uniforms:(DYUniforms)uniforms paths:(NSDictionary*)paths spider:(NSData*)spider tools:(NSDictionary*)tools error:(NSError**)error;
- (BOOL)exportLUT:(NSURL*)url uniforms:(DYUniforms)uniforms paths:(NSDictionary*)paths spider:(NSData*)spider tools:(NSDictionary*)tools error:(NSError**)error;
// Latest full-frame face rectangles and render time, copied under a short lock.
- (NSDictionary*)mosaicFaceSnapshot;
- (NSData*)preview;
/// Latest final-output bins for the inspector's visible curve controls.
- (NSData*)outputHistogram;
+2 -2
查看文件
@@ -118,7 +118,7 @@ static NSArray *DYPrimaryActiveFinishing(DYUniforms u,NSDictionary *paths,NSData
CFTimeInterval _lastPreview;
BOOL _exporting;
NSDictionary *_toolDocument,*_colorContext,*_exportManagedState;
BOOL _managedFinishing;NSData *_faceEntries,*_faceInput,*_faceCachedEntries;CIContext *_faceContext;
BOOL _managedFinishing;NSData *_faceEntries,*_faceInput,*_faceCachedEntries;CIContext *_faceContext;NSData *_mosaicRaster,*_mosaicEntries;NSDictionary *_mosaicFaceSnapshot;
dispatch_queue_t _scopeQueue;
BOOL _scopeEnabled,_scopeWorkerRunning,_outputHistogramObserved,_outputHistogramNotificationPending;
NSUInteger _scopeGeneration;
@@ -139,7 +139,7 @@ static NSArray *DYPrimaryActiveFinishing(DYUniforms u,NSDictionary *paths,NSData
#include "DYFaceRender.inc.h"
#include "DYToolRender.inc.h"
- (instancetype)init{if((self=[super init])){_previewLock=[NSObject new];_scopeQueue=dispatch_queue_create("com.dayu.color.final-output-scopes",DISPATCH_QUEUE_SERIAL);_devices=[NSMutableDictionary new];_luts=[NSMutableDictionary new];_preparedLUTs=[NSMutableDictionary new];_activeLUTPaths=[NSSet new];_lutPreparationQueue=dispatch_queue_create("com.dayu.color.lut-upload",DISPATCH_QUEUE_SERIAL);dispatch_set_target_queue(_lutPreparationQueue,dispatch_get_global_queue(QOS_CLASS_USER_INITIATED,0));_tables=[DYColorTables new];}return self;}
- (void)dealloc{[_faceEntries release];[_faceInput release];[_faceCachedEntries release];[_faceContext release];[_scopePending release];[_scopeLatest release];[_scopePreview release];[_scopeMetadata release];[_scopeProfile release];dispatch_release(_scopeQueue);[_devices release];[_luts release];[_preparedLUTs release];[_activeLUTPaths release];dispatch_release(_lutPreparationQueue);[_tables release];[_preview release];[_lookLUTPreview release];[_colorContext release];[_previewLock release];[super dealloc];}
- (void)dealloc{[_mosaicRaster release];[_mosaicEntries release];[_mosaicFaceSnapshot release];[_faceEntries release];[_faceInput release];[_faceCachedEntries release];[_faceContext release];[_scopePending release];[_scopeLatest release];[_scopePreview release];[_scopeMetadata release];[_scopeProfile release];dispatch_release(_scopeQueue);[_devices release];[_luts release];[_preparedLUTs release];[_activeLUTPaths release];dispatch_release(_lutPreparationQueue);[_tables release];[_preview release];[_lookLUTPreview release];[_colorContext release];[_previewLock release];[super dealloc];}
- (void)trimPreparedLUTsKeeping:(NSString *)path {
if(_preparedLUTs.count<=12)return;
for(NSString *key in _preparedLUTs.allKeys)if(![_activeLUTPaths containsObject:key]&&![key isEqualToString:path])[_preparedLUTs removeObjectForKey:key];
@@ -61,9 +61,20 @@
run.record(@"native-osc-shape-escape-keeps-author-and-all-shared-bindings",handled&&[before isEqual:DYReadTools(base,kCMTimeZero).document]&&base->_undoStarts==undo&&![[plugin toolCanvasMaskAtTime:kCMTimeZero][@"drawShape"]boolValue]);
selectShape();[osc mouseDownAtPositionX:180 positionY:280 activePart:1 modifiers:0 forceUpdate:&update atTime:kCMTimeZero];[osc mouseUpAtPositionX:180 positionY:280 activePart:1 modifiers:0 forceUpdate:&update atTime:kCMTimeZero];drain();run.record(@"native-osc-shape-click-without-area-does-not-write-or-create-undo",[before isEqual:DYReadTools(base,kCMTimeZero).document]&&base->_undoStarts==undo);
selectShape();[osc mouseDownAtPositionX:180 positionY:280 activePart:1 modifiers:0 forceUpdate:&update atTime:kCMTimeZero];[osc mouseDraggedAtPositionX:400 positionY:160 activePart:1 modifiers:0 forceUpdate:&update atTime:kCMTimeZero];host->_time=CMTimeMake(1,24);[plugin toolCanvasMaskAtTime:host->_time];[osc mouseUpAtPositionX:400 positionY:160 activePart:1 modifiers:0 forceUpdate:&update atTime:host->_time];drain();run.record(@"native-osc-shape-playhead-change-cancels-before-write",[before isEqual:DYReadTools(base,kCMTimeZero).document]&&base->_undoStarts==undo&&![[plugin toolCanvasMaskAtTime:host->_time][@"drawShape"]boolValue]);host->_time=kCMTimeZero;
selectShape();[osc mouseDownAtPositionX:180 positionY:280 activePart:1 modifiers:0 forceUpdate:&update atTime:kCMTimeZero];[osc mouseUpAtPositionX:400 positionY:160 activePart:1 modifiers:0 forceUpdate:&update atTime:kCMTimeZero];host->_time=CMTimeMake(1,24);drain();run.record(@"native-osc-queued-shape-commit-rechecks-host-playhead",[before isEqual:DYReadTools(base,kCMTimeZero).document]&&base->_undoStarts==undo);host->_time=kCMTimeZero;
selectShape();[osc mouseDownAtPositionX:180 positionY:280 activePart:1 modifiers:0 forceUpdate:&update atTime:kCMTimeZero];drain();[osc mouseUpAtPositionX:400 positionY:160 activePart:1 modifiers:0 forceUpdate:&update atTime:kCMTimeZero];host->_time=CMTimeMake(1,24);drain();run.record(@"native-osc-queued-shape-commit-rechecks-host-playhead",[before isEqual:DYReadTools(base,kCMTimeZero).document]&&base->_undoStarts==undo);host->_time=kCMTimeZero;
doc=DYMutablePlist(DYReadTools(base,kCMTimeZero).document);NSMutableDictionary *ellipse=(id)DYSharedMaskWithID(doc,maskID);p=DYMaskAtTime(ellipse,kCMTimeZero);p.kind=DYMaskEllipse;ellipse[@"parameters"]=[NSData dataWithBytes:&p length:sizeof(p)];DYWriteTools(base,doc,kCMTimeZero);selectShape();undo=base->_undoStarts;
[osc mouseDownAtPositionX:488 positionY:149.5 activePart:1 modifiers:0 forceUpdate:&update atTime:kCMTimeZero];[osc mouseUpAtPositionX:208 positionY:275.5 activePart:1 modifiers:0 forceUpdate:&update atTime:kCMTimeZero];drain();p=DYMaskAtTime(DYSharedMaskWithID(DYReadTools(base,kCMTimeZero).document,maskID),kCMTimeZero);run.record(@"native-osc-ellipse-draws-reverse-direction-with-positive-shared-extents",p.kind==DYMaskEllipse&&fabs(p.centerX-.55)<1e-5&&fabs(p.centerY-.5)<1e-5&&fabs(p.width-.5)<1e-5&&fabs(p.height-.4)<1e-5&&base->_undoStarts==undo+1&&base->_undoEnds==undo+1);
// Reproduce FCP's action clock offset while OSC and redraw use different clocks.
host->_time=CMTimeMake(39,25);selectShape();undo=base->_undoStarts;
[osc mouseDownAtPositionX:152 positionY:307 activePart:1 modifiers:0 forceUpdate:&update atTime:kCMTimeZero];drain();
[osc mouseDraggedAtPositionX:432 positionY:181 activePart:1 modifiers:0 forceUpdate:&update atTime:kCMTimeZero];
[osc drawOSCWithWidth:640 height:400 activePart:1 destinationImage:overlay atTime:host->_time];
run.record(@"native-osc-shape-keeps-draft-across-different-redraw-clock",[[plugin toolCanvasMaskAtTime:host->_time][@"shapeStarted"]boolValue]);
[osc mouseUpAtPositionX:488 positionY:149.5 activePart:1 modifiers:0 forceUpdate:&update atTime:kCMTimeZero];drain();
p=DYMaskAtTime(DYSharedMaskWithID(DYReadTools(base,host->_time).document,maskID),kCMTimeZero);
run.record(@"native-osc-mask-release-saves-with-different-action-clock",fabs(p.centerX-.5)<1e-5&&fabs(p.centerY-.45)<1e-5&&fabs(p.width-.6)<1e-5&&fabs(p.height-.5)<1e-5&&base->_undoStarts==undo+1&&base->_undoEnds==undo+1);
NSData *archive=[NSKeyedArchiver archivedDataWithRootObject:DYReadTools(base,host->_time) requiringSecureCoding:YES error:nil];DYToolDocument *restored=[NSKeyedUnarchiver unarchivedObjectOfClass:DYToolDocument.class fromData:archive error:nil];
run.record(@"native-osc-drawn-mask-persists-after-secure-reopen",[restored.document isEqual:DYReadTools(base,host->_time).document]);
[osc release];[plugin release];drain();
}
+21 -8
查看文件
@@ -7,6 +7,19 @@
- (void)discardToolCanvasDraft {
@synchronized(self){[_toolCanvasDraft release];_toolCanvasDraft=nil;[_toolCanvasOriginal release];_toolCanvasOriginal=nil;_toolDrawingPen=_toolDrawingShape=NO;_toolCanvasHasHover=NO;_toolCanvasEditTime=kCMTimeInvalid;++_toolCanvasRevision;}[self postToolCanvasStatus:nil];
}
// OSC and custom actions can use different origins. Capture the action clock
// after the first event, then compare that clock only with itself at commit.
- (void)captureToolCanvasHostTime {
_toolCanvasHostEditTime=kCMTimeInvalid;
NSDictionary *original=[_toolCanvasOriginal retain];CMTime eventTime=_toolCanvasEditTime;
dispatch_async(dispatch_get_main_queue(),^{
id<FxCustomParameterActionAPI_v4>a=[self->_apiManager apiForProtocol:@protocol(FxCustomParameterActionAPI_v4)];if(!a)return;
[a startAction:self];@try{@synchronized(self){
if(self->_toolCanvasOriginal==original&&CMTimeCompare(self->_toolCanvasEditTime,eventTime)==0)
self->_toolCanvasHostEditTime=DYHostDisplayedFrameTime(self->_apiManager,a.currentTime);
}}@finally{[a endAction:self];}
});[original release];
}
- (void)commitToolCanvasDraftAtTime:(CMTime)eventTime {
NSDictionary *draft=nil,*original=nil;NSString *node=nil,*maskID=nil;CMTime time;uint64_t revision;BOOL stampEdit,sourceEdit,resizeStamp;
@synchronized(self){if(!_toolCanvasDraft||!_toolCanvasOriginal)return;if(!CMTIME_IS_NUMERIC(eventTime)||CMTimeCompare(eventTime,_toolCanvasEditTime)!=0){[self discardToolCanvasDraft];[self postToolCanvasStatus:@"播放头已移动,请重新绘制。"];return;}draft=[_toolCanvasDraft copy];original=[_toolCanvasOriginal copy];node=[_selectedToolNode copy];maskID=[_selectedToolMask copy];time=_toolCanvasEditTime;stampEdit=draft[@"stampSource"]!=nil;sourceEdit=_toolDragPart==DYCloneSourcePart;resizeStamp=stampEdit&&_toolDragPart>=2&&_toolDragPart<=5;
@@ -20,10 +33,10 @@
[a startAction:self];@try{
CMTime actionTime=DYHostDisplayedFrameTime(self->_apiManager,a.currentTime);
os_log(OS_LOG_DEFAULT,"dayu_pen_commit stamp=%{public}d event=%{public}.9f action=%{public}.9f nodes=%{public}lu",stampEdit,CMTimeGetSeconds(time),CMTimeGetSeconds(actionTime),(unsigned long)([draft[@"nodes"]length]/sizeof(DYBezierNode)));
if(!CMTIME_IS_NUMERIC(actionTime)||(!stampEdit&&CMTimeCompare(actionTime,time)!=0)){[self postToolCanvasStatus:@"播放头已移动,本次蒙版草稿未写入其它帧。"];return;}
// The stamp document is non-animatable. Preserve the canvas time for the
// geometry and tracking key, and access the document at the host action time.
CMTime writeTime=stampEdit?actionTime:time;
if(!CMTIME_IS_NUMERIC(actionTime)||(!stampEdit&&(!CMTIME_IS_NUMERIC(self->_toolCanvasHostEditTime)||CMTimeCompare(actionTime,self->_toolCanvasHostEditTime)!=0))){[self postToolCanvasStatus:@"播放头已移动,本次蒙版草稿未写入其它帧。"];return;}
// The complete mask document is non-animatable. Key geometry keeps the
// OSC time; document access uses the current host action time.
CMTime writeTime=actionTime;
NSMutableDictionary *doc=DYMutablePlist(DYReadTools(self->_apiManager,writeTime).document),*current=[self toolMask:maskID node:node document:doc];
if(!current||![current isEqual:original]){os_log(OS_LOG_DEFAULT,"dayu_pen_commit conflict current=%{public}d",current!=nil);[self postToolCanvasStatus:@"蒙版已在其它位置修改,本次画面草稿未覆盖它。"];return;}
NSMutableDictionary *result=sourceEdit?[[draft mutableCopy]autorelease]:DYMutablePlist(draft);
@@ -34,7 +47,7 @@
result[@"parameters"]=[NSData dataWithBytes:&authored length:sizeof(authored)];
result[@"keys"]=current[@"keys"];
}else if(!sourceEdit&&[current[@"keys"]count]){DYMaskParameters p=DYMaskAtTime(result,time);if(current[@"stampSource"])result[@"parameters"]=current[@"parameters"];NSMutableArray *keys=[[current[@"keys"]mutableCopy]autorelease];NSIndexSet *same=[keys indexesOfObjectsPassingTest:^BOOL(NSDictionary *key,NSUInteger i,BOOL *stop){return CMTimeCompare(CMTimeMakeWithEpoch([key[@"value"]longLongValue],[key[@"scale"]intValue],[key[@"epoch"]longLongValue]),time)==0;}];[keys removeObjectsAtIndexes:same];[keys addObject:DYStampKey(time,p,YES,1,DYStampMotionAtTime(current,time))];result[@"keys"]=@[];if(!DYMergeTracking(result,keys))return;}
if(DYValidToolMask(result)&&![current isEqual:result]){[current setDictionary:result];id<FxUndoAPI>undo=[self->_apiManager apiForProtocol:@protocol(FxUndoAPI)];[undo startUndoGroup:sourceEdit?@"移动图章取样点":stampEdit?@"编辑仿制图章":@"编辑工具蒙版"];changed=DYWriteTools(self->_apiManager,doc,writeTime);[undo endUndoGroup];if(changed){DYToolDocument *saved=[[[DYToolDocument alloc]init]autorelease];saved.document=doc;[self adoptToolCanvasDocument:saved.document];}else if(stampEdit)[self postToolCanvasStatus:@"宿主未保存图章修改,已保留上一次位置。"];}
if(DYValidToolMask(result)&&![current isEqual:result]){[current setDictionary:result];id<FxUndoAPI>undo=[self->_apiManager apiForProtocol:@protocol(FxUndoAPI)];[undo startUndoGroup:sourceEdit?@"移动图章取样点":stampEdit?@"编辑仿制图章":@"编辑工具蒙版"];changed=DYWriteTools(self->_apiManager,doc,writeTime);[undo endUndoGroup];if(changed){DYToolDocument *saved=[[[DYToolDocument alloc]init]autorelease];saved.document=doc;[self adoptToolCanvasDocument:saved.document];}else [self postToolCanvasStatus:stampEdit?@"宿主未保存图章修改,已保留上一次位置。":@"宿主未保存蒙版修改,请重试。"];}
}@finally{[a endAction:self];}
os_log(OS_LOG_DEFAULT,"dayu_pen_commit result=%{public}d valid=%{public}d",changed,DYValidToolMask(draft));
if(changed)[self postToolCanvasStatus:sourceEdit?@"图章取样点已移动 · 可一次撤销":stampEdit?@"图章已保存 · 可一次撤销":@"蒙版已保存 · 可一次撤销"];
@@ -44,7 +57,7 @@
- (void)toolCanvasCommand:(NSNotification*)notification {
NSDictionary *info=notification.userInfo;@synchronized(self){if(![info[@"node"]isEqual:_selectedToolNode]||![info[@"mask"]isEqual:_selectedToolMask])return;}
CMTime time=CMTimeMakeWithEpoch([info[@"timeValue"]longLongValue],[info[@"timeScale"]intValue],[info[@"timeEpoch"]longLongValue]);
id<FxCustomParameterActionAPI_v4>a=[_apiManager apiForProtocol:@protocol(FxCustomParameterActionAPI_v4)];if(a){[a startAction:self];@try{time=DYHostDisplayedFrameTime(_apiManager,a.currentTime);}@finally{[a endAction:self];}}if(!CMTIME_IS_NUMERIC(time))return;NSString *command=info[@"command"];
id<FxCustomParameterActionAPI_v4>a=[_apiManager apiForProtocol:@protocol(FxCustomParameterActionAPI_v4)];if(a){[a startAction:self];@try{time=DYHostDisplayedFrameTime(_apiManager,a.currentTime);}@finally{[a endAction:self];}}@synchronized(self){if(_toolCanvasDraft&&CMTIME_IS_NUMERIC(_toolCanvasEditTime))time=_toolCanvasEditTime;}if(!CMTIME_IS_NUMERIC(time))return;NSString *command=info[@"command"];
if([command isEqual:@"finish"]||[command isEqual:@"cancel"])[self toolCanvasEvent:NSEventTypeKeyDown point:NSZeroPoint part:1 modifiers:0 key:[command isEqual:@"finish"]?13:27 time:time];
}
- (void)updateToolShapeDraftAtPoint:(NSPoint)point {
@@ -88,11 +101,11 @@
NSDictionary *stamp=[self toolMask:_selectedToolMask node:_selectedToolNode document:_toolCanvasDocument];
if([stamp[@"stampSource"]count]!=4)return;
[self discardToolCanvasDraft];
_toolCanvasOriginal=[stamp mutableCopy];_toolCanvasDraft=[stamp mutableCopy];_toolCanvasEditTime=time;
_toolCanvasOriginal=[stamp mutableCopy];_toolCanvasDraft=[stamp mutableCopy];_toolCanvasEditTime=time;[self captureToolCanvasHostTime];
_toolDragStart=point;_toolDragPart=part;
return;
}
if(!_toolCanvasDraft){NSDictionary *mask=[self toolMask:_selectedToolMask node:_selectedToolNode document:_toolCanvasDocument];if(!mask)return;++_toolCanvasRevision;_toolCanvasOriginal=[DYMutablePlist(mask)retain];_toolCanvasDraft=[DYMutablePlist(mask)retain];_toolCanvasEditTime=time;_toolDragParameters=DYMaskAtTime(mask,time);_toolDragParameters.imageAspect=_toolSourceAspect>0?_toolSourceAspect:1;_toolCanvasDraft[@"parameters"]=[NSData dataWithBytes:&_toolDragParameters length:sizeof(DYMaskParameters)];_toolCanvasDraft[@"keys"]=@[];if(_toolDrawingPen)_toolCanvasDraft[@"nodes"]=[NSData data];}
if(!_toolCanvasDraft){NSDictionary *mask=[self toolMask:_selectedToolMask node:_selectedToolNode document:_toolCanvasDocument];if(!mask)return;++_toolCanvasRevision;_toolCanvasOriginal=[DYMutablePlist(mask)retain];_toolCanvasDraft=[DYMutablePlist(mask)retain];_toolCanvasEditTime=time;[self captureToolCanvasHostTime];_toolDragParameters=DYMaskAtTime(mask,time);_toolDragParameters.imageAspect=_toolSourceAspect>0?_toolSourceAspect:1;_toolCanvasDraft[@"parameters"]=[NSData dataWithBytes:&_toolDragParameters length:sizeof(DYMaskParameters)];_toolCanvasDraft[@"keys"]=@[];if(_toolDrawingPen)_toolCanvasDraft[@"nodes"]=[NSData data];}
if(CMTimeCompare(time,_toolCanvasEditTime)!=0){[self discardToolCanvasDraft];[self postToolCanvasStatus:@"播放头已移动,请重新绘制。"];return;}
_toolDragStart=point;_toolDragPart=part;_toolDragParameters=DYMaskAtTime(_toolCanvasDraft,time);
if(_toolDrawingShape){[self updateToolShapeDraftAtPoint:point];[self postToolCanvasStatus:@"拖出蒙版区域,松开保存;Esc 取消。"];return;}
+1 -1
查看文件
@@ -5,7 +5,7 @@
NSMutableDictionary *_toolCanvasDraft,*_toolCanvasOriginal;NSDictionary *_toolCanvasDocument;
NSPoint _toolCanvasHoverPoint;BOOL _toolCanvasHasHover;
NSPoint _toolDragStart;DYMaskParameters _toolDragParameters;NSInteger _toolDragPart;
CMTime _toolCanvasEditTime;uint64_t _toolCanvasRevision;
CMTime _toolCanvasEditTime,_toolCanvasHostEditTime;uint64_t _toolCanvasRevision;
dy::GrayFrame _toolSourceFrame,_trackingReferenceFrame;
float _toolSourceAspect;
CMTime _toolSourceTime,_trackingReferenceTime,_trackingFrameDuration,_trackingPreviousTime;
+3 -3
查看文件
@@ -148,7 +148,7 @@
- (BOOL)toolCanvasVisible {@synchronized(self){return _selectedToolNode&&_selectedToolMask&&!_toolCanvasHidden;}}
- (DYViewerParameterBridge*)viewerParameterBridge{return _viewerParameterBridge;}
- (NSDictionary*)toolCanvasMaskAtTime:(CMTime)time {
@synchronized(self){if(_toolDrawingShape&&_toolCanvasDraft&&(!CMTIME_IS_NUMERIC(time)||CMTimeCompare(time,_toolCanvasEditTime)!=0)){[self discardToolCanvasDraft];[self postToolCanvasStatus:@"播放头已移动,已取消本次框选。"];}if(_toolCanvasHidden||!_selectedToolMask)return nil;BOOL draftTime=_toolCanvasDraft&&CMTIME_IS_NUMERIC(time)&&CMTIME_IS_NUMERIC(_toolCanvasEditTime)&&CMTimeCompare(time,_toolCanvasEditTime)==0;NSDictionary *m=draftTime?_toolCanvasDraft:[self toolMask:_selectedToolMask node:_selectedToolNode document:_toolCanvasDocument];if(!m)return nil;DYMaskParameters p=DYMaskAtTime(m,time);return @{@"id":m[@"id"],@"parameters":[NSData dataWithBytes:&p length:sizeof(p)],@"nodes":(_toolDrawingPen&&!_toolCanvasDraft)?[NSData data]:(m[@"nodes"]?:[NSData data]),@"drawing":@(_toolDrawingPen),@"drawShape":@(_toolDrawingShape),@"shapeStarted":@(_toolDrawingShape&&_toolCanvasDraft!=nil),@"hover":(_toolDrawingPen&&_toolCanvasHasHover)?@[@(_toolCanvasHoverPoint.x),@(_toolCanvasHoverPoint.y)]:@[],@"coverage":@(_toolShowCoverage),@"stampSource":DYStampSourceAtTime(draftTime&&_toolDragPart!=DYCloneSourcePart&&_toolCanvasOriginal?_toolCanvasOriginal:m,time)?:@[],@"tracking":@(_trackingActive.load())};}
@synchronized(self){if(_toolCanvasHidden||!_selectedToolMask)return nil;BOOL draftTime=_toolCanvasDraft&&CMTIME_IS_NUMERIC(_toolCanvasEditTime);if(draftTime)time=_toolCanvasEditTime;NSDictionary *m=draftTime?_toolCanvasDraft:[self toolMask:_selectedToolMask node:_selectedToolNode document:_toolCanvasDocument];if(!m)return nil;DYMaskParameters p=DYMaskAtTime(m,time);return @{@"id":m[@"id"],@"parameters":[NSData dataWithBytes:&p length:sizeof(p)],@"nodes":(_toolDrawingPen&&!_toolCanvasDraft)?[NSData data]:(m[@"nodes"]?:[NSData data]),@"drawing":@(_toolDrawingPen),@"drawShape":@(_toolDrawingShape),@"shapeStarted":@(_toolDrawingShape&&_toolCanvasDraft!=nil),@"hover":(_toolDrawingPen&&_toolCanvasHasHover)?@[@(_toolCanvasHoverPoint.x),@(_toolCanvasHoverPoint.y)]:@[],@"coverage":@(_toolShowCoverage),@"stampSource":DYStampSourceAtTime(draftTime&&_toolDragPart!=DYCloneSourcePart&&_toolCanvasOriginal?_toolCanvasOriginal:m,time)?:@[],@"tracking":@(_trackingActive.load())};}
}
- (void)toolTrackRequested:(NSNotification*)notification {
NSInteger direction=[notification.userInfo[@"direction"]integerValue];if(direction==9){_trackingCancelled.store(true);return;}@synchronized(self){if(_toolDrawingPen||_toolDrawingShape||_toolCanvasCommitPending){[self postToolCanvasStatus:@"请先完成或取消蒙版绘制,再开始跟踪。"];return;}}if(_trackingActive.load()){[self toolStatus:@"请先取消当前跟踪"];return;}
@@ -232,7 +232,7 @@
return [self finishToolAnalysis:[NSString stringWithFormat:@"%@,已保留 %lu 帧可信轨迹;可调整区域后从此处继续",detail,(unsigned long)_trackingSamples.count] error:error];
}
- (BOOL)analyzeFrame:(FxImageTile*)tile atTime:(CMTime)time error:(NSError**)error {
if(!_trackingActive.load()||_trackingFinishing.load()){if(error)*error=[NSError errorWithDomain:FxPlugErrorDomain code:kFxError_UserCancelled userInfo:nil];return NO;}_trackingInFrame.store(true);@try{
if(!_trackingActive.load()||_trackingFinishing.load()){if(error)*error=[NSError errorWithDomain:FxPlugErrorDomain code:kFxError_UserCancelled userInfo:nil];return NO;}_trackingInFrame.store(true);uint64_t trackingSpan=DYBetaSpanBegin(@"tracking_frame",nil);@try{
if(_trackingCancelled.load())return [self finishToolAnalysis:@"已取消;保留最后连续可信轨迹" error:error];if(_trackingSingle&&_trackingSamples.count>=2)return [self finishToolAnalysis:nil error:error];if(_trackingSamples.count>=DYToolKeyLimit)return [self finishToolAnalysis:@"轨迹已到数量上限,保留已完成部分" error:error];
CMTime expected=CMTIME_IS_NUMERIC(_trackingPreviousTime)?(_trackingBackward?CMTimeSubtract(_trackingPreviousTime,_trackingFrameDuration):CMTimeAdd(_trackingPreviousTime,_trackingFrameDuration)):_trackingReferenceTime;if(!CMTIME_IS_NUMERIC(time)||time.epoch!=expected.epoch||CMTimeCompare(time,expected)!=0)return [self stopToolAnalysis:@"宿主帧序列不连续,停在最后可信帧" error:error];
NSDictionary *preview=nil;
@@ -302,7 +302,7 @@
if(stamp)os_log(OS_LOG_DEFAULT,"dayu_stamp_track_pair time=%{public}.6f target=%{public}.5f,%{public}.5f source=%{public}.5f,%{public}.5f target_scale=%{public}.4f,%{public}.4f source_scale=%{public}.4f,%{public}.4f",CMTimeGetSeconds(time),target.cx,target.cy,source.cx,source.cy,motion.targetScaleX,motion.targetScaleY,motion.sourceScaleX,motion.sourceScaleY);
}
return YES;
}@finally{_trackingInFrame.store(false);}
}@finally{DYBetaSpanEnd(trackingSpan,nil);_trackingInFrame.store(false);}
}
- (BOOL)cleanupAnalysis:(NSError**)error {
if(!_trackingActive.load()||_trackingFinishing.exchange(true))return YES;BOOL changed=_trackingSamples.count>1;if(changed&&!DYMergeTracking(_trackingCandidate,_trackingSamples,_trackingFrameDuration)){[_trackingMessage release];_trackingMessage=[@"轨迹合并失败,原蒙版已保留" copy];_trackingDiscard=YES;}
+1 -1
查看文件
@@ -55,6 +55,6 @@
// Synchronous notification here can re-enter the host's ViewBridge callback.
}
- (CGFloat)layoutRepeatedToolsAfter:(NSString*)anchor y:(CGFloat)y width:(CGFloat)w {if(_embedded||_workspaceEditor)return y;for(NSString *ID in _stackOrder)if([_stackRoots[ID]isEqual:anchor]){DYInspector *child=_stackViews[ID];child->_measuringFullHeight=_measuringFullHeight;child.frame=NSMakeRect(0,y,w,MAX(60,child->_stackHeight));[child setNeedsLayout:YES];[child layoutSubtreeIfNeeded];child->_measuringFullHeight=NO;CGFloat height=MAX(60,child->_stackHeight);child.frame=NSMakeRect(0,y,w,height);y+=height;}return y;}
- (CGFloat)layoutRepeatedToolsAfter:(NSString*)anchor y:(CGFloat)y width:(CGFloat)w {if(_embedded||_workspaceEditor||_measuringDefaultHeight)return y;for(NSString *ID in _stackOrder)if([_stackRoots[ID]isEqual:anchor]){DYInspector *child=_stackViews[ID];child.frame=NSMakeRect(0,y,w,MAX(60,child->_stackHeight));[child setNeedsLayout:YES];[child layoutSubtreeIfNeeded];CGFloat height=MAX(60,child->_stackHeight);child.frame=NSMakeRect(0,y,w,height);y+=height;}return y;}
- (void)resetRepeatedTool{if(!_embedded)return;id<PROAPIAccessing>host=[(DYToolManager*)_manager host];id<FxCustomParameterActionAPI_v4>a=[host apiForProtocol:@protocol(FxCustomParameterActionAPI_v4)];if(!a)return;[a startAction:self];@try{NSMutableDictionary *doc=DYMutablePlist(DYReadTools(host,a.currentTime).document);NSMutableDictionary *node=(id)DYToolWithID(doc,[(DYToolManager*)_manager nodeID]);if(!node)return;NSDictionary *fresh=DYNewTool(node[@"type"]);node[@"values"]=DYMutablePlist(fresh[@"values"]);if(DYPrimaryColorState(DYReadAssets(host,a.currentTime).colorManagement)){DYUniforms root;DYReadUniforms(host,a.currentTime,&root);DYSeedPrimaryWorkingSpace(node,root.cm.workingTransfer,root.cm.workingGamut);}node[@"paths"]=@{};[node removeObjectForKey:@"spider"];node[@"spiderLinked"]=@YES;id<FxUndoAPI>undo=[host apiForProtocol:@protocol(FxUndoAPI)];[undo startUndoGroup:@"还原独立工具层"];DYWriteTools(host,doc,a.currentTime);[undo endUndoGroup];}@finally{[a endAction:self];}[self postChanged];}
+7 -2
查看文件
@@ -89,6 +89,7 @@ NSDictionary *DYNewMask(NSInteger kind){if(kind<0||kind>5)return nil;DYMaskParam
NSDictionary *DYNewTool(NSString *type){if(![DYToolTypes()containsObject:type])return nil;return @{@"id":NSUUID.UUID.UUIDString,@"type":type,@"values":[type isEqual:@"skin"]?@{@"skinStrength":@0}:[type isEqual:@"primary"]?@{@"cmtoneMapping":@0}:@{},@"paths":@{},@"spiderLinked":@YES,@"masks":@[]};}
BOOL DYValidToolMask(NSDictionary *mask){
if(![mask isKindOfClass:NSDictionary.class]||!validID(mask[@"id"])||!finiteNumber(mask[@"enabled"])||!finiteNumber(mask[@"combine"])||[mask[@"combine"]integerValue]<0||[mask[@"combine"]integerValue]>2)return NO;
if(mask[@"label"]&&(![mask[@"label"]isKindOfClass:NSString.class]||[mask[@"label"]length]>100))return NO;
DYMaskParameters p;if(!readParameters(mask[@"parameters"],&p))return NO;NSData *nodes=mask[@"nodes"];if(![nodes isKindOfClass:NSData.class]||nodes.length%sizeof(DYBezierNode)||nodes.length>32*sizeof(DYBezierNode))return NO;
id source=mask[@"stampSource"];
if(source){
@@ -116,8 +117,10 @@ static NSData *DYValidatedToolData(NSDictionary *doc){
if(mosaic){
if(![mosaic isKindOfClass:NSDictionary.class]||!finiteNumber(mosaic[@"enabled"])||![@[@0,@1]containsObject:mosaic[@"enabled"]]||![@[@"face",@"mask"]containsObject:mosaic[@"source"]]||!finiteNumber(mosaic[@"size"])||[mosaic[@"size"]doubleValue]<4||[mosaic[@"size"]doubleValue]>128)return nil;
if(mosaic[@"maskID"]&&!validID(mosaic[@"maskID"]))return nil;
if(mosaic[@"maskIDs"]){id ids=mosaic[@"maskIDs"];if(![ids isKindOfClass:NSArray.class]||[ids count]>DYSharedMaskLimit)return nil;NSMutableSet *seen=[NSMutableSet set];for(id ID in ids){if(!validID(ID)||[seen containsObject:ID])return nil;[seen addObject:ID];}}
}
if(doc[@"mosaicRenderMask"]&&!DYValidToolMask(doc[@"mosaicRenderMask"]))return nil;
if(doc[@"mosaicRenderMasks"]){if(![doc[@"mosaicRenderMasks"]isKindOfClass:NSArray.class]||[doc[@"mosaicRenderMasks"]count]>DYSharedMaskLimit)return nil;for(id m in doc[@"mosaicRenderMasks"])if(!DYValidToolMask(m))return nil;}
if(starter&&![DYToolTypes() containsObject:starter]&&![starter isEqual:@"cst"])return nil;
if(level&&(!finiteNumber(level)||fabs([level doubleValue])>M_PI))return nil;
id measured=doc[@"levelMeasureOnly"],reference=doc[@"levelReference"];
@@ -370,8 +373,10 @@ NSDictionary *DYToolRenderSnapshot(NSDictionary *doc,CMTime t){
return result;
};
NSMutableDictionary *out=[[doc mutableCopy]autorelease],*base=[NSMutableDictionary dictionary];
NSString *mosaicID=doc[@"mosaic"][@"maskID"];
for(NSDictionary *mask in shared)if(!mask[@"stampSource"]&&[mask[@"id"]isEqual:mosaicID])out[@"mosaicRenderMask"]=resolve(@[mask]).firstObject;
NSArray *mosaicIDs=doc[@"mosaic"][@"maskIDs"]?: (doc[@"mosaic"][@"maskID"]?@[doc[@"mosaic"][@"maskID"]]:@[]);
NSMutableArray *mosaicMasks=[NSMutableArray array];for(NSDictionary *mask in shared)if(!mask[@"stampSource"]&&[mosaicIDs containsObject:mask[@"id"]])[mosaicMasks addObject:mask];
out[@"mosaicRenderMasks"]=resolve(mosaicMasks);[out removeObjectForKey:@"mosaicRenderMask"];
if(CMTIME_IS_NUMERIC(t))out[@"renderTime"]=[(NSDictionary*)CMTimeCopyAsDictionary(t,kCFAllocatorDefault)autorelease];
for(NSString *type in doc[@"baseMasks"])base[type]=resolve(doc[@"baseMasks"][type]);out[@"baseMasks"]=base;
NSMutableArray *layers=[NSMutableArray array];
for(NSDictionary *node in doc[@"layers"]){NSMutableDictionary *layer=[[node mutableCopy]autorelease];layer[@"masks"]=resolve(node[@"masks"]);[layers addObject:layer];}
@@ -106,34 +106,68 @@ static BOOL DYViewerSanitizeValue(NSDictionary *d,double input,double *output) {
if(![DYToolTypes()containsObject:type])return;
dispatch_async(dispatch_get_main_queue(),^{id manager=nil;@synchronized(self){if(!self->_invalidated)manager=self->_apiManager;}if(manager)[NSNotificationCenter.defaultCenter postNotificationName:@"DYViewerToolRequested" object:manager userInfo:@{@"type":type}];});
}
- (void)mosaicMessage:(NSString*)message {
NSAlert *alert=[[[NSAlert alloc]init]autorelease];alert.messageText=@"局部马赛克";alert.informativeText=message;[alert runModal];
}
- (void)applyMosaicMenu:(NSMenuItem*)item {
id manager=nil;@synchronized(self){if(!_invalidated)manager=_apiManager;}if(!manager)return;
id<FxCustomParameterActionAPI_v4>a=[manager apiForProtocol:@protocol(FxCustomParameterActionAPI_v4)];[a startAction:self];
NSDictionary *command=item.representedObject;BOOL imported=NO,changed=NO;NSString *selected=nil,*failure=nil;
id<FxCustomParameterActionAPI_v4>a=[manager apiForProtocol:@protocol(FxCustomParameterActionAPI_v4)];if(!a)return;[a startAction:self];
@try{
NSMutableDictionary *doc=DYMutablePlist(DYReadTools(manager,a.currentTime).document);
NSMutableDictionary *settings=[NSMutableDictionary dictionaryWithDictionary:doc[@"mosaic"]?:@{@"enabled":@NO,@"source":@"face",@"size":@32}];
[settings addEntriesFromDictionary:item.representedObject];
if([settings[@"source"]isEqual:@"mask"]&&!DYSharedMaskWithID(doc,settings[@"maskID"]))return;
if(command[@"importFaces"]){
NSDictionary *snapshot=command[@"importFaces"];
CMTime menuTime=CMTimeMakeFromDictionary((CFDictionaryRef)command[@"actionTime"]);
CMTime frameTime=CMTimeMakeFromDictionary((CFDictionaryRef)snapshot[@"time"]);
CMTime current=DYHostDisplayedFrameTime(manager,a.currentTime);
if(!CMTIME_IS_NUMERIC(frameTime)||CMTimeCompare(menuTime,current)!=0||CMTimeCompare(frameTime,current)!=0){failure=@"播放头或识别画面已变化,请暂停画面后重新打开菜单。";return;}
NSArray *boxes=snapshot[@"boxes"];if(!boxes.count){failure=@"本帧未识别到人脸,可用矩形或钢笔手动画出区域。";return;}
if(DYSharedMasks(doc).count+boxes.count>DYSharedMaskLimit){failure=@"共享蒙版数量不足,请删除不需要的蒙版后重试。";return;}
NSMutableArray *IDs=[NSMutableArray array];NSUInteger index=0;
for(NSArray *box in boxes){NSMutableDictionary *mask=(id)DYAddSharedMask(doc,DYMaskRectangle);if(!mask){failure=@"未能创建人脸蒙版,原设置已保留。";return;}
DYMaskParameters p=DYMaskAtTime(mask,kCMTimeInvalid);p.centerX=[box[0]floatValue];p.centerY=[box[1]floatValue];p.width=[box[2]floatValue];p.height=[box[3]floatValue];p.feather=0;
mask[@"parameters"]=[NSData dataWithBytes:&p length:sizeof(p)];
mask[@"label"]=[NSString stringWithFormat:@"人脸 %lu · 横向 %.0f%%",(unsigned long)++index,p.centerX*100];
[IDs addObject:mask[@"id"]];
}
settings[@"maskIDs"]=IDs;settings[@"source"]=@"mask";settings[@"enabled"]=@YES;[settings removeObjectForKey:@"maskID"];selected=IDs.firstObject;imported=YES;
}else if(command[@"toggleMask"]){
NSString *ID=command[@"toggleMask"];if(!DYSharedMaskWithID(doc,ID)){failure=@"这个蒙版已被删除,请重新选择。";return;}
NSMutableArray *IDs=[NSMutableArray arrayWithArray:[settings[@"source"]isEqual:@"mask"]?(settings[@"maskIDs"]?: (settings[@"maskID"]?@[settings[@"maskID"]]:@[])):@[]];
if([IDs containsObject:ID])[IDs removeObject:ID];else{[IDs addObject:ID];selected=ID;}
settings[@"source"]=@"mask";settings[@"maskIDs"]=IDs;settings[@"enabled"]=@(IDs.count>0);[settings removeObjectForKey:@"maskID"];
}else [settings addEntriesFromDictionary:command];
doc[@"mosaic"]=settings;id<FxUndoAPI>undo=[manager apiForProtocol:@protocol(FxUndoAPI)];
if([undo startUndoGroup:@"局部马赛克"]){DYWriteTools(manager,doc,a.currentTime);[undo endUndoGroup];}
}@finally{[a endAction:self];}
[_renderer invalidatePreview];[NSNotificationCenter.defaultCenter postNotificationName:DYModelChanged object:manager];
if([undo startUndoGroup:imported?@"创建可选人脸马赛克蒙版":@"局部马赛克"]){@try{changed=DYWriteTools(manager,doc,a.currentTime);}@finally{[undo endUndoGroup];}}
if(!changed){failure=@"宿主未保存本次马赛克设置,请重试。";return;}
if(selected)[NSNotificationCenter.defaultCenter postNotificationName:@"DYToolCanvasSelection" object:manager userInfo:@{@"node":@"shared",@"mask":selected,@"document":doc}];
}@finally{[a endAction:self];if(failure)[self mosaicMessage:failure];}
if(changed){[_renderer invalidatePreview];[NSNotificationCenter.defaultCenter postNotificationName:DYModelChanged object:manager];}
if(imported)[self requestWorkspacePage:@"masks"];
}
- (void)mosaicMenuRequested:(NSNotification*)note {[self requestMosaicMenuFromView:note.userInfo[@"anchor"]];}
- (void)requestMosaicMenu {[self requestMosaicMenuFromView:nil];}
- (void)requestMosaicMenuFromView:(NSView*)anchor {
dispatch_async(dispatch_get_main_queue(),^{
id manager=nil;@synchronized(self){if(!self->_invalidated)manager=self->_apiManager;}if(!manager)return;
id<FxCustomParameterActionAPI_v4>a=[manager apiForProtocol:@protocol(FxCustomParameterActionAPI_v4)];[a startAction:self];NSDictionary *doc=nil;
@try{doc=[DYReadTools(manager,a.currentTime).document retain];}@finally{[a endAction:self];}
id<FxCustomParameterActionAPI_v4>a=[manager apiForProtocol:@protocol(FxCustomParameterActionAPI_v4)];[a startAction:self];NSDictionary *doc=nil;CMTime actionTime=kCMTimeInvalid;
@try{doc=[DYReadTools(manager,a.currentTime).document retain];actionTime=DYHostDisplayedFrameTime(manager,a.currentTime);}@finally{[a endAction:self];}
NSMenu *menu=[[[NSMenu alloc]initWithTitle:@"局部马赛克"]autorelease];NSDictionary *settings=doc[@"mosaic"];
auto add=[&](NSString *title,NSDictionary *value,BOOL checked){NSMenuItem *item=[menu addItemWithTitle:title action:@selector(applyMosaicMenu:) keyEquivalent:@""];item.target=self;item.representedObject=value;item.state=checked?NSControlStateValueOn:NSControlStateValueOff;};
add(@"应用到人脸(逐帧识别)",@{@"source":@"face",@"enabled":@YES},[settings[@"enabled"]boolValue]&&[settings[@"source"]isEqual:@"face"]);
NSInteger count=0;
for(NSDictionary *mask in DYSharedMasks(doc)){if(mask[@"stampSource"])continue;count++;DYMaskParameters p=DYMaskAtTime(mask,kCMTimeInvalid);NSString *shape=@[@"椭圆",@"矩形",@"钢笔",@"渐变",@"HSL",@"亮度"][p.kind];
add([NSString stringWithFormat:@"应用到蒙版 %ld · %@%@",(long)count,shape,[mask[@"keys"]count]?@" · 已跟踪":@""],@{@"source":@"mask",@"maskID":mask[@"id"],@"enabled":@YES},[settings[@"enabled"]boolValue]&&[settings[@"source"]isEqual:@"mask"]&&[settings[@"maskID"]isEqual:mask[@"id"]]);
add(@"全部人脸 · 快速逐帧识别",@{@"source":@"face",@"enabled":@YES},[settings[@"enabled"]boolValue]&&[settings[@"source"]isEqual:@"face"]);
NSDictionary *faces=[self->_renderer mosaicFaceSnapshot];
CMTime faceTime=faces[@"time"]?CMTimeMakeFromDictionary((CFDictionaryRef)faces[@"time"]):kCMTimeInvalid;
BOOL current=CMTIME_IS_NUMERIC(actionTime)&&CMTIME_IS_NUMERIC(faceTime)&&CMTimeCompare(faceTime,actionTime)==0&&[settings[@"source"]isEqual:@"face"]&&[settings[@"enabled"]boolValue];
if(current&&[faces[@"boxes"]count])add([NSString stringWithFormat:@"将本帧 %lu 张人脸转为可选跟踪蒙版",(unsigned long)[faces[@"boxes"]count]],@{@"importFaces":faces,@"actionTime":[(NSDictionary*)CMTimeCopyAsDictionary(actionTime,kCFAllocatorDefault)autorelease]},NO);
else {NSMenuItem *hint=[menu addItemWithTitle:current?@"本帧未识别到人脸":@"先开启全部人脸,暂停后再次打开以指定人脸" action:nil keyEquivalent:@""];hint.enabled=NO;}
[menu addItem:NSMenuItem.separatorItem];
NSMenuItem *hint=[menu addItemWithTitle:@"勾选要遮挡的蒙版(可多选);在控制面板逐个跟踪" action:nil keyEquivalent:@""];hint.enabled=NO;
NSArray *IDs=settings[@"maskIDs"]?: (settings[@"maskID"]?@[settings[@"maskID"]]:@[]);NSInteger count=0;
for(NSDictionary *mask in DYSharedMasks(doc)){if(mask[@"stampSource"])continue;count++;DYMaskParameters p=DYMaskAtTime(mask,kCMTimeInvalid);NSString *shape=mask[@"label"]?:[NSString stringWithFormat:@"蒙版 %ld · %@",(long)count,@[@"椭圆",@"矩形",@"钢笔",@"渐变",@"HSL",@"亮度"][p.kind]];
add([shape stringByAppendingString:[mask[@"keys"]count]?@" · 已跟踪":@" · 静态"],@{@"toggleMask":mask[@"id"]},[settings[@"enabled"]boolValue]&&[settings[@"source"]isEqual:@"mask"]&&[IDs containsObject:mask[@"id"]]);
}
if(!count){NSMenuItem *hint=[menu addItemWithTitle:@"先用矩形、椭圆或钢笔绘制蒙版" action:nil keyEquivalent:@""];hint.enabled=NO;}
if(!count){NSMenuItem *empty=[menu addItemWithTitle:@"也可用矩形、椭圆或钢笔绘制蒙版" action:nil keyEquivalent:@""];empty.enabled=NO;}
[menu addItem:NSMenuItem.separatorItem];
for(NSNumber *size in @[@8,@16,@32,@64,@96,@128])add([NSString stringWithFormat:@"方块大小:%@",size],@{@"size":size},[settings[@"size"]isEqual:size]);
[menu addItem:NSMenuItem.separatorItem];add(@"关闭局部马赛克",@{@"enabled":@NO},![settings[@"enabled"]boolValue]);
+2 -2
查看文件
@@ -61,9 +61,9 @@
if(DYUnifiedColorState(DYReadAssets(host,_toolTime).colorManagement))ordered=[NSMutableArray arrayWithArray:DYUnifiedRenderOrder(document)];
for(NSString*ID in [ordered reverseObjectEnumerator]){if([ID isEqual:@"output"]){[rows addObject:@{@"node":ID,@"type":@"output",@"title":@"输出转换",@"enabled":@(rootUniforms.cm.outputEnabled>.5),@"kind":@"output"}];continue;}NSDictionary*node=DYToolWithID(document,ID);NSString*type=node?node[@"type"]:[ID substringFromIndex:5];if(!node&&![self workspaceBaseVisible:type document:document time:_toolTime])continue;
NSString*title=titles[ID]?:([ID isEqual:@"base:primary"]&&[document[@"starterTool"]isEqual:@"cst"]?@"CST 色彩空间转换":DYToolSection(type)[@"title"]?:type);[rows addObject:@{@"node":ID,@"type":type,@"title":title,@"enabled":@(DYWorkspaceEnabled(node?DYToolUniforms(node):rootUniforms,type)),@"kind":@"tool",@"maskCount":@(DYMasksForTool(document,ID).count)}];
for(NSDictionary*mask in DYMasksForTool(document,ID)){[assignedMasks addObject:mask[@"id"]];DYMaskParameters p=DYMaskAtTime(mask,_toolTime);NSString*name=@[@"椭圆",@"矩形",@"钢笔",@"渐变",@"HSL",@"亮度"][p.kind];[rows addObject:@{@"node":ID,@"mask":mask[@"id"],@"enabled":mask[@"enabled"],@"title":[@" ◩ " stringByAppendingString:name],@"kind":@"mask"}];}
for(NSDictionary*mask in DYMasksForTool(document,ID)){[assignedMasks addObject:mask[@"id"]];DYMaskParameters p=DYMaskAtTime(mask,_toolTime);NSString*name=mask[@"label"]?:@[@"椭圆",@"矩形",@"钢笔",@"渐变",@"HSL",@"亮度"][p.kind];[rows addObject:@{@"node":ID,@"mask":mask[@"id"],@"enabled":mask[@"enabled"],@"title":[@" ◩ " stringByAppendingString:name],@"kind":@"mask"}];}
}
for(NSDictionary*mask in DYSharedMasks(document))if(!DYToolIDsForSharedMask(document,mask[@"id"]).count){DYMaskParameters p=DYMaskAtTime(mask,_toolTime);[rows addObject:@{@"node":@"shared",@"mask":mask[@"id"],@"enabled":mask[@"enabled"],@"title":mask[@"stampSource"]?@"◩ 仿制图章":[@"◩ 未分配 · " stringByAppendingString:@[@"椭圆",@"矩形",@"钢笔",@"渐变",@"HSL",@"亮度"][p.kind]],@"kind":@"mask"}];}
for(NSDictionary*mask in DYSharedMasks(document))if(!DYToolIDsForSharedMask(document,mask[@"id"]).count){DYMaskParameters p=DYMaskAtTime(mask,_toolTime);[rows addObject:@{@"node":@"shared",@"mask":mask[@"id"],@"enabled":mask[@"enabled"],@"title":mask[@"stampSource"]?@"◩ 仿制图章":[@"◩ " stringByAppendingString:mask[@"label"]?:[@"未分配 · " stringByAppendingString:@[@"椭圆",@"矩形",@"钢笔",@"渐变",@"HSL",@"亮度"][p.kind]]],@"kind":@"mask"}];}
}@finally{[action endAction:self];}
[_toolDocument release];_toolDocument=document;[_layerRows release];_layerRows=[rows copy];[_layerTable reloadData];
NSString *requested=note.userInfo[@"scrollToTool"];if(requested.length){_hasUserSelection=YES;[_selectedNode release];_selectedNode=[requested copy];[_selectedMask release];_selectedMask=nil;}
+3 -3
查看文件
@@ -17,9 +17,9 @@
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>1.17.0</string>
<string>1.18.0</string>
<key>CFBundleVersion</key>
<string>102</string>
<string>105</string>
<key>NSHumanReadableCopyright</key>
<string></string>
<key>PlugInKit</key>
@@ -71,7 +71,7 @@
<key>uuid</key>
<string>1C17B73B-F229-4C09-A434-EAF6DFF5F22A</string>
<key>version</key>
<string>1.17.0</string>
<string>1.18.0</string>
</dict>
<dict>
<key>className</key>
+4
查看文件
@@ -13,3 +13,7 @@ FOUNDATION_EXPORT void DYBetaSetEnabled(BOOL enabled);
FOUNDATION_EXPORT NSDictionary *DYBetaStatus(void);
FOUNDATION_EXPORT void DYBetaSendSummary(void);
FOUNDATION_EXPORT BOOL DYBetaAllowedURL(NSURL *url, BOOL download);
// Pure evidence parsing also used by offline regression checks; never transmits input.
FOUNDATION_EXPORT NSDictionary *DYBetaCrashEvidence(NSDictionary *header, NSDictionary *body);
FOUNDATION_EXPORT NSString *DYBetaSampleFrames(NSString *sample);
FOUNDATION_EXPORT NSDictionary *DYBetaErrorFields(NSError *error, NSString *stage);
+136 -45
查看文件
@@ -7,6 +7,8 @@
#include <signal.h>
#include <fcntl.h>
#include <unistd.h>
#include <libproc.h>
#include <sys/resource.h>
NSString *const DYBetaDiagnosticsChanged = @"DYBetaDiagnosticsChanged";
static NSString *const DYBetaPreferenceDomain = @"com.dayu.color.preferences";
@@ -14,7 +16,8 @@ static std::atomic_bool gEnabled(true);
static std::atomic_uint_fast64_t gSpan(0);
static std::atomic<double> gMainReply(0);
static NSObject *gSpanLock, *gStatusLock;
static NSMutableDictionary *gActive;
static NSMutableDictionary *gActive, *gMetrics;
static void mainPulse(CFRunLoopTimerRef timer,void *context){gMainReply.store(NSProcessInfo.processInfo.systemUptime);}
static NSDictionary *gStatus;
static BOOL gProduct;
@@ -26,7 +29,7 @@ BOOL DYBetaAllowedURL(NSURL *url, BOOL download) {
}
NSDictionary *DYBetaSafeFields(NSDictionary *fields) {
static NSSet *allowed; static dispatch_once_t once;
dispatch_once(&once,^{allowed=[[NSSet alloc]initWithArray:@[@"phase",@"stage",@"pipeline",@"duration_ms",@"status",@"error_domain",@"error_code",@"exception",@"signal",@"frames",@"report_time",@"count",@"pending",@"model",@"os_version",@"fcp_version",@"cpu_cores",@"memory_gb",@"gpu",@"main_delay_ms",@"active_stages",@"source_version"]];});
dispatch_once(&once,^{allowed=[[NSSet alloc]initWithArray:@[@"phase",@"stage",@"pipeline",@"duration_ms",@"status",@"error_domain",@"error_code",@"exception",@"signal",@"frames",@"report_time",@"count",@"pending",@"model",@"os_version",@"fcp_version",@"cpu_cores",@"memory_gb",@"gpu",@"main_delay_ms",@"active_stages",@"source_version",@"source_build",@"process_role",@"termination_namespace",@"termination_code",@"pid",@"resource_kind",@"memory_mb",@"cpu_percent",@"thread_count",@"uptime_s",@"max_duration_ms",@"average_ms",@"width",@"height",@"layer_count",@"mask_count",@"sample_status"]];});
NSMutableDictionary *out=[NSMutableDictionary dictionary];
if(![fields isKindOfClass:NSDictionary.class])return @{};
for (NSString *key in fields) {
@@ -43,9 +46,11 @@ NSDictionary *DYBetaSafeFields(NSDictionary *fields) {
return out;
}
#include "DYBetaEvidence.inc.h"
@interface DYBetaTransport : NSObject <NSURLSessionTaskDelegate> {
@public
dispatch_queue_t queue;
dispatch_queue_t queue, evidenceQueue;
dispatch_source_t timer;
NSMutableArray *pending;
NSMutableSet *seenCrashes;
@@ -56,13 +61,18 @@ NSDictionary *DYBetaSafeFields(NSDictionary *fields) {
NSNumber *build;
NSURL *folder, *journal;
NSDictionary *environment;
NSTimeInterval nextAttempt, lastTick, lastStall;
NSTimeInterval nextAttempt, lastTick, lastStall, lastMaintenance, lastSample, sampleWindow, previousCPU, previousResourceTime, startedAt;
NSUInteger sampleCount;
BOOL sampling;
BOOL ready;
}
- (void)enqueue:(NSString *)event fields:(NSDictionary *)fields;
- (void)drain;
- (void)persist;
- (void)scanCrashSummaries;
- (NSUInteger)recoverPending;
- (NSDictionary *)resources:(double)now;
- (void)captureSample:(NSString *)stage;
@end
static DYBetaTransport *transport;
static void publishStatus(NSDictionary *values) {
@@ -79,6 +89,8 @@ static NSString *sysctlString(const char *key) {
- (instancetype)init {
if((self=[super init])) {
queue=dispatch_queue_create("com.dayu.color.beta-diagnostics",DISPATCH_QUEUE_SERIAL);
evidenceQueue=dispatch_queue_create("com.dayu.color.beta-evidence",DISPATCH_QUEUE_SERIAL);
dispatch_set_target_queue(evidenceQueue,dispatch_get_global_queue(QOS_CLASS_UTILITY,0));
pending=[NSMutableArray new];seenCrashes=[NSMutableSet new];lastEvents=[NSMutableDictionary new];sessionID=[NSUUID.UUID.UUIDString.lowercaseString copy];
source=[([NSBundle.mainBundle.bundleIdentifier isEqual:@"com.dayu.color.XPC"]?@"plugin":@"app")copy];
version=[[NSBundle.mainBundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"]copy];build=@([[NSBundle.mainBundle objectForInfoDictionaryKey:@"CFBundleVersion"]integerValue]);[build retain];
@@ -89,6 +101,13 @@ static NSString *sysctlString(const char *key) {
NSUserDefaults *prefs=preferences();[prefs registerDefaults:@{@"betaDiagnosticsEnabled":@YES}];gEnabled.store([prefs boolForKey:@"betaDiagnosticsEnabled"]);
folder=[[[NSFileManager.defaultManager URLsForDirectory:NSApplicationSupportDirectory inDomains:NSUserDomainMask].firstObject URLByAppendingPathComponent:@"com.dayu.color/Beta" isDirectory:YES]retain];
[NSFileManager.defaultManager createDirectoryAtURL:folder withIntermediateDirectories:YES attributes:@{NSFilePosixPermissions:@0700} error:nil];
// A process can exit while the independent sampler is writing. Only remove our stale samples.
if([source isEqual:@"app"])for(NSURL *file in [NSFileManager.defaultManager contentsOfDirectoryAtURL:folder includingPropertiesForKeys:@[NSURLContentModificationDateKey] options:0 error:nil]) {
NSString *name=file.lastPathComponent;
if(![name hasPrefix:@"sample-"]||![[[NSUUID alloc]initWithUUIDString:[name substringFromIndex:7]]autorelease])continue;
NSDate *date=nil;[file getResourceValue:&date forKey:NSURLContentModificationDateKey error:nil];
if(date&&date.timeIntervalSinceNow< -300)[NSFileManager.defaultManager removeItemAtURL:file error:nil];
}
// O_EXCL gives the APP and XPC one random installation ID without hardware UUIDs.
NSURL *identity=[folder URLByAppendingPathComponent:@"installation.txt"];
NSString *newID=NSUUID.UUID.UUIDString.lowercaseString;
@@ -108,12 +127,25 @@ static NSString *sysctlString(const char *key) {
for(NSString *ID in @[@"com.apple.FinalCut",@"com.apple.FinalCutApp"]){NSURL *url=[NSWorkspace.sharedWorkspace URLForApplicationWithBundleIdentifier:ID];if(url){fcp=[[NSBundle bundleWithURL:url]objectForInfoDictionaryKey:@"CFBundleShortVersionString"]?:@"unknown";break;}}
environment=[@{@"model":sysctlString("hw.model"),@"os_version":NSProcessInfo.processInfo.operatingSystemVersionString,@"fcp_version":fcp,@"cpu_cores":@(NSProcessInfo.processInfo.processorCount),@"memory_gb":@(double(memory)/(1024*1024*1024))}copy];
journal=[[folder URLByAppendingPathComponent:[NSString stringWithFormat:@"pending-%d-%@.json",getpid(),sessionID]]retain];
NSArray *seen=[NSArray arrayWithContentsOfURL:[folder URLByAppendingPathComponent:@"seen-crashes.plist"]];
for(id key in seen)if([key isKindOfClass:NSString.class]&&[[[NSUUID alloc]initWithUUIDString:key]autorelease])[seenCrashes addObject:key];
NSUInteger recovered=[self recoverPending];
ready=YES;gMainReply.store(NSProcessInfo.processInfo.systemUptime);lastTick=gMainReply.load();startedAt=lastTick;
NSMutableDictionary *start=[[environment mutableCopy]autorelease];start[@"pid"]=@(getpid());[self enqueue:@"process_start" fields:start];if(recovered)[self enqueue:@"previous_session_pending" fields:@{@"count":@(recovered)}];
publishStatus(@{@"installation_id":installationID,@"enabled":@(gEnabled.load()),@"pending":@(pending.count)});
timer=dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER,0,0,queue);
dispatch_source_set_timer(timer,dispatch_time(DISPATCH_TIME_NOW,2*NSEC_PER_SEC),3*NSEC_PER_SEC,NSEC_PER_SEC/4);
dispatch_source_set_event_handler(timer,^{@autoreleasepool{[self tick];}});dispatch_resume(timer);
[NSDistributedNotificationCenter.defaultCenter addObserver:self selector:@selector(settingsChanged:) name:@"com.dayu.color.beta.preferences" object:nil];
if([source isEqual:@"app"])[self scanCrashSummaries];
}
- (NSUInteger)recoverPending {
NSArray *files=[NSFileManager.defaultManager contentsOfDirectoryAtURL:folder includingPropertiesForKeys:@[NSURLContentModificationDateKey] options:NSDirectoryEnumerationSkipsHiddenFiles error:nil];
NSUInteger recovered=0;
for(NSURL *url in files){if(![url.lastPathComponent hasPrefix:@"pending-"]||![url.pathExtension isEqual:@"json"])continue;
NSNumber *bytes=nil;[url getResourceValue:&bytes forKey:NSURLFileSizeKey error:nil];if(bytes.unsignedLongLongValue>384*1024)continue;
NSDictionary *old=[NSJSONSerialization JSONObjectWithData:[NSData dataWithContentsOfURL:url]?:[NSData data] options:0 error:nil];if(![old isKindOfClass:NSDictionary.class])continue;
if(![old[@"pid"]isKindOfClass:NSNumber.class])continue;int pid=[old[@"pid"]intValue];if(pid>0&&kill(pid,0)==0)continue;
if(![old[@"pid"]isKindOfClass:NSNumber.class])continue;int pid=[old[@"pid"]intValue];if(pid==getpid()||pid<=0||kill(pid,0)==0||errno!=ESRCH)continue;
NSDate *date=nil;[url getResourceValue:&date forKey:NSURLContentModificationDateKey error:nil];
if(gEnabled.load()&&date.timeIntervalSinceNow> -7*86400&&[old[@"events"]isKindOfClass:NSArray.class])for(NSDictionary *event in old[@"events"]){if(pending.count>=256)break;
if(![event isKindOfClass:NSDictionary.class]||![event[@"event_id"]isKindOfClass:NSString.class]||![event[@"session_id"]isKindOfClass:NSString.class]||
@@ -123,36 +155,32 @@ static NSString *sysctlString(const char *key) {
NSMutableDictionary *safe=[[event mutableCopy]autorelease];safe[@"fields"]=DYBetaSafeFields(event[@"fields"]);[pending addObject:safe];recovered++;}
[NSFileManager.defaultManager removeItemAtURL:url error:nil];
}
ready=YES;gMainReply.store(NSProcessInfo.processInfo.systemUptime);lastTick=gMainReply.load();
[self enqueue:@"process_start" fields:environment];if(recovered)[self enqueue:@"previous_session_pending" fields:@{@"count":@(recovered)}];
publishStatus(@{@"installation_id":installationID,@"enabled":@(gEnabled.load()),@"pending":@(pending.count)});
timer=dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER,0,0,queue);
dispatch_source_set_timer(timer,dispatch_time(DISPATCH_TIME_NOW,2*NSEC_PER_SEC),3*NSEC_PER_SEC,NSEC_PER_SEC/4);
dispatch_source_set_event_handler(timer,^{@autoreleasepool{[self tick];}});dispatch_resume(timer);
[NSDistributedNotificationCenter.defaultCenter addObserver:self selector:@selector(settingsChanged:) name:@"com.dayu.color.beta.preferences" object:nil];
if([source isEqual:@"app"])[self scanCrashSummaries];
return recovered;
}
- (void)enqueue:(NSString *)event fields:(NSDictionary *)fields {
if(!ready||!gEnabled.load())return;
// A bad render must not turn diagnostics into per-frame disk writes.
if([@[@"render_error",@"inspector_refresh"]containsObject:event]){
double now=NSProcessInfo.processInfo.systemUptime;if(now-[lastEvents[event]doubleValue]<5)return;lastEvents[event]=@(now);
if([@[@"render_error",@"inspector_refresh",@"render",@"plugin_state",@"tracking_frame"]containsObject:event]){
double now=NSProcessInfo.processInfo.systemUptime;if(now-[lastEvents[event]doubleValue]<([event isEqual:@"render_error"]?5:30))return;lastEvents[event]=@(now);
}
if(pending.count>=256)[pending removeObjectsInRange:NSMakeRange(0,32)];
[pending addObject:@{@"event_id":NSUUID.UUID.UUIDString.lowercaseString,@"session_id":sessionID,@"source":source,@"version":version?:@"0.0",@"build":build?:@1,@"event":event,@"occurred_at":@(NSDate.date.timeIntervalSince1970),@"fields":DYBetaSafeFields(fields?:@{})}];
NSMutableDictionary *context=[[DYBetaSafeFields(fields?:@{})mutableCopy]autorelease];if(!context[@"pid"])context[@"pid"]=@(getpid());
if([NSProcessInfo.processInfo.arguments containsObject:@"--diagnostics-probe"])context[@"phase"]=@"verification";
[pending addObject:@{@"event_id":NSUUID.UUID.UUIDString.lowercaseString,@"session_id":sessionID,@"source":source,@"version":version?:@"0.0",@"build":build?:@1,@"event":event,@"occurred_at":@(NSDate.date.timeIntervalSince1970),@"fields":context}];
[self persist];
}
- (void)persist {
if(!journal)return;
NSData *data=[NSJSONSerialization dataWithJSONObject:@{@"pid":@(getpid()),@"events":pending} options:0 error:nil];
if(data.length>384*1024){while(pending.count>64)[pending removeObjectAtIndex:0];data=[NSJSONSerialization dataWithJSONObject:@{@"pid":@(getpid()),@"events":pending} options:0 error:nil];}
while(data.length>384*1024&&pending.count>1){[pending removeObjectAtIndex:0];data=[NSJSONSerialization dataWithJSONObject:@{@"pid":@(getpid()),@"events":pending} options:0 error:nil];}
[data writeToURL:journal options:NSDataWritingAtomic error:nil];chmod(journal.fileSystemRepresentation,0600);
}
- (void)drain {
if(!ready||!gEnabled.load()||sending||!pending.count||NSDate.date.timeIntervalSince1970<nextAttempt)return;
NSArray *batch=[[pending subarrayWithRange:NSMakeRange(0,MIN((NSUInteger)16,pending.count))]copy];
NSData *data=[NSJSONSerialization dataWithJSONObject:@{@"bundle_id":@"com.dayu.color",@"installation_id":installationID,@"events":batch} options:0 error:nil];
if(data.length>98304){[pending removeObjectAtIndex:0];[batch release];[self persist];return;}
while(data.length>98304&&batch.count>1){NSArray *smaller=[[batch subarrayWithRange:NSMakeRange(0,batch.count-1)]copy];[batch release];batch=smaller;data=[NSJSONSerialization dataWithJSONObject:@{@"bundle_id":@"com.dayu.color",@"installation_id":installationID,@"events":batch} options:0 error:nil];}
if(!data||data.length>98304){[pending removeObjectAtIndex:0];[batch release];[self persist];return;}
NSMutableURLRequest *request=[NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://dayu.media/wp-json/dayu-color/v1/diagnostics"]];request.HTTPMethod=@"POST";request.HTTPBody=data;[request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
sending=[[session dataTaskWithRequest:request completionHandler:^(NSData *body,NSURLResponse *response,NSError *error){
dispatch_async(self->queue,^{@autoreleasepool{
@@ -160,20 +188,66 @@ static NSString *sysctlString(const char *key) {
NSSet *accepted=[reply[@"event_ids"]isKindOfClass:NSArray.class]?[NSSet setWithArray:reply[@"event_ids"]]:[NSSet set];
NSSet *expected=[NSSet setWithArray:[batch valueForKey:@"event_id"]];
BOOL ok=!error&&[(NSHTTPURLResponse*)response statusCode]==200&&[reply[@"accepted"]isKindOfClass:NSNumber.class]&&[reply[@"accepted"]boolValue]&&[accepted isEqualToSet:expected];
if(ok){NSIndexSet *remove=[self->pending indexesOfObjectsPassingTest:^BOOL(NSDictionary *event,NSUInteger i,BOOL *stop){return [accepted containsObject:event[@"event_id"]];}];[self->pending removeObjectsAtIndexes:remove];self->nextAttempt=0;
if(ok){
BOOL acknowledgedCrash=NO;
for(NSDictionary *event in batch)if([event[@"event"]isEqual:@"crash_summary"]){[self->seenCrashes addObject:event[@"event_id"]];acknowledgedCrash=YES;}
if(acknowledgedCrash){NSArray *seen=self->seenCrashes.allObjects;if(seen.count>1024){seen=[seen subarrayWithRange:NSMakeRange(seen.count-1024,1024)];[self->seenCrashes setSet:[NSSet setWithArray:seen]];}
NSURL *seenURL=[self->folder URLByAppendingPathComponent:@"seen-crashes.plist"];[seen writeToURL:seenURL atomically:YES];chmod(seenURL.fileSystemRepresentation,0600);}
NSIndexSet *remove=[self->pending indexesOfObjectsPassingTest:^BOOL(NSDictionary *event,NSUInteger i,BOOL *stop){return [accepted containsObject:event[@"event_id"]];}];[self->pending removeObjectsAtIndexes:remove];self->nextAttempt=0;
publishStatus(@{@"installation_id":self->installationID,@"enabled":@(gEnabled.load()),@"pending":@(self->pending.count),@"last_upload":@([NSDate.date timeIntervalSince1970])});
}else self->nextAttempt=NSDate.date.timeIntervalSince1970+30;
[self->sending release];self->sending=nil;[batch release];[self persist];
}});
}]retain];[sending resume];
}
- (NSDictionary *)resources:(double)now {
struct proc_taskinfo info={};NSMutableDictionary *result=[NSMutableDictionary dictionaryWithDictionary:@{@"pid":@(getpid()),@"uptime_s":@(now-startedAt)}];
if(proc_pidinfo(getpid(),PROC_PIDTASKINFO,0,&info,sizeof(info))==sizeof(info)) {
result[@"memory_mb"]=@(double(info.pti_resident_size)/(1024*1024));result[@"thread_count"]=@(info.pti_threadnum);
double cpu=(info.pti_total_user+info.pti_total_system)/1e9;
if(previousResourceTime>0&&now>previousResourceTime)result[@"cpu_percent"]=@(MAX(0.,(cpu-previousCPU)/(now-previousResourceTime)*100));
previousCPU=cpu;previousResourceTime=now;
}return result;
}
- (void)captureSample:(NSString *)stage {
double now=NSProcessInfo.processInfo.systemUptime;
if(sampling||now-lastSample<120)return;
if(now-sampleWindow>3600){sampleWindow=now;sampleCount=0;}if(sampleCount>=6)return;
sampling=YES;lastSample=now;sampleCount++;
dispatch_async(evidenceQueue,^{@autoreleasepool{
NSURL *output=[self->folder URLByAppendingPathComponent:[@"sample-" stringByAppendingString:NSUUID.UUID.UUIDString]];
NSTask *task=[[[NSTask alloc]init]autorelease];task.executableURL=[NSURL fileURLWithPath:@"/usr/bin/sample"];
// Sample first, then symbolize; -mayDie preloads symbols and can miss a short hang.
task.arguments=@[[@(getpid())stringValue],@"1",@"10",@"-file",output.path];
task.standardOutput=[NSFileHandle fileHandleWithNullDevice];task.standardError=[NSFileHandle fileHandleWithNullDevice];
NSString *result=@"unavailable",*frames=@"";NSError *error=nil;
if(gEnabled.load()&&[task launchAndReturnError:&error]) {
double deadline=NSProcessInfo.processInfo.systemUptime+30;
while(task.running&&gEnabled.load()&&NSProcessInfo.processInfo.systemUptime<deadline)[NSThread sleepForTimeInterval:.05];
if(task.running){[task terminate];[NSThread sleepForTimeInterval:.1];if(task.running)kill(task.processIdentifier,SIGKILL);result=@"timeout_or_disabled";}
else if(task.terminationStatus==0){NSNumber *size=nil;[output getResourceValue:&size forKey:NSURLFileSizeKey error:nil];if(size.unsignedLongLongValue<=4*1024*1024)frames=DYBetaSampleFrames([NSString stringWithContentsOfURL:output encoding:NSUTF8StringEncoding error:nil]);result=frames.length?@"captured":@"no_frames";}
}
[NSFileManager.defaultManager removeItemAtURL:output error:nil];
dispatch_async(self->queue,^{@autoreleasepool{self->sampling=NO;[self enqueue:@"hang_sample" fields:@{@"stage":stage,@"sample_status":result,@"frames":frames,@"pid":@(getpid())}];[self drain];}});
}});
}
- (void)tick {
double now=NSProcessInfo.processInfo.systemUptime;
if(now-lastTick>15)gMainReply.store(now); // Sleep/wake and timer coalescing are not proof of a hang.
lastTick=now;
if(gEnabled.load()&&now-gMainReply.load()>6&&now-lastStall>30){lastStall=now;[self enqueue:@"main_thread_stall" fields:@{@"status":@"suspected",@"main_delay_ms":@((now-gMainReply.load())*1000),@"active_stages":[self activeStages:now]}];}
else if(gEnabled.load()&&now-lastStall>30){NSString *stages=[self activeStages:now];if(stages.length){lastStall=now;[self enqueue:@"operation_stall" fields:@{@"status":@"suspected",@"active_stages":stages}];}}
dispatch_async(dispatch_get_main_queue(),^{gMainReply.store(NSProcessInfo.processInfo.systemUptime);});
BOOL suspended=now-lastTick>15;lastTick=now;
if(suspended)gMainReply.store(now); // Sleep/wake or process suspension isn't a measured hang.
if(gEnabled.load()) {
NSString *stages=[self activeStages:now];double delay=now-gMainReply.load();
if((delay>6||stages.length)&&now-lastStall>30){lastStall=now;NSMutableDictionary *fields=[[[self resources:now]mutableCopy]autorelease];
fields[@"status"]=@"suspected";fields[@"main_delay_ms"]=@(delay*1000);fields[@"active_stages"]=stages;
NSString *event=delay>6?@"main_thread_stall":@"operation_stall";[self enqueue:event fields:fields];[self captureSample:event];
}
if(now-lastMaintenance>=60){lastMaintenance=now;
[self enqueue:@"process_health" fields:[self resources:now]];
NSDictionary *metrics;@synchronized(gSpanLock){metrics=[[gMetrics copy]autorelease];[gMetrics removeAllObjects];}
for(NSString *stage in metrics){NSMutableDictionary *fields=[[metrics[stage]mutableCopy]autorelease];fields[@"stage"]=stage;fields[@"average_ms"]=@([fields[@"duration_ms"]doubleValue]/MAX(1,[fields[@"count"]integerValue]));[self enqueue:@"performance_summary" fields:fields];}
if([source isEqual:@"app"]){NSUInteger recovered=[self recoverPending];if(recovered)[self enqueue:@"previous_session_pending" fields:@{@"count":@(recovered)}];[self scanCrashSummaries];}
}
}
[self drain];
}
- (NSString *)activeStages:(double)now {
@@ -183,7 +257,7 @@ static NSString *sysctlString(const char *key) {
}
- (void)settingsChanged:(NSNotification *)note {
dispatch_async(queue,^{@autoreleasepool{NSUserDefaults *prefs=preferences();[prefs synchronize];gEnabled.store([prefs objectForKey:@"betaDiagnosticsEnabled"]?[prefs boolForKey:@"betaDiagnosticsEnabled"]:YES);
if(!gEnabled.load()){[self->sending cancel];[self->pending removeAllObjects];[self persist];}
if(!gEnabled.load()){[self->sending cancel];[self->pending removeAllObjects];[self persist];@synchronized(gSpanLock){[gActive removeAllObjects];[gMetrics removeAllObjects];}}
publishStatus(@{@"installation_id":self->installationID?:@"",@"enabled":@(gEnabled.load()),@"pending":@(self->pending.count)});
}});
}
@@ -191,34 +265,44 @@ static NSString *sysctlString(const char *key) {
completionHandler(DYBetaAllowedURL(request.URL,NO)?request:nil);
}
- (void)scanCrashSummaries {
if(!gEnabled.load())return;
if(!gEnabled.load()||![source isEqual:@"app"])return;
NSURL *reports=[NSFileManager.defaultManager.homeDirectoryForCurrentUser URLByAppendingPathComponent:@"Library/Logs/DiagnosticReports"];
NSArray *files=[NSFileManager.defaultManager contentsOfDirectoryAtURL:reports includingPropertiesForKeys:@[NSURLContentModificationDateKey,NSURLFileSizeKey] options:NSDirectoryEnumerationSkipsHiddenFiles error:nil];
NSUInteger count=0;
for(NSURL *url in files){if(count>=12)break;if(![url.pathExtension isEqual:@"ips"])continue;
files=[files sortedArrayUsingComparator:^NSComparisonResult(NSURL *a,NSURL *b){NSDate *ad=nil,*bd=nil;[a getResourceValue:&ad forKey:NSURLContentModificationDateKey error:nil];[b getResourceValue:&bd forKey:NSURLContentModificationDateKey error:nil];return [(bd?:NSDate.distantPast) compare:ad?:NSDate.distantPast];}];
NSUInteger count=0,examined=0;
NSMutableSet *queued=[NSMutableSet setWithArray:[pending valueForKey:@"event_id"]];
for(NSURL *url in files){if(count>=12||examined++>=512||pending.count>=240)break;
if(![url.pathExtension isEqual:@"ips"]||![url.lastPathComponent hasPrefix:@"大鱼调色"])continue;
NSNumber *size=nil;[url getResourceValue:&size forKey:NSURLFileSizeKey error:nil];if(size.unsignedLongLongValue>8*1024*1024)continue;
NSDate *date=nil;[url getResourceValue:&date forKey:NSURLContentModificationDateKey error:nil];if(date.timeIntervalSinceNow< -7*86400)continue;
NSFileHandle *handle=[NSFileHandle fileHandleForReadingFromURL:url error:nil];NSData *head=[handle readDataUpToLength:8192 error:nil];[handle closeFile];
if(!head.length)continue;NSString *prefix=[[[NSString alloc]initWithData:head encoding:NSUTF8StringEncoding]autorelease];NSRange first=[prefix rangeOfString:@"\n"];if(!prefix||first.location==NSNotFound)continue;
NSDictionary *header=[NSJSONSerialization JSONObjectWithData:[[prefix substringToIndex:first.location]dataUsingEncoding:NSUTF8StringEncoding] options:0 error:nil];if(![header isKindOfClass:NSDictionary.class]||![header[@"bundleID"]isEqual:@"com.dayu.color.XPC"])continue;
NSData *data=[NSData dataWithContentsOfURL:url options:NSDataReadingMappedIfSafe error:nil];if(!data.length)continue;NSString *text=[[[NSString alloc]initWithData:data encoding:NSUTF8StringEncoding]autorelease];NSRange newline=[text rangeOfString:@"\n"];if(!text||newline.location==NSNotFound)continue;
NSString *key=header[@"incident_id"];if(![key isKindOfClass:NSString.class]||![[[NSUUID alloc]initWithUUIDString:key]autorelease])continue;if([seenCrashes containsObject:key])continue;[seenCrashes addObject:key];
NSDictionary *body=[NSJSONSerialization JSONObjectWithData:[[text substringFromIndex:newline.location+1]dataUsingEncoding:NSUTF8StringEncoding] options:0 error:nil];
if(![body isKindOfClass:NSDictionary.class])continue;NSDictionary *exception=[body[@"exception"]isKindOfClass:NSDictionary.class]?body[@"exception"]:@{};
NSInteger fault=[body[@"faultingThread"]isKindOfClass:NSNumber.class]?[body[@"faultingThread"]integerValue]:-1;NSArray *threads=body[@"threads"];NSMutableArray *frames=[NSMutableArray array];
if([threads isKindOfClass:NSArray.class]&&fault>=0&&fault<threads.count&&[threads[fault]isKindOfClass:NSDictionary.class]&&[threads[fault][@"frames"]isKindOfClass:NSArray.class])for(NSDictionary *frame in threads[fault][@"frames"]){if(frames.count>=30)break;if(![frame isKindOfClass:NSDictionary.class])continue;NSString *symbol=frame[@"symbol"];if([symbol isKindOfClass:NSString.class]&&![symbol containsString:@"/"])[frames addObject:symbol];}
[self enqueue:@"crash_summary" fields:@{@"source_version":header[@"app_version"]?:@"unknown",@"report_time":header[@"timestamp"]?:@"unknown",@"exception":exception[@"type"]?:@"unknown",@"signal":exception[@"signal"]?:@"unknown",@"frames":[frames componentsJoinedByString:@"\n"]}];
if(pending.count){NSMutableDictionary *event=[[pending.lastObject mutableCopy]autorelease];event[@"event_id"]=key.lowercaseString;[pending replaceObjectAtIndex:pending.count-1 withObject:event];[self persist];}count++;
NSDate *date=nil;[url getResourceValue:&date forKey:NSURLContentModificationDateKey error:nil];if(!date||date.timeIntervalSinceNow< -7*86400)continue;
NSData *data=[NSData dataWithContentsOfURL:url options:NSDataReadingMappedIfSafe error:nil];if(!data.length)continue;
NSString *text=[[[NSString alloc]initWithData:data encoding:NSUTF8StringEncoding]autorelease];if(!text)continue;
NSRange newline=[text rangeOfString:@"\n"];if(newline.location==NSNotFound)continue;
NSDictionary *header=DYBetaDictionary([NSJSONSerialization JSONObjectWithData:[[text substringToIndex:newline.location]dataUsingEncoding:NSUTF8StringEncoding] options:0 error:nil]);
NSString *key=DYBetaString(header[@"incident_id"]).lowercaseString;
if(![[[NSUUID alloc]initWithUUIDString:key]autorelease]||[seenCrashes containsObject:key]||[queued containsObject:key])continue;
NSDictionary *body=DYBetaDictionary([NSJSONSerialization JSONObjectWithData:[[text substringFromIndex:newline.location+1]dataUsingEncoding:NSUTF8StringEncoding] options:0 error:nil]);
if(!body.count)continue;NSDictionary *fields=DYBetaCrashEvidence(header,body);if(!fields)continue;
NSUInteger before=pending.count;[self enqueue:@"crash_summary" fields:fields];
if(pending.count==before+1){NSMutableDictionary *event=[[pending.lastObject mutableCopy]autorelease];event[@"event_id"]=key;[pending replaceObjectAtIndex:pending.count-1 withObject:event];[queued addObject:key];[self persist];count++;}
}
}
@end
void DYBetaStart(void) {
static dispatch_once_t once;dispatch_once(&once,^{
NSString *ID=NSBundle.mainBundle.bundleIdentifier;
gProduct=([ID isEqual:@"com.dayu.color"]||[ID isEqual:@"com.dayu.color.XPC"])&&![NSProcessInfo.processInfo.arguments containsObject:@"--self-test"];
gSpanLock=[NSObject new];gStatusLock=[NSObject new];gActive=[NSMutableDictionary new];
if(gProduct)transport=[DYBetaTransport new];
gSpanLock=[NSObject new];gStatusLock=[NSObject new];gActive=[NSMutableDictionary new];gMetrics=[NSMutableDictionary new];
if(gProduct){
NSUserDefaults *prefs=preferences();gEnabled.store([prefs objectForKey:@"betaDiagnosticsEnabled"]?[prefs boolForKey:@"betaDiagnosticsEnabled"]:YES);
gMainReply.store(NSProcessInfo.processInfo.systemUptime);
// Common modes continue to pulse while menus / file panels run nested loops.
CFRunLoopTimerRef pulse=CFRunLoopTimerCreate(NULL,CFAbsoluteTimeGetCurrent()+1,1,0,0,mainPulse,NULL);
CFRunLoopAddTimer(CFRunLoopGetMain(),pulse,kCFRunLoopCommonModes);CFRelease(pulse);
transport=[DYBetaTransport new];
}
});
}
BOOL DYBetaEnabled(void){DYBetaStart();return gEnabled.load();}
@@ -226,8 +310,15 @@ void DYBetaSetEnabled(BOOL enabled){DYBetaStart();gEnabled.store(enabled);NSUser
NSDictionary *DYBetaStatus(void){DYBetaStart();return statusSnapshot();}
void DYBetaEvent(NSString *event,NSDictionary *fields){DYBetaStart();if(!gProduct||!gEnabled.load())return;NSDictionary *safe=DYBetaSafeFields(fields?:@{});dispatch_async(transport->queue,^{@autoreleasepool{[transport enqueue:event fields:safe];}});}
uint64_t DYBetaSpanBegin(NSString *stage,NSDictionary *fields){DYBetaStart();if(!gProduct||!gEnabled.load())return 0;uint64_t token=++gSpan;NSDictionary *value=@{@"stage":stage,@"start":@(NSProcessInfo.processInfo.systemUptime),@"fields":DYBetaSafeFields(fields?:@{})};@synchronized(gSpanLock){if(gActive.count>=128)return 0;gActive[@(token)]=value;}
if(![stage isEqual:@"inspector_refresh"]){NSMutableDictionary *begin=[[value[@"fields"]mutableCopy]autorelease];begin[@"phase"]=@"begin";DYBetaEvent(stage,begin);}return token;
if(![@[@"inspector_refresh",@"render",@"tracking_frame",@"plugin_state"]containsObject:stage]){NSMutableDictionary *begin=[[value[@"fields"]mutableCopy]autorelease];begin[@"phase"]=@"begin";DYBetaEvent(stage,begin);}return token;
}
void DYBetaSpanEnd(uint64_t token,NSDictionary *fields){if(!token)return;NSDictionary *span;@synchronized(gSpanLock){span=[[gActive[@(token)]retain]autorelease];[gActive removeObjectForKey:@(token)];}if(!span)return;double elapsed=(NSProcessInfo.processInfo.systemUptime-[span[@"start"]doubleValue])*1000;if([span[@"stage"]isEqual:@"inspector_refresh"]&&elapsed<100)return;NSMutableDictionary *result=[[span[@"fields"]mutableCopy]autorelease];[result addEntriesFromDictionary:fields?:@{}];result[@"duration_ms"]=@(elapsed);result[@"phase"]=@"end";DYBetaEvent(span[@"stage"],result);}
void DYBetaStop(void){DYBetaEvent(@"process_exit",@{@"status":@"normal"});}
void DYBetaSpanEnd(uint64_t token,NSDictionary *fields){
if(!token)return;NSDictionary *span;
@synchronized(gSpanLock){span=[[gActive[@(token)]retain]autorelease];[gActive removeObjectForKey:@(token)];}
if(!span||!gEnabled.load())return;double elapsed=(NSProcessInfo.processInfo.systemUptime-[span[@"start"]doubleValue])*1000;
NSString *stage=span[@"stage"];BOOL frequent=[@[@"inspector_refresh",@"render",@"tracking_frame",@"plugin_state"]containsObject:stage];
if(frequent){@synchronized(gSpanLock){NSDictionary *old=gMetrics[stage];gMetrics[stage]=@{@"count":@([old[@"count"]integerValue]+1),@"duration_ms":@([old[@"duration_ms"]doubleValue]+elapsed),@"max_duration_ms":@(MAX([old[@"max_duration_ms"]doubleValue],elapsed))};}if(elapsed<100)return;}
NSMutableDictionary *result=[[span[@"fields"]mutableCopy]autorelease];[result addEntriesFromDictionary:fields?:@{}];result[@"duration_ms"]=@(elapsed);result[@"phase"]=@"end";DYBetaEvent(stage,result);
}
void DYBetaStop(void){DYBetaStart();if(!gProduct)return;dispatch_group_t group=dispatch_group_create();dispatch_group_async(group,transport->queue,^{@autoreleasepool{[transport enqueue:@"process_exit" fields:@{@"status":@"normal"}];[transport persist];[transport drain];}});dispatch_group_wait(group,dispatch_time(DISPATCH_TIME_NOW,NSEC_PER_SEC/2));dispatch_release(group);}
void DYBetaSendSummary(void){DYBetaStart();if(!gProduct)return;dispatch_async(transport->queue,^{@autoreleasepool{[transport enqueue:@"diagnostic_summary" fields:transport->environment];[transport scanCrashSummaries];[transport drain];}});}
+78
查看文件
@@ -0,0 +1,78 @@
// Only structured, product-owned evidence leaves the computer. No raw IPS/sample upload.
static NSString *DYBetaString(id value) { return [value isKindOfClass:NSString.class]?value:@""; }
static NSDictionary *DYBetaDictionary(id value) { return [value isKindOfClass:NSDictionary.class]?value:@{}; }
static NSArray *DYBetaArray(id value) { return [value isKindOfClass:NSArray.class]?value:@[]; }
static NSString *DYBetaImageName(NSDictionary *image) {
NSString *name=DYBetaString(image[@"name"]);
if([@[@"大鱼调色",@"大鱼调色 XPC Service",@"FxPlug",@"PluginManager"]containsObject:name])return name;
NSString *path=DYBetaString(image[@"path"]);
if([path hasPrefix:@"/System/Library/"]||[path hasPrefix:@"/usr/lib/"])return name.lastPathComponent;
return @"other-image";
}
NSDictionary *DYBetaCrashEvidence(NSDictionary *header,NSDictionary *body) {
header=DYBetaDictionary(header);body=DYBetaDictionary(body);
NSString *bundle=DYBetaString(header[@"bundleID"]);
if(![@[@"com.dayu.color",@"com.dayu.color.XPC"]containsObject:bundle])return nil;
NSArray *threads=DYBetaArray(body[@"threads"]),*images=DYBetaArray(body[@"usedImages"]);
// Development self-tests must not be presented as users' crashes.
for(id t in threads)for(id f in DYBetaArray(DYBetaDictionary(t)[@"frames"])) {
NSString *symbol=DYBetaString(DYBetaDictionary(f)[@"symbol"]);
if([symbol containsString:@"DYRunDiagnostics"]||[symbol containsString:@"__asan"]||[symbol containsString:@"__sanitizer"])return nil;
}
NSInteger fault=[body[@"faultingThread"]isKindOfClass:NSNumber.class]?[body[@"faultingThread"]integerValue]:-1;
if(fault<0||fault>=threads.count)for(NSUInteger i=0;i<threads.count;i++)if([DYBetaDictionary(threads[i])[@"triggered"]boolValue]){fault=i;break;}
NSMutableArray *frames=[NSMutableArray array];
if(fault>=0&&fault<threads.count)for(id item in DYBetaArray(DYBetaDictionary(threads[fault])[@"frames"])) {
if(frames.count>=32)break;NSDictionary *frame=DYBetaDictionary(item);
NSInteger index=[frame[@"imageIndex"]isKindOfClass:NSNumber.class]?[frame[@"imageIndex"]integerValue]:-1;
NSDictionary *image=index>=0&&index<images.count?DYBetaDictionary(images[index]):@{};
NSString *uuid=DYBetaString(image[@"uuid"]);if(![[[NSUUID alloc]initWithUUIDString:uuid]autorelease])uuid=@"unknown";
NSString *symbol=DYBetaString(frame[@"symbol"]);
if(symbol.length>300)symbol=[symbol substringToIndex:300];
if([symbol containsString:@"/"])symbol=@"[symbol omitted]";
[frames addObject:[NSString stringWithFormat:@"%@ | %@ + %@ | %@",symbol.length?symbol:@"unsymbolicated",DYBetaImageName(image),[frame[@"imageOffset"]isKindOfClass:NSNumber.class]?frame[@"imageOffset"]:@0,uuid]];
}
NSDictionary *exception=DYBetaDictionary(body[@"exception"]),*termination=DYBetaDictionary(body[@"termination"]),*info=DYBetaDictionary(body[@"bundleInfo"]);
NSMutableDictionary *out=[@{@"source_version":DYBetaString(header[@"app_version"]).length?header[@"app_version"]:DYBetaString(info[@"CFBundleShortVersionString"]),
@"source_build":DYBetaString(header[@"build_version"]).length?header[@"build_version"]:DYBetaString(info[@"CFBundleVersion"]),
@"process_role":[bundle hasSuffix:@".XPC"]?@"plugin":@"app",@"report_time":DYBetaString(header[@"timestamp"]),
@"exception":DYBetaString(exception[@"type"]),@"signal":DYBetaString(exception[@"signal"]),
@"termination_namespace":DYBetaString(termination[@"namespace"]),@"frames":[frames componentsJoinedByString:@"\n"],
@"os_version":DYBetaString(DYBetaDictionary(body[@"osVersion"])[@"train"])}mutableCopy];
if([termination[@"code"]isKindOfClass:NSNumber.class])out[@"termination_code"]=termination[@"code"];
if([body[@"pid"]isKindOfClass:NSNumber.class])out[@"pid"]=body[@"pid"];
// Full dyld reason may contain user paths. Retain only a fixed classification.
NSString *reason=[[DYBetaArray(termination[@"details"]) description]stringByAppendingString:DYBetaString(termination[@"indicator"])];
out[@"status"]=[reason localizedCaseInsensitiveContainsString:@"Library not loaded"]?@"library_missing":
[reason localizedCaseInsensitiveContainsString:@"Symbol not found"]?@"symbol_missing":
[reason localizedCaseInsensitiveContainsString:@"signature"]?@"signature_rejected":@"system_report";
NSDictionary *safe=DYBetaSafeFields(out);[out release];return safe;
}
NSString *DYBetaSampleFrames(NSString *sample) {
if(![sample isKindOfClass:NSString.class]||sample.length>4*1024*1024)return @"";
NSMutableArray *main=[NSMutableArray array],*other=[NSMutableArray array];BOOL graph=NO,mainThread=NO;
for(NSString *line in [sample componentsSeparatedByString:@"\n"]) {
if([line isEqual:@"Call graph:"]){graph=YES;continue;}
if([line hasPrefix:@"Total number in stack"]||[line hasPrefix:@"Binary Images:"])break;
if(!graph)continue;
if([line containsString:@"Thread_"]){mainThread=[line containsString:@"com.apple.main-thread"];continue;}
NSRange marker=[line rangeOfString:@" (in "];if(marker.location==NSNotFound)continue;
NSString *frame=[line stringByTrimmingCharactersInSet:NSCharacterSet.whitespaceCharacterSet];
if(frame.length>500)frame=[frame substringToIndex:500];
if([frame containsString:@"/"])continue;
if(mainThread)[main addObject:frame];
else if(other.count<25&&([frame containsString:@"DY"]||[frame containsString:@"大鱼调色"]||[frame containsString:@"Metal"]||[frame containsString:@"Vision"]||[frame containsString:@"cv::"]))[other addObject:frame];
}
// Keep the deepest main-thread frames, which contain the actual wait/work.
if(main.count>28)[main removeObjectsInRange:NSMakeRange(0,main.count-28)];
NSString *result=[NSString stringWithFormat:@"main:\n%@\nproduct/work:\n%@",[main componentsJoinedByString:@"\n"],[other componentsJoinedByString:@"\n"]];
return main.count||other.count?DYBetaSafeFields(@{@"frames":result})[@"frames"]:@"";
}
NSDictionary *DYBetaErrorFields(NSError *error,NSString *stage) {
NSMutableDictionary *fields=[NSMutableDictionary dictionaryWithDictionary:@{@"stage":stage?:@"unknown",@"error_domain":error.domain?:@"unknown",@"error_code":@(error.code)}];
id url=error.userInfo[NSURLErrorKey];NSString *path=[url isKindOfClass:NSURL.class]?[url path]:DYBetaString(error.userInfo[NSFilePathErrorKey]);
NSString *ext=path.pathExtension.lowercaseString;
if([@[@"cube",@"dylut",@"metallib",@"bin"]containsObject:ext])fields[@"resource_kind"]=ext;
else if(path.length)fields[@"resource_kind"]=@"other_file";
return fields;
}
+41 -34
查看文件
@@ -121,9 +121,8 @@ typedef NS_ENUM(NSInteger,DYRegistrationState) { DYChecking, DYRegistering, DYRe
@property(assign) NSProgressIndicator *progress;
@property(assign) DYSurface *registrationCard;
@property DYRegistrationState registrationState;
@property BOOL keepOpen, terminating;
@property NSInteger secondsRemaining;
@property(retain) NSTimer *exitTimer;
@property BOOL terminating;
@property(retain) NSStatusItem *statusItem;
@property(retain) NSMutableDictionary *diagnostics;
@property(retain) DYBetaUpdater *updater;
@property(assign) NSTextField *updateTitle, *updateDetail, *diagnosticDetail, *reportID;
@@ -137,18 +136,16 @@ typedef NS_ENUM(NSInteger,DYRegistrationState) { DYChecking, DYRegistering, DYRe
@implementation AppDelegate
- (void)applicationDidFinishLaunching:(NSNotification *)notification {
self.keepOpen = [NSProcessInfo.processInfo.arguments containsObject:@"--show-introduction"];
self.window.title = @"大鱼调色";
self.window.appearance = [NSAppearance appearanceNamed:NSAppearanceNameDarkAqua];
self.window.titlebarAppearsTransparent = YES; self.window.backgroundColor = DYColor(.105,.14,.20);
self.window.contentMinSize = NSMakeSize(760,620); [self.window setContentSize:NSMakeSize(920,850)]; [self.window center];
DYBetaStart();
[self buildInterface]; [self buildMenu];
[self buildInterface]; [self buildMenu]; [self buildStatusItem];
[NSNotificationCenter.defaultCenter addObserver:self selector:@selector(refreshDiagnostics:) name:DYBetaDiagnosticsChanged object:nil];
self.updater = [[[DYBetaUpdater alloc] init] autorelease];
__block AppDelegate *owner = self;
self.updater.changed = ^(NSDictionary *state) { [owner updateChanged:state]; };
self.updateProgressTimer = [NSTimer scheduledTimerWithTimeInterval:.2 target:self selector:@selector(refreshUpdateProgress:) userInfo:nil repeats:YES];
NSInteger expected=[NSUserDefaults.standardUserDefaults integerForKey:@"betaPendingUpdateBuild"];
if(expected>0 && [NSBundle.mainBundle.infoDictionary[@"CFBundleVersion"]integerValue]>=expected){
DYBetaEvent(@"update_installer",@{@"status":@"completed",@"count":@(expected)});
@@ -157,6 +154,14 @@ typedef NS_ENUM(NSInteger,DYRegistrationState) { DYChecking, DYRegistering, DYRe
[NSWorkspace.sharedWorkspace.notificationCenter addObserver:self selector:@selector(accessibilityChanged:)
name:NSWorkspaceAccessibilityDisplayOptionsDidChangeNotification object:nil];
[self.window makeKeyAndOrderFront:nil]; [self refreshDiagnostics:nil]; [self checkRegistration:nil]; [self.updater check];
// Explicit QA opt-in on the signed, installed wrapper only. Never stalls the host.
if([NSProcessInfo.processInfo.arguments containsObject:@"--diagnostics-probe"])
[self performSelector:@selector(runDiagnosticsProbe) withObject:nil afterDelay:5];
}
- (void)runDiagnosticsProbe {
DYBetaEvent(@"diagnostic_summary",@{@"status":@"probe_begin"});
[NSThread sleepForTimeInterval:12];
DYBetaEvent(@"diagnostic_summary",@{@"status":@"probe_recovered"});
}
- (void)buildMenu {
NSMenu *menu = [[[NSMenu alloc] initWithTitle:@"大鱼调色"] autorelease];
@@ -203,12 +208,12 @@ typedef NS_ENUM(NSInteger,DYRegistrationState) { DYChecking, DYRegistering, DYRe
self.progress.style = NSProgressIndicatorStyleBar; self.progress.indeterminate = YES; self.progress.translatesAutoresizingMaskIntoConstraints = NO;
self.retryButton = DYButton(@"检查中…",DYBlue(),NO,self,@selector(checkRegistration:));
self.keepButton = DYButton(@"查看功能介绍",DYColor(.20,.46,.94),YES,self,@selector(keepIntroduction:));
self.exitDetail = DYLabel(@"注册成功后,将显示 3 秒退出倒计时。",15,NSFontWeightSemibold,DYGreen());
self.exitDetail = DYLabel(@"应用会保持运行,关闭窗口后继续后台诊断。",15,NSFontWeightSemibold,DYGreen());
[self.exitDetail.heightAnchor constraintGreaterThanOrEqualToConstant:38].active = YES;
NSStackView *registration = DYStack(@[DYHeading(@"puzzlepiece.extension",@"插件连接",DYBlue()),self.statusTitle,self.statusDetail,self.progress,
self.exitDetail,DYStack(@[self.retryButton,self.keepButton],NSUserInterfaceLayoutOrientationHorizontal,8)],NSUserInterfaceLayoutOrientationVertical,13);
self.registrationCard = DYCard(DYBlue(),registration);
self.confirmationButton = DYButton(@"已确认正常,退出",DYGreen(),NO,self,@selector(confirmHost:));
self.confirmationButton = DYButton(@"已确认,后台运行",DYGreen(),NO,self,@selector(confirmHost:));
self.confirmationButton.enabled = NO;
self.confirmationButton.toolTip = @"请先在 Final Cut Pro 中应用大鱼调色并确认效果正常,再点击此按钮。";
NSStackView *host = DYStack(@[DYHeading(@"play.rectangle",@"在 Final Cut Pro 中检查",DYGreen()),
@@ -237,7 +242,7 @@ typedef NS_ENUM(NSInteger,DYRegistrationState) { DYChecking, DYRegistering, DYRe
self.reportID=DYLabel(@"报告标识准备中…",10,NSFontWeightRegular,DYSecondary());self.reportID.selectable=YES;
self.sendSummaryButton=DYButton(@"发送诊断摘要",DYColor(.67,.59,1),NO,self,@selector(sendSummary:));
DYSurface *diagnosticCard=DYCard(DYColor(.67,.59,1),DYStack(@[DYHeading(@"waveform.path.ecg",@"一起完善大鱼调色",DYColor(.67,.59,1)),self.diagnosticToggle,
DYLabel(@"仅发送版本、系统环境、加载耗时和本插件错误摘要;不发送素材、预设或账号。可随时关闭,诊断保留 30 天。",12,NSFontWeightRegular,DYSecondary()),
DYLabel(@"后台自动发送版本、系统环境、阶段耗时、内存及本产品崩溃/卡顿调用栈摘要到 dayu.media;不发送素材、预设或账号。可随时关闭,保留 30 天。",12,NSFontWeightRegular,DYSecondary()),
self.reportID,self.diagnosticDetail,self.sendSummaryButton],NSUserInterfaceLayoutOrientationVertical,10));
NSStackView *beta=DYStack(@[updateCard,diagnosticCard],NSUserInterfaceLayoutOrientationHorizontal,14);
[updateCard.heightAnchor constraintEqualToAnchor:diagnosticCard.heightAnchor].active=YES;
@@ -326,7 +331,7 @@ typedef NS_ENUM(NSInteger,DYRegistrationState) { DYChecking, DYRegistering, DYRe
- (void)checkRegistration:(id)sender {
if (self.integrityRejected) return;
if (self.diagnostics && (self.registrationState == DYChecking || self.registrationState == DYRegistering)) return;
[self.exitTimer invalidate]; self.exitTimer = nil; self.registrationState = DYChecking;
self.registrationState = DYChecking;
self.retryButton.enabled = NO; self.retryButton.title = @"检查中…";
self.statusTitle.stringValue = @"正在检查插件…"; self.statusTitle.textColor = NSColor.whiteColor;
self.statusDetail.stringValue = @"正在检查本机插件登记,随后自动提交注册。";
@@ -400,17 +405,25 @@ typedef NS_ENUM(NSInteger,DYRegistrationState) { DYChecking, DYRegistering, DYRe
NSAccessibilityPostNotificationWithUserInfo(self.window,NSAccessibilityAnnouncementRequestedNotification,
@{NSAccessibilityAnnouncementKey:self.statusTitle.stringValue,NSAccessibilityPriorityKey:@(NSAccessibilityPriorityHigh)});
DYBetaEvent(@"registration",@{@"status":success?@"registered":@"failed"});
if(success)[self maybeStartCountdown];
if(success)[self refreshBackgroundState];
else self.exitDetail.stringValue=@"注册尚未完成,应用会保留此窗口以便重试。";
}
- (void)maybeStartCountdown {
if(self.terminating || self.registrationState!=DYReady)return;
if(self.keepOpen){self.exitDetail.stringValue=@"插件已就绪。关闭此窗口后,可继续在宿主中使用。";return;}
if(!self.updateCheckDone){self.exitDetail.stringValue=@"注册成功,正在检查公测更新…";return;}
if(self.exitTimer)return;
self.secondsRemaining=3;[self updateCountdown];
self.exitTimer=[NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(exitTick:) userInfo:nil repeats:YES];
- (void)refreshBackgroundState {
if(self.registrationState==DYReady)self.exitDetail.stringValue=DYBetaEnabled()?@"后台诊断已开启。关闭窗口后继续运行,可从菜单栏重新打开或退出。":@"诊断已关闭。应用保持运行,可从菜单栏退出。";
}
- (void)buildStatusItem {
self.statusItem=[NSStatusBar.systemStatusBar statusItemWithLength:NSVariableStatusItemLength];
self.statusItem.button.image=[NSImage imageWithSystemSymbolName:@"slider.horizontal.3" accessibilityDescription:@"大鱼调色后台诊断"];
self.statusItem.button.toolTip=@"大鱼调色 · 后台运行";
NSMenu *menu=[[[NSMenu alloc]initWithTitle:@"大鱼调色"]autorelease];
NSMenuItem *show=[menu addItemWithTitle:@"打开大鱼调色" action:@selector(showMainWindow:) keyEquivalent:@""];show.target=self;
NSMenuItem *send=[menu addItemWithTitle:@"发送诊断摘要" action:@selector(sendSummary:) keyEquivalent:@""];send.target=self;
[menu addItem:NSMenuItem.separatorItem];
NSMenuItem *quit=[menu addItemWithTitle:@"退出大鱼调色" action:@selector(terminate:) keyEquivalent:@""];quit.target=NSApp;
self.statusItem.menu=menu;
}
- (void)showMainWindow:(id)sender { [self.window makeKeyAndOrderFront:nil];[NSApp activateIgnoringOtherApps:YES]; }
- (BOOL)applicationShouldHandleReopen:(NSApplication *)app hasVisibleWindows:(BOOL)visible { if(!visible)[self showMainWindow:nil];return YES; }
- (void)updateChanged:(NSDictionary *)state {
if(self.terminating)return;
NSString *phase=state[@"phase"];
@@ -425,10 +438,12 @@ typedef NS_ENUM(NSInteger,DYRegistrationState) { DYChecking, DYRegistering, DYRe
self.updateInstallButton.enabled=[@[@"available",@"ready",@"host_wait",@"installer"]containsObject:phase];
self.updateInstallButton.title=[phase isEqual:@"available"]?@"下载更新":@"安装更新";
self.updateCancelButton.hidden=![phase isEqual:@"downloading"];
[self.updateProgressTimer invalidate];self.updateProgressTimer=nil;
if([phase isEqual:@"downloading"])self.updateProgressTimer=[NSTimer scheduledTimerWithTimeInterval:.5 target:self selector:@selector(refreshUpdateProgress:) userInfo:nil repeats:YES];
self.updateProgress.indeterminate=[@[@"checking",@"validating"]containsObject:phase];
if(self.updateProgress.indeterminate)[self.updateProgress startAnimation:nil];else [self.updateProgress stopAnimation:nil];
self.updateProgress.doubleValue=[@[@"ready",@"host_wait",@"installer"]containsObject:phase]?1:0;
[self maybeStartCountdown];
[self refreshBackgroundState];
}
- (void)refreshUpdateProgress:(NSTimer *)timer {
if([self.updater.state[@"phase"]isEqual:@"downloading"])self.updateProgress.doubleValue=self.updater.downloadFraction;
@@ -441,7 +456,7 @@ typedef NS_ENUM(NSInteger,DYRegistrationState) { DYChecking, DYRegistering, DYRe
- (void)cancelUpdate:(id)sender { [self keepIntroduction:nil];[self.updater cancel]; }
- (void)refreshDiagnostics:(NSNotification *)note {
NSDictionary *state=DYBetaStatus();BOOL enabled=DYBetaEnabled();self.diagnosticToggle.state=enabled?NSControlStateValueOn:NSControlStateValueOff;
self.sendSummaryButton.enabled=enabled;
self.sendSummaryButton.enabled=enabled; [self refreshBackgroundState];
self.reportID.stringValue=[NSString stringWithFormat:@"报告标识:%@",state[@"installation_id"]?:@"准备中…"];
NSNumber *uploaded=state[@"last_upload"];
if(!enabled)self.diagnosticDetail.stringValue=@"诊断已关闭。不会继续上传,待发送摘要已清除。";
@@ -451,23 +466,14 @@ typedef NS_ENUM(NSInteger,DYRegistrationState) { DYChecking, DYRegistering, DYRe
}
- (void)toggleDiagnostics:(id)sender { [self keepIntroduction:nil];DYBetaSetEnabled(self.diagnosticToggle.state==NSControlStateValueOn);[self refreshDiagnostics:nil]; }
- (void)sendSummary:(id)sender { [self keepIntroduction:nil];DYBetaSendSummary();self.diagnosticDetail.stringValue=@"已加入后台发送队列,送达后会显示时间。"; }
- (void)updateCountdown { self.exitDetail.stringValue = [NSString stringWithFormat:@"%ld 秒后自动退出\n点击“查看功能介绍”可保留窗口",(long)self.secondsRemaining]; }
- (void)exitTick:(NSTimer *)timer {
if (--self.secondsRemaining <= 0) {
[timer invalidate]; self.exitTimer = nil; self.diagnostics[@"terminationReason"] = @"registration-succeeded"; [self writeDiagnostics]; [NSApp terminate:nil];
} else [self updateCountdown];
}
- (void)keepIntroduction:(id)sender {
self.keepOpen = YES; [self.exitTimer invalidate]; self.exitTimer = nil;
self.keepButton.title = @"正在浏览介绍"; self.keepButton.enabled = NO;
self.exitDetail.stringValue = @"已保留功能介绍窗口。插件可独立在宿主中使用。";
[self showMainWindow:sender]; [self refreshBackgroundState];
}
- (void)confirmHost:(id)sender {
if (self.registrationState != DYReady) return;
DYBetaEvent(@"host_confirmed",@{@"status":@"user_confirmed"});
self.diagnostics[@"hostVerification"] = @"user-confirmed";
self.diagnostics[@"terminationReason"] = @"user-confirmed-host";
[self writeDiagnostics]; [NSApp terminate:nil];
[self writeDiagnostics]; [self.window orderOut:nil];
}
- (void)writeDiagnostics {
NSURL *base = [NSFileManager.defaultManager URLsForDirectory:NSApplicationSupportDirectory inDomains:NSUserDomainMask].firstObject;
@@ -493,13 +499,14 @@ typedef NS_ENUM(NSInteger,DYRegistrationState) { DYChecking, DYRegistering, DYRe
}
- (void)closeWindow:(id)sender { [self.window performClose:sender]; }
- (void)accessibilityChanged:(NSNotification *)note { [self.window.contentView setNeedsDisplay:YES]; }
- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)app { return YES; }
- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)app { return NO; }
- (void)applicationWillTerminate:(NSNotification *)note {
self.terminating = YES; [self.exitTimer invalidate]; self.exitTimer = nil;
self.terminating = YES;
[NSStatusBar.systemStatusBar removeStatusItem:self.statusItem];
self.updater.changed=nil; [self.updater cancel];DYBetaStop();
[self.updateProgressTimer invalidate];self.updateProgressTimer=nil;
[NSNotificationCenter.defaultCenter removeObserver:self];
[NSWorkspace.sharedWorkspace.notificationCenter removeObserver:self];
}
- (void)dealloc { [_exitTimer invalidate]; [_exitTimer release]; [_diagnostics release]; [_updater release]; [_updateProgressTimer invalidate]; [_updateProgressTimer release]; [super dealloc]; }
- (void)dealloc { [_statusItem release]; [_diagnostics release]; [_updater release]; [_updateProgressTimer invalidate]; [_updateProgressTimer release]; [super dealloc]; }
@end
+2 -2
查看文件
@@ -17,9 +17,9 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.17.0</string>
<string>1.18.0</string>
<key>CFBundleVersion</key>
<string>102</string>
<string>105</string>
<key>LSMinimumSystemVersion</key>
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
<key>NSHumanReadableCopyright</key>
+31 -16
查看文件
@@ -4,27 +4,42 @@
## 当前基线
**本轮 1.17.0 开发尚未交付。** 2026-11-06 已实现独立功能缩略图、V4 全链路输出层和局部马赛克;正式路径安装候选 98—101 后,950 项原生检查通过,但 FCP 12.4 的检查器动态高度验收未通过。候选 101 实际编译提交为 `2c2af3695b6dbe661db7adf544a60c58766a4e73`。已正常退出 FCP、回滚到下表的 **1.16.0(97)** 并清理候选 APP,未制作或发布 1.17.0 安装包。源码 HEAD 中的高度刷新仍是失败实验,不能直接发布。
用户待答的问题:第 2 项是否可改为独立自适应浮动调色面板,还是必须继续在 FCP 检查器内重构。尚未收到答复,不将沉默视为选定方案。其余三项的宿主结果与限制见下节。
**1.17.1(103)已正式安装并完成 Git Release 交付。** 本轮按用户要求恢复检视器折叠与内部滚动,默认只展开一级调色、基础调整、蜘蛛盘;修复手绘蒙版跨宿主时间起点写回,马赛克改用轻量人脸框检测,并接入多个人脸/蒙版选择。用户要求代码接入后自行实测,真实运动多人、遮挡和流畅度尚未验收。
| 项目 | 已核对状态 |
| --- | --- |
| 工程与源码 | `/Volumes/备份/大鱼调色/大鱼调色`,`大鱼调色.xcodeproj`,`Wrapper Application` / Release。远程为 `https://dayu.media/git/dayu/dayu-color.git`,分支 `main`。1.16.0(97)实际编译节点为 `27ba2b53ca6809081269f95ca6caaddeb3933c79`。 |
| 本机正式安装 | **1.16.0(97)**,`/Library/Plug-Ins/FxPlug/大鱼调色.app`。公证、票据、Gatekeeper、唯一 PluginKit 路径及 922 项正式原生自检通过。FCP 12.4 已核对全部独立入口、CST 面板加层、水平校正与畸变共同渲染和冷重开。屏幕控件实鼠仍待复核。[交付](verification/Delivery.json) · [宿主验收](verification/HostLevel1.16.0.json) |
| Git Release | **1.16.0(97)** 已签名公证并验包,正式包位于 `/Volumes/备份/大鱼调色/发行包/大鱼调色-1.16.0.pkg`。标签 `v1.16.0-leveling-modules-20261106` 指向 `0483e76a1762b1dc3d2e049453d4c85e473cfc50`。Release 398/附件 42,草稿和正式链接均完整下载核对 55,485,504 字节及 SHA-256。[发布页](https://dayu.media/git/dayu/dayu-color/releases/tag/v1.16.0-leveling-modules-20261106) · [发布回读](verification/Release.json) · [安装包](verification/Package.json) |
| 站点及自动更新 | 原文章 15792 的主下载已切换至 **1.14.4(95)**,正文顶部显示验签修复和重新下载安装提醒。站内附件 15865 已完整下载,内容与正式包逐字节一致。主 APP 公测通道上次回读为 **1.12.0(79)**。[原文章](https://dayu.media/15792/) · [文章核验](verification/Article1.14.4.json) · [更新通道核验](verification/BetaPublication1.12.0.json) |
| 本机开发与验收 | AppKit / Objective-C++ / FxPlug 4 / Metal,Apple Silicon,macOS 14.6+。交付记录使用 Xcode 27.1、FxPlug SDK 4.3.5 和 FCP 12.4。构建缓存为 `/Users/mac/Library/Caches/CodexBuilds/com.dayu.color`,验收素材库位于其中的 `fcp-qa/大鱼调色_验收.fcpbundle`。产品交付锁为 `/Users/mac/.codex/app-delivery-locks/com.dayu.color.lock`,接手时重新检查。 |
| 工程与源码 | `/Volumes/备份/大鱼调色/大鱼调色`,`Wrapper Application` / Release;远程 `https://dayu.media/git/dayu/dayu-color.git`,`main`。实际编译提交 **`3b4c612edf99c0ef2b972b7305cd7ba44244a7c6`**。 |
| 本机正式安装 | **1.17.1(103)**,`/Library/Plug-Ins/FxPlug/大鱼调色.app`。Developer ID 签名、APP 公证 `36ecb7e6-5cfc-4b85-8363-11272d880b18` Accepted、票据、Gatekeeper、唯一 PluginKit 路径、961 项原生自检及 FCP 12.4 加载/折叠滚动/菜单验证通过。[交付](verification/Delivery.json) · [宿主范围](verification/HostInspectorMosaic1.17.1.json) |
| Git Release | `大鱼调色-1.17.1.pkg`,46,600,407 字节,SHA-256 `5c1240d9f262c977495016cd9c19bd55cc0e374fcf9f99128e8cb2231309d710`。标签 `v1.17.1-inspector-mosaic-20261106` 指向 **`7c0bfa5352f282bcec0aedf43be29af4432f2ba8`**。Release **400**/附件 **44** 已发布,保留公测标记与仓库可见性;草稿及发布后完整下载大小与哈希一致。[发行页](https://dayu.media/git/dayu/dayu-color/releases/tag/v1.17.1-inspector-mosaic-20261106) · [发布记录](verification/Release.json) · [验包](verification/Package.json) |
| 站点及自动更新 | 本轮未操作。原文章 15792 主下载上次核对为 **1.14.4(95)**;主 APP 公测更新通道上次回读为 **1.12.0(79)**。[原文章](https://dayu.media/15792/) · [文章核验](verification/Article1.14.4.json) · [更新通道核验](verification/BetaPublication1.12.0.json) |
| 环境与验收库 | Xcode 27.1、FxPlug SDK 4.3.5、Apple Silicon、macOS 14.6+、FCP 12.4。固定缓存 `/Users/mac/Library/Caches/CodexBuilds/com.dayu.color`。QA 库 `fcp-qa/level-1.15.0/未命名.fcpbundle`,事件“大鱼调色1.17.0全链路与马赛克验收”。接手重新检查产品交付锁。 |
## 1.17.0 开发检查点:缩略图、输出层与马赛克;高度待解决
## 1.17.1:恢复折叠、手绘保存和指定人脸
- **缩略图**:`tools/build_module_previews.swift` 生成 16 套有功能名称和对应图形的原生矢量绘制缩略图,640×360 / 240×135。`tools/template_payload.py` 改为独立资源路径;MOEF 与旧版逐字节一致,整合版保留原品牌图。FCP 效果浏览器实见风格 LUT、肤色、黑白、基础调整的不同图形,其余源文件由 [缩略图报告](template/verification/ModulePreviews.json) 和模板静态检查覆盖。新图片已落到用户 Motion Templates,回滚 APP 不撤销这些兼容的图片。
- **V4 全链路**:颜色设置中显式启用“全链路 · 输出转换层”,输出默认末层并可上下移动。保留 nil/V2/V3,不静默改变旧工程。`DYUnifiedRender.inc.h` 按实际节点顺序执行,统一输入/输出和当前节点工作域;一级旁路不关闭全局转换,蒙版混合在 AP1 线性域,负值和超白残差保留,曝光按场景线性处理。创意 LUT、胶片和旧有界工具仍有明确局部参考域/增量延拓,**不宣称所有旧算法都已改写成场景线性算法**。FCP 加载 V4 后确认输出在 HSL 之后,上移到其前,一次撤销恢复末层。
- **局部马赛克**:OSC 网格按钮与检查器“局部马赛克”按钮使用同一菜单和写入桥;可选逐帧人脸或任意已绘制共享蒙版,以及方块大小。复用现有识别和轨迹数据;人脸范围包含眼睛、鼻子、嘴。FCP NASA 公有人像实测人脸覆盖,再切换矩形蒙版后仅中央矩形区域被处理。运动轨迹、无蒙版安全旁路、区域外像素、空间工具共存等由原生检查覆盖;本轮没有完成运动视频实窗跟踪,也没有获得自动 OSC 鼠标点击回调。空间马赛克不能完整导出 Cube,须用完整预设。
- **动态高度失败经过**:98 移除内滚动后 FCP 仍固定初始 406 pt;99 改为返回视图前同步完成初始布局,首次展示完整,但折叠留空;100 即时隐藏/恢复参数标志未刷新宿主;101 尝试动态参数重建,并在不适用时延时切换标志,折叠会出现空白,自行切到其他片段再回来才恢复。不能用这些结果宣称自适应已完成。接手先移除/替换 `DYPlugIn.mm` 的实验性 `inspectorHeightChanged:` 参数删除与标志切换,避免空白或不完整重建风险,再实施用户选定方案。
- **验证和交付分离**:候选 101 已 Developer ID 签名、公证 `4e9e5a94-a707-4733-b75c-846445d02ebd` Accepted、票据与 Gatekeeper 通过;950 项安装后检查仅证明原生模型/渲染和模拟宿主调用,不替代真实 FCP 动态高度。见 [候选自检](verification/InstalledSelfTest1.17.0-candidate101.json)、[FCP 验收](verification/HostUnified1.17.0-candidate101.json)、[拒收及回滚](verification/RejectedBuild101.json)。`Delivery.json` 与 `InstalledSelfTest.json` 已恢复为当前正式 97 版记录。
- **接手入口**:源码 `main` 已按阶段推送。验收资源库在固定缓存 `fcp-qa/level-1.15.0/未命名.fcpbundle`,事件“大鱼调色1.17.0全链路与马赛克验收”;两个时间线和 JSON 预设可由 `tools/create_unified_host_fixture.py` 重建。预设采用 Rec.709 / Gamma 2.6 同域中性配置(1003 是 Gamma 2.6,不能误称 sRGB)。剪辑工程和素材库未上传。下一候选使用新构建号,继续完整正式安装验收,不能运行构建目录 APP。
- **发布状态**:本机正式 APP、PKG 和 Git Release 仍为 1.16.0(97);没有 1.17.0 标签、PKG 或 Release。站点文章与主 APP 更新通道本轮未操作,下表原记录只是上次核对结果。未提交工作区原有 `project.pbxproj` 的三处 Security 引用排序。
- 检视器按窄宽测量默认三组与其余折叠标题,内部最大高度 3501 pt;默认无内部滚动,展开/追加超出容量才滚动。已保存的折叠状态继续读取,独立效果默认展开唯一根模块。FCP 外层仍保留首次分配的高度,内部视窗可缩短,较宽检视器末尾有预留空白;没有恢复失败的参数删除/重建方案。
- 手绘草稿用 OSC 时钟保存几何,宿主 Action 时钟负责读取非动画文档与检查换帧。重绘时间不同不再丢掉草稿;真实输入换帧、Esc 和外部改动冲突仍取消。原生检查覆盖松手保存及安全回读;用户反馈的实鼠复位仍须在其问题素材复测。
- 全部人脸模式改用长边 640 的 Vision 人脸框检测,独立同画面缓存,减少特征点开销。肤色保护原算法保留;本次没有同场景前后播放帧率基准,不能保证所有素材流畅。
- 指定目标入口:开启“全部人脸 · 快速逐帧识别”→ 暂停目标画面 → 再开“局部马赛克”→“将本帧 N 张人脸转为可选跟踪蒙版”→ 勾选需要遮挡的人脸。在控制面板蒙版页逐个运行正向、反向或双向跟踪。每个框有稳定 UUID;生成后未跟踪前是静态,不是全片身份识别。矩形、椭圆和钢笔也能多选用于马赛克。
- 961 项正式原生检查通过;双人测试使用 NASA 公有人像并排合成,取消一人后其像素变化为 0。16 个独立模板与整合模板静态检查通过。FCP 实窗看到初始三组、折叠标题、展开胶片和曲线产生内部滚动、收起后滚动条消失;本帧单人转换入口可用。[专项记录](research/InspectorMosaic1.17.1.md) · [回归](verification/InspectorMosaic1.17.1.json)
- 编译节点 714 个文件、发行标签 718 个文件独立远端检出并逐一校验,差异仅为记录与模板模型来源哈希;无 LFS/子模块,未重复第三方冷构建。原有 project.pbxproj 三处 Security 引用排序保持未提交。[恢复](verification/Recovery1.17.1.json)
- PKG 公证 `8e122236-9ca6-4d92-ad6a-b9c2411280e7` Accepted,票据、Gatekeeper、20 项展开检查和 198 条载荷权限检查通过;正式 APP 独立安装验收,本机未重复执行 PKG 系统脚本。本轮构建 APP、公证 ZIP、旧替换备份、包暂存、恢复 clone 和草稿下载副本已清理,保留正式包与用户历史包,交付锁已释放。[清理](verification/Cleanup1.17.1.json)
接手第一步核对 1.17.1(103),按用户实拍反馈复测手绘松手、目标脸选择、轨迹及播放耗时;不要把原生回调测试或静态人像验证当作真实多人运动验收。下方为历史记录。
## 1.17.0:独立缩略图、全展开检查器、输出层与马赛克
- **缩略图**:`tools/build_module_previews.swift` 生成 16 套有功能名称和对应图形的缩略图,640×360 / 240×135。`tools/template_payload.py` 使用独立资源路径;MOEF 与旧版逐字节一致,整合版保留品牌图。FCP 效果浏览器实见风格 LUT、肤色、黑白、基础调整的不同图形;全部图片由 [缩略图报告](template/verification/ModulePreviews.json)、安装哈希和模板静态检查覆盖。
- **全部展开并测高**:`DYInspector.mm` 在返回视图前同步布局,按 280 pt 窄宽和各页签最大内容测量,预留颜色设置及输出卡片需要的高度。整合版显示全部未删除模块,独立效果仍仅显示其根模块;仅改变呈现,不修改参数、启用状态或旧折叠存档。模块标题用于选择,双击仍可还原,不再折叠。FCP 外层检查器可滚动,插件内部没有纵向 ScrollView。实测冷启动顶部与底部完整、追加一层镜头畸变后输出设置仍可达、独立 HSL 完整展示;未复现 101 的整片空白。
- **高度边界**:FCP 12.4 仍会缓存初始高度,本版采用用户选定的初次全量测高,并未修复宿主动态高度接口。较宽检查器底部可能留有页签/模式的预留空间。已实测追加一层,不能承诺任意数量新层都可无限增长;大量追加超出初始容量时,重新选择片段重新测量。其余行为和覆盖范围见 [宿主报告](verification/HostUnified1.17.0.json)。
- **V4 全链路**:在颜色设置显式选择“全链路 · 输出转换层”,输出默认末层并可上下移动。保留 nil/V2/V3,避免静默改变旧工程;原模板 custom dataValue 也保留兼容值。`DYUnifiedRender.inc.h` 按真实节点顺序执行,统一输入/输出和当前节点工作域,一级旁路不关闭全局转换,蒙版在 AP1 线性域混合,保留负值与超白残差,曝光按场景线性处理。创意 LUT、胶片和旧有界工具仍使用明确局部参考域/增量延拓,不宣称全部旧算法都已改写成场景线性。FCP 实测输出末层、上移至镜头之前和一次撤销恢复。
- **局部马赛克**:OSC 网格按钮与检查器同名按钮使用同一菜单和写入桥,可选逐帧人脸、任意已绘制共享蒙版及方块大小;复用现有识别和蒙版轨迹。人脸区域包含眼睛、鼻子、嘴。FCP NASA 公有人像实测人脸覆盖和矩形来源切换,冷启动保存状态正确。运动轨迹插值、无蒙版旁路、区域外像素和空间工具共存由原生检查覆盖。本轮未完成运动视频实窗跟踪,也未取得自动 OSC 鼠标点击回调,不能说这些已有人手验收。空间马赛克需保存完整预设,不能完整导出 Cube。
- **正式交付与恢复**:APP 公证 `6143097e-7a1b-4e95-9388-434e82acf3bc`,PKG 公证 `a9bba972-0743-469f-9869-13f94e1a1a83`,均 Accepted;票据、Gatekeeper、20 项验包和 198 条载荷权限检查通过。APP 独立正式安装并完成 FCP 验收,本轮未重复运行 PKG 安装脚本。编译节点 709 个文件、发行标签 711 个文件已独立远端检出核对;没有 LFS 指针/子模块,未重复冷构建第三方依赖。[恢复](verification/Recovery1.17.0.json) · [清理](verification/Cleanup1.17.0.json)。工作区原有 `project.pbxproj` 三处 Security 引用排序未提交、未改动。
### 候选 98—101 的历史结果
98 移除内滚动后 FCP 固定初始 406 pt;99 提前布局使首次完整,但折叠留下空白;100 即时隐藏/恢复参数标志未刷新宿主;101 动态参数重建/延时标志切换仍导致空白,切换片段才恢复。因此四个候选均未发布,回滚 97 后清理;950 项原生检查和公证通过没有替代宿主验收。候选 101 编译提交 `2c2af3695b6dbe661db7adf544a60c58766a4e73`,公证 `4e9e5a94-a707-4733-b75c-846445d02ebd`;[拒收与回滚](verification/RejectedBuild101.json)、[候选宿主报告](verification/HostUnified1.17.0-candidate101.json) 和 [研究记录](research/UnifiedPipeline1.17.0.md) 保留。用户随后明确选择全展开测高,102 已删除 `inspectorHeightChanged:` 参数重建及标志切换实验,当前没有待答的浮窗方案问题。
接手第一步核对正式 1.17.0(102)和本段记录;若继续优化大量追加层高度或 OSC 实鼠操作,直接使用正式路径版本及既有 QA 库复核。不要恢复已拒收的参数隐藏/重建路线。
## 1.16.0 畸变切换修复、保留参考线与全部独立模块