AVFoundation Media Pipeline

•
7
•

Guides the implementation, modernization, and debugging of Apple AVFoundation media capture, playback, asset loading, and export pipelines.

AVFoundation Media Pipeline provides specialized guidance for architecting and repairing Apple media workflows across iOS and macOS. It enforces Apple documentation best practices for AVCaptureSession configuration, asynchronous AVAsset loading with Swift concurrency, AVPlayer state handling, AVAssetReader/AVAssetWriter loops, and sample-buffer back-pressure management. By enforcing strict queue isolation, preventing main-thread blocking, and establishing clear ownership boundaries between capture, playback, and UI layers, this skill ensures robust, high-performance multimedia applications.

主要功能

01Implements efficient AVAssetReader and AVAssetWriter pipelines with proper back-pressure handling
02Structures AVCaptureSession lifecycle, inputs, outputs, and dedicated serial capture queues
03Prevents main-thread performance bottlenecks in media export, transcode, and append loops
047 GitHub stars
05Modernizes legacy synchronous AVAsset property access using modern Swift async/await APIs
06Enforces clean architectural boundaries between UI state, capture sessions, and player items

使用场景

01Refactoring legacy Objective-C or older Swift AVFoundation code to modern async/await patterns
02Building custom video recording, transcoding, and frame-processing pipelines without memory bloat
03Diagnosing and resolving UI freezes caused by blocking media operations or missing back-pressure checks