< Previous PageNext Page > Hide TOC

QuickTime For Windows

If you are a Windows developer, the QuickTime Software Development Kit (SDK) for Windows allows you to incorporate QuickTime capabilities into your applications developed directly for the Windows platform. If you are a Macintosh developer, the SDK provides you with the tools you need to port the QuickTime-based functionality of your application to Windows. This chapter discusses some of the fundamental concepts you need to understand in order to work with both QuickTime and Windows.

In this section:

Overview
Mac OS and Windows Differences


Overview

The core of the QuickTime SDK for Windows is a Windows dynamic link library (DLL) that implements the behavior of QuickTime and a few Macintosh Toolbox routines on the Windows platform. This DLL is intended only for QuickTime cross-platform support, not as a general tool for porting Macintosh code to Windows.

Because the QuickTime routines were originally designed for the Mac OS, they operate on Mac OS data structures and assume certain features of the Mac OS operating environment. For example, QuickTime routines are driven by Mac OS-style events rather than Windows-style messages, and do their drawing in a Mac OS graphics port instead of a Windows device context. To use them in the Windows environment, you have to do a little extra work to mediate between the two platforms.

Table 1-1 lists the basic QuickTime Media Layer (QTML) concepts and their Windows counterparts.

Table 1-1  Windows and QTML concepts compared

Windows concept

QTML equivalent

Message (MSG)

Event (EventRecord)

Graphics Device Interface (GDI)

QuickDraw

Device context (DC)

Graphics port (CGrafPort)

Window handle (HWND)

Window pointer (CWindowPtr)

Common Dialog Box Library

Standard File Package

The goal here is simply to show how QuickTime fits into the structure of a typical Windows application and to provide Windows developers with the minimum conceptual foundation needed to read and understand the existing QuickTime documentation.

With those objectives in mind, the programming examples in this document have deliberately been kept simple and straightforward. The code samples are limited to the most basic QuickTime functionality: presenting a movie and allowing the user to manipulate and control its presentation through a standard QuickTime movie controller.

Mac OS and Windows Differences

The event-loop structure of Windows programming is remarkably similar to that of the Macintosh. The differences lie in the implementation details, not in the basic approach. The major differences that affect QuickTime are as follows:

A utility named RezWack, available in the QuickTime Windows SDK at http://developer.apple.com/sdk/index.html, moves these resources into an executable (.exe) or dynamic-link library (.dll) file in the Windows environment. QuickTime’s resource management routines will correctly locate and load movie resources when they are stored this way in a Windows application.



< Previous PageNext Page > Hide TOC


© 2005, 2006 Apple Computer, Inc. All Rights Reserved. (Last updated: 2006-01-10)


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.