Overview
WakeNotifierFilter monitors the pipeline for specific frame types and triggers a notification when those frames pass a custom filter condition. It passes all frames through unchanged while performing this notification side-effect.
Constructor Parameters
BaseNotifier
required
The notifier object to trigger when conditions are met
Tuple[Type[Frame]]
required
Tuple of frame types to monitor
Callable[[Frame], Awaitable[bool]]
required
Async function that examines each matching frame and returns True to trigger
notification
Functionality
The processor operates as follows:- Checks if the incoming frame matches any of the specified types
- If it’s a matching type, calls the filter function with the frame
- If the filter returns True, triggers the notifier
- Passes all frames through unchanged, regardless of the filtering result
Output Frames
- All frames pass through unchanged in their original direction
- No frames are modified or filtered out
Usage Example
Frame Flow
Notes
- Acts as a transparent pass-through for all frames
- Can trigger external events without modifying pipeline flow
- Useful for signaling between pipeline components
- Can monitor for multiple frame types simultaneously
- Uses async filter function for complex conditions
- Functions as a “listener” that doesn’t affect the data stream
- Can be used for logging, analytics, or coordinating external systems