Skip to content

Conversation

@mprib
Copy link
Owner

@mprib mprib commented Jan 14, 2026

Summary

  • Replace RecordedStream with cleaner separation: FrameTimestamps (timing) + FramePacketPublisher (streaming)
  • FrameSource constructor now takes (video_directory, port) instead of raw path
  • Thread-safe pub/sub with Condition-based waiting (no spinlocks)
  • Built-in playback control (pause/unpause, seeking)

Test plan

  • test_synchronizer passes (was hanging)
  • test_sync_stream_manager passes (was hanging)
  • test_stream.py updated for new publisher API
  • test_frame_source.py updated for new constructor
  • Full CI suite

Closes #889

Replace RecordedStream with a cleaner separation of concerns:
- FrameTimestamps: immutable timing mapping (frame_index -> timestamp)
- FramePacketPublisher: streaming layer with pub/sub, threading, tracking

Key changes:
- FrameSource constructor now takes (video_directory, port) instead of path
- create_publisher() factory handles FrameSource + FrameTimestamps creation
- Thread-safe subscriber management with Condition-based waiting
- Playback control (pause/unpause, seeking) built-in

Also fixes flaky test_cancel_emits_cancelled_signal by adding proper
synchronization with start_event pattern.

Refs #889
@mprib mprib merged commit c9b7224 into 885-epic-video-playback-refactor Jan 14, 2026
9 checks passed
@mprib mprib deleted the 889-create-framepacketpublisher branch January 14, 2026 13:31
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.

2 participants