Skip to content

Add MjpegFrameSource for live MJPEG streams - #11

Merged
Konstantysz merged 5 commits into
devfrom
feature/mjpeg-frame-source
Mar 9, 2026
Merged

Add MjpegFrameSource for live MJPEG streams#11
Konstantysz merged 5 commits into
devfrom
feature/mjpeg-frame-source

Conversation

@Konstantysz

Copy link
Copy Markdown
Owner

Summary

  • Implements MjpegFrameSource — a FrameSource (not FrameSeeker) backed by cv::VideoCapture with ffmpeg backend
  • Configurable reconnect logic via CameraConfig (uri, reconnectDelayMs, maxReconnectAttempts, grabTimeoutMs)
  • 8 TDD unit tests covering open/fail, grab, exhaustion, close, describe, factory, and FrameSeeker exclusion

Test plan

  • OpenFailsOnUnreachableUri — returns false for unreachable HTTP URI
  • OpenSucceedsOnLocalFileUri — opens local MJPEG .avi fixture
  • GrabReturnsFrameWithCorrectMetadata — sequenceNumber increments, captureTime set
  • GrabReturnsNulloptWhenExhausted — nullopt after frames run out
  • CloseReleasesCapture — IsOpen false, Grab returns nullopt after Close
  • DescribeContainsUri — Describe includes class name and URI
  • FactoryReturnsNonNullPtr — factory returns non-null unique_ptr
  • DoesNotImplementFrameSeeker — dynamic_cast to FrameSeeker returns nullptr
  • All 169 tests pass (no regressions)

Closes #3, #4

@Konstantysz
Konstantysz merged commit 077595f into dev Mar 9, 2026
1 check failed
@Konstantysz
Konstantysz deleted the feature/mjpeg-frame-source branch March 9, 2026 08:53
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.

1 participant