QTKit is a Cocoa-based, Objective-C framework (QTKit.framework) with a rich and evolving API for manipulating time-based media. Introduced in OS X v10.4, QTKit provides a set of Objective-C classes and methods specifically designed to handle the basic chores of playback, editing, export, audio/video capture and recording, in addition to a number of other multimedia capabilities. Each iteration of the framework from Apple, accompanying the latest release of OS X, has extended the power and reach of the API.

Toward that end, OS X v10.6 introduces QuickTime X, a new media architecture for efficient, high-performance playback of audio/video media, with optimized support for modern codecs. As an Objective-C API, QTKit provides a great deal of functionality in a relatively small package, with methods and classes that support a wide range of media-related tasks, such as playback, editing, and capture.

The goal of this programming guide is to show you how to take advantage of the QTKit classes and methods in your application, through code examples and step-by-step procedures that illustrate various coding techniques and best practices. In addition, the guide provides you with a class hierarchy and architectural overview of the framework itself, grouping some of the most frequently used playback and capture methods to accomplish particular tasks.

Who Should Read This Document

If you are a media developer who wants to integrate movies in your Cocoa application, you should read the material in this document. You don’t necessarily need to be a seasoned Cocoa programmer to take advantage of the capabilities provided in the QTKit framework, although you’ll need some prior experience working with Objective-C, Xcode, and Interface Builder to build and compile the code examples described in this guide. The document describes QTKit for OS X v10.6 and later.

A prerequisite for working with the QTKit framework is a basic understanding of Cocoa and the Objective-C programming language. The basics of Cocoa and Objective-C are discussed in detail in the Cocoa Fundamentals Guide and The Objective-C 2.0 Programming Language guide. It may also be helpful to have an understanding of the OS X graphics and imaging technologies which are described in Mac Technology Overview. If you need to learn the basics of how to build and compile a media playback or recorder application, refer to the QTKit Application Tutorial. The tutorial is intended to get you rapidly up to speed with QTKit by working step by step through a set of code samples that let you accomplish playback and recording tasks.

Organization of This Document

This guide is organized into an overview chapter that discusses the fundamentals of the QTKit architecture, followed by a chapter describing the QTKit classes and methods designed for audio/video capture and recording. The last chapter deals with how to modify your existing QTKit code to take advantage of the improved playback performance and modern codec optimizations available in Mac OS v10.6 and the new media architecture of QuickTime X.

What You Need

To work with the code examples described in this programming guide, make sure you are running OS X v10.6 and have the following tools installed on your system:

See Also

For more information on the technologies and tools you use in this programming guide, consult the following Apple documentation:

The various QuickTime and Cocoa mailing lists also provide a useful developer forum for raising issues and answering questions that are posted. To subscribe, check out the QuickTime-API Mailing List and the Cocoa Development list.