Back to Selected Work
Desktop (Linux, macOS & Windows)C++ / Dart FFI< 45ms Input Latency

FrameLink — Low-Latency Screen Mirroring Desktop App

High-performance desktop application engineered for ultra-low latency mobile device projection and remote control via native C++ decoding.

Domain
Desktop Applications
My Role
Core Developer
Source Code
Proprietary
Primary Stack
Flutter Desktop, C++
The Problem & Motivation

Why this was built

Standard screen mirroring utilities often rely on heavy web wrappers or high-overhead network transports, introducing noticeable input lag (150ms+) that ruins interactive app testing and live presentations.

Architecture & Execution

Technical Approach

Bypassed standard Flutter framework overhead by decoding the H.264/raw video stream in native C++ and projecting frames directly into Flutter's rendering canvas through Dart FFI (Foreign Function Interface) memory buffers.

Technologies Used:
Flutter DesktopC++Dart FFIWebRTCH.264Linux/macOS/Windows
Dart FFI Native C++ Binding Example
Source Snapshot
// Dart FFI declaration linking directly to native C++ video decoder
typedef DecodeFrameC = Int32 Function(Pointer<Uint8> buffer, Int32 length);
typedef DecodeFrameDart = int Function(Pointer<Uint8> buffer, int length);

class NativeVideoDecoder {
  late final DynamicLibrary _nativeLib;
  late final DecodeFrameDart decodeFrame;

  NativeVideoDecoder() {
    _nativeLib = Platform.isWindows 
        ? DynamicLibrary.open('video_decoder.dll')
        : DynamicLibrary.process();
    decodeFrame = _nativeLib
        .lookup<NativeFunction<DecodeFrameC>>('decode_frame_buffer')
        .asFunction();
  }
}

Key Architectural Features & Outcomes

01

Hardware-accelerated video decoding with adaptive frame pacing

02

Bi-directional input event forwarding under 45ms end-to-end latency

03

Memory-safe buffer pooling to prevent frame drops under high CPU load

04

Cross-platform compilation across Linux, macOS, and Windows runtimes