Pipeline Types
ParallelPipeline
Pipeline implementation for concurrent processing paths
Overview
ParallelPipeline
enables concurrent processing by running multiple pipelines in parallel. It manages frame distribution and collection across parallel paths while maintaining frame ordering guarantees.
Class Definition
Constructor Parameters
*args
List[List[FrameProcessor]]
requiredVariable number of processor lists, each representing a parallel processing path
Internal Components
Source
Sink
Queue Management
_up_queue
asyncio.Queue
Queue for upstream frame collection
_down_queue
asyncio.Queue
Queue for downstream frame collection
Frame Flow
Methods
Process Frame
Queue Processing
Usage Examples
Basic Parallel Processing
With Frame Distribution
Frame Handling Rules
- Input frames are sent to all parallel paths
- Each path processes frames independently
- Output frames are collected in order
- Duplicate frames are filtered using frame IDs
- System frames are handled specially
Task Management
Notes
- Requires at least one processing path
- Maintains frame ordering through queues
- Filters duplicate frames using frame IDs
- Handles system frames specially
- Supports nested parallel pipelines
- Provides clean task shutdown
- Thread-safe frame processing