Skip to content

Feature/stream session frame stream#4

Draft
kelvinharron wants to merge 2 commits intomainfrom
feature/stream-session-frame-stream
Draft

Feature/stream session frame stream#4
kelvinharron wants to merge 2 commits intomainfrom
feature/stream-session-frame-stream

Conversation

@kelvinharron
Copy link
Copy Markdown
Collaborator

Pull Request

Breaking Changes

  • Reworked captureStreamFrame API — The method now returns Future<Uint8List?> (JPEG bytes) instead of Future<CapturedFrame?>, reading latest pixel buffer from memory instead of from a flutter texture.
  • Removed CapturedFrame class — Replaced by raw Uint8List JPEG data.
  • Removed FrameFormat enum — No longer needed since output is always JPEG.

New Features

  • Native JPEG frame capture — captureStreamFrame() now pulls the latest frame from the native pixel buffer and encodes it as JPEG on the native side (iOS via CIContext.jpegRepresentation, Android via Bitmap.compress). This works independently of the Flutter texture lifecycle, enabling background processing when the app is not in the foreground.
  • Configurable JPEG quality — New quality parameter (1–100, default 70) controls compression. Validated with ArgumentError on the Dart side.

Misc

  • MetaWearablesDatPlugin.kt changed a lot because of a lack of formatting. I recommend we run a lint pre commit on any changes.
  • This works really well for iOS only with .hvc1 VideoCodec as documented by Meta.
  • [] Test Android behaviour with configured background modes in Manfiest.
  • [] Document iOS changes needed outside of using .hvc1
  • [] Update Example app to showcase it.

…y of latest stream frame so it can work outside the texture fluttter lifetime for use in background processing
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