forked from nekopanda/AviSynthPlus
-
Notifications
You must be signed in to change notification settings - Fork 1
Device Check
Rainman74 edited this page Sep 13, 2025
·
3 revisions
※ For filter developers
Device check ensures valid device combinations when generating clip instances. Throws error if invalid.
Core Avisynth calls SetCacheHints to obtain supported devices and checks combinations.
Clip device priority:
- CACHE_GET_DEV_TYPE result
- DEV_TYPE_CPU
Required child device priority:
- CACHE_GET_CHILD_DEV_TYPE result
- CACHE_GET_DEV_TYPE result
- DEV_TYPE_CPU
Pseudocode:
devs = required devices for clip A
foreach(B in child clips of A) {
child_devs = B's devices
if((devs & child_devs) == 0) throw
}
Return DEV_TYPE_ANY in CACHE_GET_CHILD_DEV_TYPE to disable core check.
Filters supporting multiple devices must intersect child devices, else error.