Commit c31f1c5
committed
feat(filter_protocol): FilterTransform SDK contract + pj.filter_registry.v1 service
Replaces the originally-proposed split where the host carried its own copy of
the FilterTransform catalogue. Now ONE FilterTransformFactory exists at runtime,
owned by the host, populated by the Filter Editor plugin via the new
pj.filter_registry.v1 service. Preview, layout-restore, and the streaming
read path all resolve through the same instances — no math drift possible.
Contents:
- Abstract contract: PJ::sdk::FilterTransform (filter_transform.hpp)
- The 12 builtin strategies vendored as header-only (builtin_transforms.hpp):
NoneTransform / AbsoluteTransform / ScaleTransform / DerivativeTransform /
IntegralTransform / MovingAverageTransform / MovingRMSTransform /
MovingVarianceTransform / OutlierRemovalTransform / SamplesCounterTransform /
BinaryFilterTransform / TimeSincePreviousTransform
- FilterTransformFactory: keeps (create_fn, delete_fn, library_owner) per entry.
Cross-DSO destruction goes through the registered deleter; library_owner
pins the registering DSO while any of its entries is live.
- New host service pj.filter_registry.v1: C ABI vtable + Traits + C++ View.
Plugins receive the View at bind() and register their classes into the
host's factory; host code resolves via factory.create(id).
- FilterRegistryHost: in-process adapter that wraps a FilterTransformFactory
as the C-ABI service ctx, with paired thunks and a LibraryOwnerResolver.
- Lift Point2 from pj_base/builtin/image_annotations.hpp to pj_base/point2.hpp
(unchanged ABI; same struct).
- Surface manifest 'tags' array on PluginDescriptor + RuntimeToolboxPlugin.
Versioning: additive — no existing header, struct layout, or ABI signature
changes; required release level when merged is MINOR.
Verified locally: build green, 44/44 tests pass.1 parent 9003e55 commit c31f1c5
13 files changed
Lines changed: 1563 additions & 7 deletions
File tree
- pj_base/include/pj_base
- builtin
- pj_plugins
- filter_protocol/include/pj_plugins/sdk
- include/pj_plugins/host
- src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
| 36 | + | |
| 37 | + | |
41 | 38 | | |
42 | 39 | | |
43 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
20 | 39 | | |
21 | 40 | | |
22 | 41 | | |
| |||
29 | 48 | | |
30 | 49 | | |
31 | 50 | | |
32 | | - | |
| 51 | + | |
33 | 52 | | |
34 | 53 | | |
35 | 54 | | |
| |||
0 commit comments