Chapter 2. Media capture with AV Foundation

This chapter covers

  • Introducing media capture in AV Foundation
  • How video frames flow through the AV Foundation components to a preview layer
  • Configuring cameras and toggling device features
  • Implementing autofocus and tap-to-focus
  • Capturing still images
  • Handling UI rotation

To be able to scan barcodes with the iPhone camera, you need to understand two things: AV Foundation’s media capture functionality and its metadata detector.

Most iOS developers have little reason to familiarize themselves with AV Foundation. The usual kinds of apps have no need to capture audio or video. Even less often do developers need to manipulate or compose media. But this knowledge is a requirement for the barcode ...

Get Barcodes with iOS now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.