Collection

AVFoundation sample architecture

Source-backed, high-level architecture notes for Apple sample-code pages grouped in the AVFoundation folder.

  • Catalog module label: AVFoundation
  • Coverage: 28 / 28 sample pages documented
  • Source policy: archive hashes and extracted-tree references are verified locally before analysis

Samples

Sample Platforms High-level architecture Documented patterns
Adding a display mask rectangle metadata track to a movie file macOS A Swift sample with the source-visible chain AVAddDisplayMaskTrackMovieProcessorAVFoundation APIs.
AVCam: Building a camera app iOS, iPadOS, Mac Catalyst A Swift sample bundle with entry-bearing project variants AVCam, AVCamCaptureExtension, AVCamControlCenterExtension, each leading to AVFoundation APIs. Protocol-oriented abstraction, Delegate or data-source callbacks, Service object, Publisher-backed observable state, Actor isolation
AVCamBarcode: detecting barcodes and faces iOS, iPadOS, Mac Catalyst A Swift sample with the source-visible chain AppDelegateCameraViewControllerAVFoundation APIs. View-controller organization, Protocol-oriented abstraction, Delegate or data-source callbacks
AVCamFilter: Applying filters to a capture stream iOS, iPadOS, Mac Catalyst A C/Objective-C header, Metal, Objective-C, Swift sample with the source-visible chain AppDelegateCameraViewControllerFilterRendererCoreMedia / CoreVideo APIs. View-controller organization, Protocol-oriented abstraction, Delegate or data-source callbacks
AVMultiCamPiP: Capturing from Multiple Cameras iOS, iPadOS, Mac Catalyst A Metal, Swift sample with the source-visible chain AppDelegateViewControllerMovieRecorderAVFoundation APIs. View-controller organization, Delegate or data-source callbacks
Build a responsive camera app that launches quickly iOS, iPadOS, Mac Catalyst, macOS The archive contains documentation/configuration but no scannable implementation from which to verify a runtime architecture.
Capturing Cinematic video iOS, iPadOS, Mac Catalyst A Swift sample with the source-visible chain CinematicCaptureSampleAppCameraViewCinematicMetadataManagerCaptureServiceAVFoundation APIs. Protocol-oriented abstraction, Delegate or data-source callbacks, Service object, Publisher-backed observable state, Actor isolation
Capturing consistent color images iOS, iPadOS, Mac Catalyst A Swift sample with the source-visible chain ConstantColorCamAppContentViewDataModelSwiftUI / Photos APIs. Delegate or data-source callbacks, Binding-based state propagation
Capturing depth using the LiDAR camera iOS, iPadOS, Mac Catalyst A Metal, Swift sample with the source-visible chain LiDARDepthAppContentViewMTKColorTextureCoordinatorAVFoundation APIs. View-controller organization, Protocol-oriented abstraction, Delegate or data-source callbacks, Coordinator, Binding-based state propagation
Capturing Spatial Audio in your iOS app iOS, iPadOS, Mac Catalyst A Swift sample with the source-visible chain SpatialAudioDemoAppContentViewAudioPlayerViewModelAudioRecorderAVFoundation APIs. Model-View-ViewModel, Delegate or data-source callbacks
Converting projected video to Apple Projected Media Profile macOS A Swift sample with the source-visible chain ProjectedMediaConversionAPMPConverterAVFoundation APIs.
Converting side-by-side 3D video to multiview HEVC and spatial video macOS A Swift sample with the source-visible chain SideBySideToMVHEVCSideBySideConverterAVFoundation APIs.
Creating a seamless multiview playback experience iOS, iPadOS, Mac Catalyst, tvOS A Swift sample with the source-visible chain MultiviewPlaybackSampleAppAppMainViewLayoutGridViewModelAVFoundation APIs. Model-View-ViewModel, View-controller organization, Binding-based state propagation
Debugging AVFoundation audio mixes, compositions, and video compositions iOS, iPadOS, Mac Catalyst A Swift sample with the source-visible chain AppDelegatePlayerViewControllerAVFoundation APIs. View-controller organization, Delegate or data-source callbacks
Editing and playing HDR video iOS, iPadOS, Mac Catalyst, macOS A Metal, Swift sample bundle with entry-bearing project variants CIFilter-iOS, CommonUI-macOS, each leading to AVFoundation APIs. Delegate or data-source callbacks, Coordinator, Builder, Binding-based state propagation
Enhancing live video by leveraging TrueDepth camera data iOS, iPadOS, Mac Catalyst A Metal, Swift sample with the source-visible chain AppDelegateCameraViewControllerAVFoundation APIs. View-controller organization, Delegate or data-source callbacks
Integrating AirPlay for long-form video apps iOS, iPadOS, Mac Catalyst A Swift sample with the source-visible chain AppDelegateRemoteControlViewControllerAVFoundation APIs. View-controller organization, Delegate or data-source callbacks
Processing spatial video with a custom video compositor iOS, iPadOS, Mac Catalyst, macOS, visionOS A Swift sample with the source-visible chain AVFSpatialCustomVideoCompositorSampleContentViewSampleModelAVFoundation APIs. Protocol-oriented abstraction, Builder
Providing an integrated view of your timeline when playing HLS interstitials iOS, iPadOS, Mac Catalyst A Swift sample with the source-visible chain HLSInterstitialDemoAppMenuViewContentViewModelAVFoundation APIs. Model-View-ViewModel, Protocol-oriented abstraction, Delegate or data-source callbacks, Coordinator, Actor isolation
Reading multiview 3D video files macOS A Swift sample with the source-visible chain StereoViewerAppLaunchViewMediaDetailViewModelAVFoundation APIs. Model-View-ViewModel
Streaming depth data from the TrueDepth camera iOS, iPadOS, Mac Catalyst A C/Objective-C header, Metal, Objective-C, Objective-C++, Swift sample with the source-visible chain AppDelegateCameraViewControllerFilterRendererCoreVideo / CoreMedia APIs. View-controller organization, Protocol-oriented abstraction, Delegate or data-source callbacks
Supporting Center Stage front camera in your iOS app iOS, iPadOS, Mac Catalyst A Swift sample with the source-visible chain CenterStageFrontCamCameraViewCameraModelCaptureServiceAVFoundation APIs. Protocol-oriented abstraction, Delegate or data-source callbacks, Service object, Actor isolation
Supporting Continuity Camera in your macOS app macOS A Swift sample with the source-visible chain ContinuityCamAppContentViewPreferredCameraObserverAVFoundation APIs. SwiftUI environment injection, Binding-based state propagation, Publisher-backed observable state
Supporting coordinated media playback iOS, iPadOS, Mac Catalyst A Swift sample with the source-visible chain AppDelegateMovieDetailViewControllerCoordinationManagerAVFoundation APIs. View-controller organization, Delegate or data-source callbacks, Publisher-backed observable state
Supporting remote interactions in tvOS tvOS A Swift sample with the source-visible chain AppDelegateCustomPlayerViewControllerCustomPlayerAVFoundation APIs. View-controller organization, Protocol-oriented abstraction, Delegate or data-source callbacks
Using AVFoundation to play and persist HTTP live streams iOS, iPadOS, Mac Catalyst A Swift sample with the source-visible chain AppDelegateAssetListTableViewControllerAssetListManagerAVFoundation APIs. View-controller organization, Protocol-oriented abstraction, Delegate or data-source callbacks
Using HEVC video with alpha macOS A Swift sample bundle with entry-bearing project variants HEVC-Videos-With-Alpha-AssetWriting, HEVC-Videos-With-Alpha-Playback, each leading to AVFoundation APIs. View-controller organization, Delegate or data-source callbacks
Writing fragmented MPEG-4 files for HTTP Live Streaming macOS A Swift sample centered on Segment, with direct use of AVFoundation, VideoToolbox.

Cross-sample signals

Recurring documented patterns

Pattern label Sample documents
Delegate or data-source callbacks 19
View-controller organization 13
Protocol-oriented abstraction 11
Binding-based state propagation 5
Publisher-backed observable state 4
Actor isolation 4
Model-View-ViewModel 4
Service object 3
Coordinator 3
Builder 2

Type-role naming evidence

Counts below are declaration-name suffixes, not inferred patterns.

Role suffix Distinct declarations across samples
View 73
Delegate 29
Controller 22
Coordinator 10
ViewModel 10
App 9
Model 8
Manager 7
Service 6
Observer 4
Converter 4
Renderer 4
Recorder 2
Builder 2
Player 2
Processor 1
Loader 1
Command 1

Swift access-control evidence

These are declaration occurrences in scanned Swift source, including implicit internal declarations.

Access level Occurrences
implicit internal 4145
private 1111
private(set) 98
public 25
fileprivate 8

References

Generated from the verified local catalog and completed Markdown documents.