Skip to content

ENT-969: Add TestPatternStreamProducer as a built-in video source type#2056

Merged
PawelPeczek-Roboflow merged 3 commits intomainfrom
nv/feat/ent-xxx-testPatternStream
Mar 6, 2026
Merged

ENT-969: Add TestPatternStreamProducer as a built-in video source type#2056
PawelPeczek-Roboflow merged 3 commits intomainfrom
nv/feat/ent-xxx-testPatternStream

Conversation

@NVergunst-ROBO
Copy link
Contributor

What does this PR do?

Adds a synthetic 1920x1080 test pattern with colored grid and live clock

20260301_104136_Export

Type of Change

  • New feature (non-breaking change that adds functionality)

Testing

  • I have tested this change locally

also tested with full changes in roboflow app and inference for manufacturing on a local jetson device.

Test details:
test_is_test_pattern_reference_accepts_valid_and_rejects_invalid -- Verifies the guard function correctly identifies "TestPatternStreamProducer" strings (with whitespace/suffixes) and rejects integers, RTSP URLs, partial matches, and empty strings.
test_generate_frame_produces_valid_image -- Confirms the frame generator outputs a 1920x1080 BGR uint8 image that isn't all black.
test_discover_source_properties_for_test_pattern -- Checks the producer reports correct width, height, fps, is_file=False, and is_reconnectable=True.
test_video_source_starts_and_reads_frames_from_test_pattern -- End-to-end: passes "TestPatternStreamProducer" as a video reference to VideoSource, starts the stream, reads a frame, and verifies the source is RUNNING with stream-mode buffer strategies.

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code where necessary, particularly in hard-to-understand areas
  • My changes generate no new warnings or errors
  • I have updated the documentation accordingly (if applicable)

Additional Context

Adds a synthetic 1920x1080 test pattern with colored grid and live
clock. Resolution happens in VideoSource._start alongside the existing
callable and CV2 dispatch, keeping all producer types in one place.

Made-with: Cursor
@NVergunst-ROBO NVergunst-ROBO force-pushed the nv/feat/ent-xxx-testPatternStream branch from 3348763 to d81a8fe Compare March 1, 2026 11:08
@NVergunst-ROBO NVergunst-ROBO marked this pull request as ready for review March 2, 2026 15:46
Copy link
Contributor

@dkosowski87 dkosowski87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we plan to check it manually or through some automatic tests? I'm wondering whether it wouldn't be better to move the test_pattern_producer to the test directory, so it doesn't pollute the core inference scope. WDYT?

@NVergunst-ROBO NVergunst-ROBO enabled auto-merge (squash) March 6, 2026 16:50
@PawelPeczek-Roboflow
Copy link
Collaborator

Probably test_pattern_producer is intended name

@PawelPeczek-Roboflow PawelPeczek-Roboflow merged commit be557aa into main Mar 6, 2026
45 checks passed
@PawelPeczek-Roboflow PawelPeczek-Roboflow deleted the nv/feat/ent-xxx-testPatternStream branch March 6, 2026 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants