-
Notifications
You must be signed in to change notification settings - Fork 59
[ViPPET] Implementation of common pipeline element selection #963
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements a common pipeline element selection system to unify and improve how pipeline elements (encoder, decoder, postprocessing, compositor) are selected based on device types across the visual pipeline evaluation tool.
- Introduces shared
PipelineElementsSelector
andPipelineElementSelectionInstructions
classes for consistent element selection logic - Adds compositor device selection support throughout the UI, configuration, and pipeline implementation
- Replaces hardcoded element selection with dynamic mapping that supports VAAPI suffixes and fallback mechanisms
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
pipelines/_common/common.py | New shared classes for pipeline element selection logic with device-specific mappings |
pipelines/smartnvr/pipeline.py | Refactored to use common element selector, added compositor device support, improved error handling |
pipelines/simplevs/pipeline.py | Refactored to use common element selector, streamlined decoder/postprocessing logic |
tests/pipelines_tests/smartnvr_tests/pipeline_test.py | Updated test expectations to match new element selection behavior |
tests/pipelines_tests/simplevs_tests/pipeline_test.py | Updated test expectations for new decoder elements and added GPU-specific tests |
app.py | Added compositor device dropdown to UI with proper rendering logic |
pipelines/smartnvr/config.yaml | Enabled compositor device parameter |
pipelines/simplevs/config.yaml | Disabled compositor device parameter (not applicable) |
utils.py | Added compositor_device parameter handling |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
tools/visual-pipeline-and-platform-evaluation-tool/pipelines/smartnvr/pipeline.py
Show resolved
Hide resolved
tools/visual-pipeline-and-platform-evaluation-tool/pipelines/smartnvr/pipeline.py
Show resolved
Hide resolved
self._shmsink_branch = ( | ||
"tee name=livetee " | ||
"livetee. ! queue2 ! {encoder} ! h264parse ! mp4mux ! filesink location={VIDEO_OUTPUT_PATH} async=false " | ||
"livetee. ! queue2 ! videoconvert ! video/x-raw,format=BGR,width={output_width},height={output_height} ! {shmsink} " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe videoconvert is CPU based.
On platform with GPU, we want to use vapostproc instead
decoder={ | ||
GPU_0: [ | ||
( | ||
"vaapidecodebin", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets not use vaapiXXXX elements. They have been deprecated.
("va", "decodebin3", "..."), | ||
("va", "vah264enc", "..."), | ||
("va", "vah264dec", "..."), | ||
("va", "vaapidecodebin", "..."), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do not use vaapi elements - they are deprecated for >1 year and will be removed in upcoming GStreamer releaes
Common Pipeline Element Selection
PipelineElementsSelector
andPipelineElementSelectionInstructions
classes from_common/common.py
.simplevs/pipeline.py
andsmartnvr/pipeline.py
with a shared, maintainable approach.New Features
app.py
), configuration (config.yaml
), and pipeline logic.compositor_device
parameter is now propagated and used for element selection.Fixes and Improvements
Tests