Mac Developer Library

Developer

Media Library Framework Reference

Introduction

Classes   Other Reference  

The Media Library framework provides a read-only Objective-C data model representing a user’s collections of images, audio, and video. The initial access point of the Media Library framework is MLMediaLibrary, which loads the user’s media into a hierarchical structure consisting of media sources, groups, and objects.

At the highest level, all content within a media library instance is categorized by media source. Conceptually, a media source respresents a single app, such as iTunes or Aperture. Each source contains a hierarchy of media groups that originates from a root group. These groups consist of media objects—individual files containing a piece of media such as a photo, song, or movie. Only one copy of each object exists within a media library instance, but an object can be referenced by multiple groups from a single source. The structure of the group hierarchy is specific to each media source.

Figure I-1Sample structure of an MLMediaLibrary instance image: ../Art/MediaLibraryHierarchy_2x.png

Classes

Class

Abstract

NSObject

NSObject is the root class of most Objective-C class hierarchies.

MLMediaGroup

The MLMediaGroup class provides groupings for media objects from a single source of media, such as iTunes or Aperture.

MLMediaLibrary

The MLMediaLibrary class provides an interface for accessing a collection of media objects from various sources.

MLMediaObject

The MLMediaObject class describes a single media file, such as a photo, song, or movie.

MLMediaSource

The MLMediaSource class identifies a specific provider of media.

Other Reference

Reference

Media Library Constants Reference