TweetFollow Us on Twitter

QuickTime 4 For Programmers

Volume Number: 15 (1999)
Issue Number: 11
Column Tag: Multimedia

QuickTime 4 For Programmers

by Tim Monroe, Apple Computer, Inc.

What's new in the latest version of Apple's flagship multimedia software

Introduction

QuickTime 4, the latest incarnation of Apple's digital multimedia playback and authoring software, was released to the public in its final form earlier this summer and, thanks to a little help from the Star Wars: Episode I craze, achieved an astounding 13 million downloads by the end of August. As you might know, George Lucas chose QuickTime as the sole distribution medium for the Internet versions of the trailers promoting the new Star Wars movie. Over 25 million downloads - over 450 terabytes of data - crossed the wires in the first few months, making this the largest Internet-related event in history.

What did the millions of people who chose the trailers encoded especially for QuickTime 4 get? Primarily they got a better user experience, owing both to some higher-quality video and audio codecs contained in QuickTime 4 and to an improved user interface for the basic QuickTime movie playing application. But they also got something they perhaps didn't realize or even care too much about at the time: the ability to receive video and audio streamed across the Internet. Among all the various improvements in QuickTime 4, this one stands out as the crown jewel: real-time audio and video streaming.

This streaming capability is important for several reasons. First, it gives users the ability to watch live events remotely. (Didn't get a seat in the hall at the latest MacWorld conference keynote address? No problem: just fire up your computer, connect to the Internet, and watch Apple's latest news and product announcements from the privacy of your own workspace.) Second, and just as important, it gives users the ability to view non-live events without downloading potentially huge files onto their computers; this permits applications such as video-on-demand and rebroadcast streaming.

In this article, I'll discuss some of the major innovations in QuickTime 4. I'll start by surveying the user-level enhancements, which mainly concern the new QuickTime Player application. Then I'll describe the important features of QuickTime's new streaming architecture and outline what you might need to do to make your existing QuickTime application streaming-savvy. Finally, I'll describe a few of the other API-level additions in QuickTime 4, which allow you to manage wired actions, multi-image files, network file transfers, and other useful tasks.

The User Experience

The first thing most people notice once they've installed QuickTime 4 is that the main movie-playing application bundled with the software sports a completely new look and feel. Indeed, the application is so different from earlier versions that it sports a new name as well; what used to be known as "MoviePlayer" is now known as "QuickTime Player". Figure 1 shows the new brushed-metal appearance of a QuickTime Player movie window.


Figure 1.The basic QuickTime Player window.

As you can see, the controller bar has a new look, complete with a built-in graphic equalizer to the right of the progress bar. The volume slider has been replaced with a thumbwheel, and the play/pause button is larger and more centrally located. Just underneath the play/pause button is a rectangle that the user can grab and drag to open a "drawer" containing a set of favorite movies and Internet channels, as seen in Figure 2. Clicking on an item in the favorites drawer either opens the selected movie or connects to the selected Internet channel.


Figure 2.The favorites drawer.

QuickTime Player includes a few other features not found in earlier player applications. The File menu now contains an "Open URL..." command; when the user selects this item, the player displays a dialog box (see Figure 3) that allows the user to specify a URL to open. The URL should specify the location of a movie file.


Figure 3.The Open URL dialog box.

Finally, QuickTime Player incorporates a new dynamic, web-based method for installing and updating QuickTime software. The Help menu contains an item labeled "Check for QuickTime Updates". If the user selects this item and the installed software is up-to-date, then QuickTime Player displays the dialog box shown in Figure 4.


Figure 4.Response for up-to-date software.

If, on the other hand, one or more components of the user's installed software has changed, or if new channels have been added to the favorites drawer, then QuickTime Player displays the dialog box shown in Figure 5. As you can see, the user can decide to go ahead and update the software or else defer updating to some later time.


Figure 5.Response for revised software.

If the user does decide to perform the update, QuickTime opens an Internet connection to a server containing the updated software and then downloads the necessary updates. While it performs the download, it displays a screen like the one shown in Figure 6.


Figure 6.The updater's progress dialog box.

QuickTime Streaming

Streaming is the process whereby one computer (the "server") chops a file up into discrete chunks ("packets") and sends them across a network to another computer (the "client"). The client's job is to reassemble the packets and do the right thing with them. It's important to keep in mind that QuickTime has supported a kind of streaming, called "HTTP streaming", ever since version 3 was released over a year ago. QuickTime's HTTP streaming allows the QuickTime browser plug-in to begin playing a movie embedded in a web page before the entire movie has downloaded. HTTP streaming is essentially a file transfer protocol, in the sense that the entire movie must be downloaded to the user's computer. The main advantage of QuickTime's HTTP streaming is that a user can begin interacting with web-based content before the entire movie arrives on the user's computer.

QuickTime 4 introduces a different kind of streaming, called "real-time streaming". With real-time streaming, packets are sent out over the network in real time (so that, for instance, a 10-minute movie would take 10 minutes to download). When packets are received by the client application (for instance, by QuickTime Player), they are reassembled into a QuickTime movie and played for the user. In general, packets are discarded as soon as they have been played, so no file is ever created on the user's local storage.

QuickTime's real-time streaming uses an open streaming protocol known as Realtime Transport Protocol (RTP) to send the packets of video and audio data. For control information, such as establishing a connection between the client and server or telling the server to jump to a new time in a video-on-demand movie, QuickTime uses a different protocol known as Realtime Streaming Protocol (RTSP). Figure 7 shows the basic network protocols used by QuickTime's streaming architecture. RTSP uses the TCP/IP transport layer, while RTP uses the lower-level UDP/IP transport layer.


Figure 7.The basic QuickTime streaming protocols.

Because RTP uses UDP/IP, it does not guarantee delivery of packets. So it's possible for some packets to get lost in transit and never arrive at the client computer. If you need guaranteed delivery of packets, you should use HTTP streaming, which uses TCP/IP to ensure that all transmitted packets are in fact received (retransmitting any lost packets).

QuickTime 4 supports streaming of video and audio data in any of the formats that can be played locally by QuickTime, including AVI, Sorenson, QDesign, MP3, and MIDI. It cannot currently stream movies containing sprite tracks or that incorporate features that depend on track references, such as QuickTime video effects, chapter lists, and some tweening effects. To handle these sorts of movies, you can either use HTTP streaming or you can create movies that store some data locally and combine that data with data received via RTP streaming.

The files that reside on the streaming server are standard QuickTime movies, with one important addition: each track in the movie that is to be streamed across the network must be accompanied by a "hint track". The hint track contains information that tells the server how to packetize the corresponding streamed track. In other words, the hint track is a sort of blueprint for creating streams of data. Without the hint track, the server software would have to know a great deal about the particular audio or video format contained in the streamed track, so that it would know how best to chop the data up into packets (for instance, possibly duplicating some of the packets to protect against losing important frames of video). The hint track essentially insulates the server software from having to know anything about the actual video or audio data it's serving.

This is especially important because it allows streaming servers to run on operating systems that don't even run QuickTime. Indeed, the first commercially available QuickTime server application, Apple's QuickTime Streaming Server (QTSS), debuted on machines running the Mac OS X Server software, where QuickTime client software is not yet supported. Moreover, Apple has released the source code for the QuickTime Streaming Server under the Apple Public Source License, which conforms to the Open Source community guidelines. You can expect to see versions of QTSS running under Windows NT and various flavors of UNIX (such as BSD, Linux, and Solaris).

Making Your QuickTime Application Streaming Savvy

Now let's suppose that you've written an application that plays QuickTime movies. The simplest way to handle QuickTime movie playback is to open the movie file (by calling the OpenMovieFile function), get the movie data from the movie file (by calling the NewMovieFromFile function), and then associate a movie controller with the movie (by calling the NewMovieController function.) The movie controller provides whatever user interface is appropriate for the type of movie being played (unless you explicitly request that no user interface be displayed). The movie controller also handles the entire interaction with the user (starting or stopping the movie, navigating within a QuickTime VR node, and so forth).

As you've seen, QuickTime 4 introduces a new kind of movie: streamed movies, or movies whose contents are served to local client applications by a remote streaming server. An application generally starts receiving streamed content by opening a movie from an RTSP URL or from a local QuickTime movie file that contains a streaming track. In general, existing applications that play back QuickTime movie files should be able to handle QuickTime movie files that contain a streaming track without changes. (We'll show how to handle URL-specified movies in a little while.) However, for optimum user experience and movie playback, you will want to make several small changes to your application to make it fully streaming savvy. The main changes you'll want to make concern "preprerolling" your movies, reacting to any changes in the dimensions of streamed movies, and possibly intercepting the streaming status messages that are displayed in the movie's controller bar.

Prerolling and Preprerolling

Prerolling a movie is a technique for improving the playback performance of the movie. When you ask the Movie Toolbox to preroll a movie (typically by calling the function PrerollMovie), the Movie Toolbox opens the appropriate media handlers and tells them to prepare to play the movie. The media handlers may then load some of the movie data, set up sound channels, start up decompression sequences, and the like. (See <http://www.apple.com/quicktime/developers/icefloe/dispatch013.html> for an extensive discussion of prerolling movies.) With streamed movies, you may need to perform some additional actions even before you can preroll a movie, such as making network connections to the remote machine that is serving the streamed content, negotiating a streaming protocol, and setting up buffers to receive the streamed data. This process is known as "preprerolling".

When you are playing movies using QuickTime's standard movie controller and the movie is started as a result of a user action (such as clicking on the play button), the movie controller takes care of both preprerolling and prerolling. If you are playing movies using QuickTime's standard movie controller and you want to start the movie programmatically, then you can use the "preroll and play" action, like this:

MCDoAction(myMC, mcActionPrerollAndPlay, (void *)GetMoviePreferredRate(myMovie));

This is exactly the same thing you need to do for any QuickTime movie. In other words, when you are using the standard movie controller, you don't need to do anything special to handle streamed content. If the movie is a streamed movie, the movie controller first preprerolls it and then prerolls and starts it. Otherwise, if the movie doesn't contain any streamed data, the movie controller just prerolls and starts it.

If your application instead uses the Movie Toolbox to handle movie playback, then you do need to explicitly prepreroll your streamed movies before prerolling them. You can do this by calling the new PrePrerollMovie function. Here's one way to do this:

PrePrerollMovie(myMovie, 0, GetMoviePreferredRate(myMovie), NewMoviePrePrerollCompleteProc(MyMoviePrePrerollCompleteProc), (void *)0L);

PrePrerollMovie operates asynchronously. It returns (almost) immediately, thereby allowing your application to perform other processing while awaiting the completion of the preprerolling operations. When the preprerolling is finished, PrePrerollMovie calls the movie prepreroll completion procedure whose address you passed to it in the fourth parameter. In the simplest case, a movie prepreroll completion procedure will need to just preroll and start the movie, like this:

Listing 1: A simple movie prepreroll completion procedure

MyMoviePrePrerollCompleteProc

pascal void MyMoviePrePrerollCompleteProc (Movie theMovie, OSErr thePrerollErr, void *theRefcon)
{
	StartMovie(theMovie);
}

Note that StartMovie calls PrerollMovie internally, so there is no need to call both PrerollMovie and StartMovie in the movie prepreroll completion procedure. Also, there is no need to test that a movie is a streaming movie before calling PrePrerollMovie; for non-streaming movies, PrePrerollMovie calls the completion procedure immediately. It is important, however, to call MoviesTask on a preprerolling movie so that the Movie Toolbox has time to do the preprerolling operations.

Reacting to Size Changes

One interesting new feature of streamed movies is that their size may change dynamically during playback. In most cases, you'll want to adjust the size of the window or pane that contains the movie to reflect any such size changes. (Presumably, you already have code that knows how to adjust the size of a window or pane based on the size of a movie it contains.) To be able to support dynamic size changes, you first need to indicate to the Movie Toolbox that you want to be informed of any changes in the movie's size. You do this by setting a movie playback hint, as follows:

SetMoviePlayHints(myMovie, hintsAllowDynamicResize, hintsAllowDynamicResize);

Thereafter, whenever the size of myMovie changes, the associated movie controller sends the mcActionControllerSizeChanged controller action to your movie controller action filter procedure. You can intercept that action and respond to it as follows:

Listing 1: Dynamically resizing a window

MyMCActionFilterProc

pascal Boolean MyMCActionFilterProc (MovieController theMC, short theAction, void *theParams, long theRefCon)
{
	Movie		myMovie = MCGetMovie(theMC);

	switch (theAction) {
		// handle window resizing
		case mcActionControllerSizeChanged:
			MyResizeWindow(myMovie);
			break;
	}
	return(false);
}

If you allow the user to resize windows, you probably already have this code in your movie controller action filter procedure. In that case, you simply need to call SetMoviePlayHints as shown above (perhaps when you first open the movie).

Status Messages

The movie controller indicates the status of streaming operations by sending action messages to itself. By default, those messages are displayed in the message area of the controller bar, as illustrated in Figure 8.


Figure 8.A preprerolling status message.

You can intercept those messages in your movie controller action filter procedure by intercepting messages of type mcActionShowStatusString. The parameter data is a pointer to a structure of type QTStatusStringRecord, which is defined like this:

struct QTStatusStringRecord {
	long 						stringTypeFlags;
	char *						statusString;
};

You can identify streaming-specific messages by inspecting the stringTypeFlags field; if the bit kStatusStringIsStreamingStatus is set, then the message pertains to streaming operations. In addition, if the bit kStatusHasCodeNumber is set, then the high-order 16 bits of the stringTypeFlags field contain a result code.

The statusString field contains the actual text of the status message, which (if you do nothing to it) will be displayed in the controller bar status area. You can (if you like) suppress the display of the message or change the message to some other message. You can also display a message, at any time, in the controller bar of a streaming movie by calling the function QTStreamMsg_IssueMessage defined in Listing 2.

Listing 2: Displaying a streaming message

QTStreamMsg_IssueMessage

void QTStreamMsg_IssueMessage (MovieController theMC, char *theMessage)
{
	QTStatusStringRecord		myRecord;
	
	myRecord.stringTypeFlags = kStatusStringIsStreamingStatus;
	myRecord.statusString = theMessage;
	
	MCDoAction(theMC, mcActionShowStatusString, &myRecord);
}

As you can see, QTStreamMsg_IssueMessage simply fills in the fields of a status string record and calls MCDoAction to issue the action to the movie controller.

URL Data Handler

In QuickTime parlance, a data handler is a chunk of code that's responsible for reading (and perhaps also writing) a movie's data. For movies that reside on local storage volumes, you typically use the HFS data handler, which access a movie file using an alias to that file. It's also possible to build a movie completely in memory, in which case you can use QuickTime's handle data handler to access the movie's data. QuickTime 4 introduces another data handler that you might find useful, a URL data handler.

You can use the URL data handler to open movies that are specified using uniform resource locators (URLs). A URL is the address of some resource on the Internet or on a local disk. The QuickTime URL data handler can open HTTP URLs, FTP URLs, file URLs, and RTSP URLs. For instance, you can emulate QuickTime Player's Open URL menu item (see Figure 3) by passing a URL to the QTURL_NewMovieFromURL function defined in Listing 3. QTURL_NewMovieFromURL takes a URL as a parameter and opens the movie file found in that location.

Listing 3: Using the URL data handler

QTURL_NewMovieFromURL

Movie QTURL_NewMovieFromURL (char *theURL)
{
	Movie			myMovie = NULL;
	Handle			myHandle = NULL;
	Size				mySize = 0;
	
	// get the size of the specified URL
	mySize = (Size)strlen(theURL) + 1;
	if (mySize == 0) goto bail;
	
	// allocate a new handle
	myHandle = NewHandleClear(mySize);
	if (myHandle == NULL) goto bail;

	// copy the URL into the handle
	BlockMove(theURL, *myHandle, mySize);

	// instantiate a movie from the specified URL
	NewMovieFromDataRef(&myMovie, newMovieActive, NULL, myHandle, URLDataHandlerSubType);

bail:
	if (myHandle != NULL)
		DisposeHandle(myHandle);
		
	return(myMovie);
}

The main thing we need to do here is construct a data reference to the URL, which we can then pass to the NewMovieFromDataRef function. For the URL data handler, a data reference is simply a handle that contains the text of the URL and a terminating null byte. If you have worked with data references before, you'll recognize this as an exception to the usual practice with data references (where you need to pass a handle to a handle containing the relevant data).

Strictly speaking, a data handler can read and write any kind of data, not just movie data. So, for instance, you could use the URL data handler to read data from a file specified by a remote FTP URL while using the HFS data handler to write that data into a local file. The result would be a file-transfer application that did all its important work using QuickTime APIs alone. This is in fact fairly easy to write, even allowing for asynchronous file copying (copying where the application is free to perform other operations while the file is being transferred). See the accompanying sample code QTFileTransfer for exact details.

Wired Actions

One of the coolest new features of QuickTime 3 was its support for wired sprites, or sprites that react to mouse (and certain other) events and that have various actions attached (or "wired") to them. QuickTime 4 extends this support for wiring by allowing you to wire actions to events that concern things other than sprites. There are three main new wiring capabilities in QuickTime 4: wiring to QuickTime VR nodes and hot spots, to text in text tracks, and to Flash content.

QuickTime VR now supports two general kinds of wired actions: actions that are specific to a particular node and actions that are specific to a particular hot spot in a node. The node-specific actions can be attached to either idle events (so that an action can be triggered after a certain amount of time has elapsed) or to frame-loaded events (so that an action can be triggered when the node is first entered). You could, for instance, attach an action to a frame-loaded event to set the initial pan and tilt angles that are displayed when the user enters a node. Or, you could attach an action to a frame-loaded event to start a sound track playing when the user first enters a node. Moreover, you could use idle event actions to dynamically adjust the balance and volume of that sound as the user changes the pan angle of the movie; this would provide an easy way to make a sound appear to emanate from a specific location in a movie (in other words, this would provide "directional sound").

You can also attach wired actions to hotspots inside of QuickTime VR nodes. You can configure these actions to be triggered by a variety of mouse events, including moving the mouse over a hot spot, moving the mouse out of a hot spot, and clicking the mouse within a hot spot. Once again, the actions that are triggered by these events can be any actions supported by the QuickTime wired action architecture, such as starting and stopping sounds, enabling and disabling tracks, changing pan and tilt angles, and so forth.

QuickTime 4 allows you to attach wired actions to selections in a text track. Consider, for instance, the movie shown in Figure 9. This movie contains only one track, a text track. The text track is wired so that clicking on the word "Apple" launches the user's default web browser and loads the URL <http://www.apple.com/> and clicking on the word "CNN" loads the URL <http://www.cnn.com/>.


Figure 9.A text track with hypertext links.

The final new wiring capability provided by QuickTime 4 is the ability to attach wired actions to items in a Flash track. Flash is a file format developed by Macromedia for displaying vector-based graphics and animations. It's especially popular for web-based content delivery, since it combines rapid download speeds with an interactive browsing experience. Apple has licensed the Flash Player from Macromedia and has built it into QuickTime, thereby allowing QuickTime movies to include Flash graphics, animations, and interactivity. What's new in QuickTime 4 is the ability to attach wired actions to elements in a Flash track, thereby supplementing the native Flash interactivity. So, for instance, you can use Flash graphic elements (instead of sprites) to provide a user-interface for a QuickTime movie.

So now you might be wondering: how do I implement all these wonderful new wired action capabilities? The answer is that, in general, you don't need to use any new APIs. Instead, you just need to create the appropriate atom containers (which hold information about the desired actions) and attach them to the appropriate objects in the QuickTime movie. For instance, you would put a wired action container for a QuickTime VR node into the node information atom container that is contained in the media sample for that node in the QTVR track in the VR movie. Similarly, to add hypertext actions to a text sample, you simply add a text atom extension of the type kHyperTextTextAtomType to the end of the sample; the data of the text atom extension is the container that holds the information about the actions. The code showing how to do this is straightforward but not very exciting (and a tad lengthy). Take a look at the sample code on the QuickTime 4 SDK for some real-life examples.

One new use of wired actions in QuickTime 4 that we can easily illustrate is adding a new movie to QuickTime Player's favorites drawer (see Figure 2 once again). We do this by issuing a movie controller action of type mcActionExecuteOneActionForQTEvent, where the action to be executed is the new kActionAddChannelSubscription action. So we need to build an atom container that holds the desired atom and then send that atom container to a movie controller, as illustrated in Listing 4. (We've removed all error-checking to save some space.)

Listing 4: Adding a movie to QuickTime Player's favorites drawer

QTChan_AddMovieToFavorites
void QTChan_AddMovieToFavorites (Str255 theMovieName, char *theMovieURL, char *theMoviePictureURL)
{
	QTAtomContainer 			myActions = NULL;
	QTAtom								myActionAtom = 0;
	long									myAction;
	ResolvedQTEventSpec		myEventSpec;
	MovieController				myMC = NULL;
	
	// create a new atom container to hold a single action atom
	QTNewAtomContainer(&myActions);
	QTInsertChild(myActions, kParentAtomIsContainer, kAction, 1, 1, 0, NULL, &myActionAtom);
	
	// specify the action type
	myAction = EndianS32_NtoB(kActionAddChannelSubscription);
	QTInsertChild(myActions, myActionAtom, kWhichAction, 1, 1, sizeof(long), &myAction, NULL);
	
	// add the three parameters to the action atom
	QTInsertChild(myActions, myActionAtom, kActionParameter, 1, 1, theMovieName[0], &theMovieName[0], NULL);
		
	QTInsertChild(myActions, myActionAtom, kActionParameter, 2, 2, strlen(theMovieURL) + 1, theMovieURL, NULL);
		
	QTInsertChild(myActions, myActionAtom, kActionParameter, 3, 3, strlen(theMoviePictureURL) + 1, theMoviePictureURL, NULL);
	
	// fill in a ResolvedQTEventSpec structure
	myEventSpec.actionAtom.container = myActions;
	myEventSpec.actionAtom.atom = myActionAtom;
	myEventSpec.targetTrack = NULL;
	myEventSpec.targetRefCon = 0L;
	
	// instantiate a movie controller
	OpenADefaultComponent(MovieControllerComponentType, 0, &myMC);
		
	MCDoAction(myMC, mcActionExecuteOneActionForQTEvent, (void *)&myEventSpec);
	if (myActions != NULL)
		DisposeAtomContainer(myActions);
	if (myMC != NULL)
		CloseComponent(myMC);
}

The data that we need to pass to the movie controller for the action mcActionExecuteOneActionForQTEvent is a pointer to a structure of type ResolvedQTEventSpec, which specifies an action atom and the container that holds that atom. The action atom, in turn, contains the action specifier and three parameters, which indicate the name of the movie being added to the favorites drawer, the location of that movie, and the location of the picture that is to be displayed in the drawer.

Multi-Image Support

In addition to its support for motion and interactive content, QuickTime provides a powerful set of services for displaying still images. QuickTime 4 provides, in particular, enhanced capabilities for both importing and exporting PNG, TIFF, TARGA, MacPaint, and Macromedia Flash formats. QuickTime 4 also provides the ability to import (but not export) graphics in the FlashPix format defined by the Digital Imaging Group. Also, QuickTime 4 adds support for image files that contain more than one image. This is necessary for FlashPix files (which contain multiple resolutions of an image), and it is also useful for opening and displaying PhotoShop files (which store layers as separate images in a single file).

You can determine how many images a particular graphics file contains by using the GraphicsImportGetImageCount function. And you select which of numerous images will be displayed by calling the GraphicsImportSetImageIndex function. Listing 5 illustrates how to display all the images contained in a specified file.

Listing 5: Displaying all images in a graphics file

QTMulti_ShowAllImagesInFile

void QTMulti_ShowAllImagesInFile (FSSpecPtr theFile)
{
	Rect								myRect;
	unsigned long			myCount, myIndex, myIgnore;
	OSErr							myErr = noErr;
	// get a graphics importer for the file and determine how many images are in it
	myErr = GetGraphicsImporterForFile(theFile, &gImporter);
	if (myErr != noErr) goto bail;
	myErr = GraphicsImportGetImageCount(gImporter, &myCount);
	if (myErr != noErr) goto bail;
	// loop thru all images the image file, drawing each into a window
	for (myIndex = 1; myIndex <= myCount; myIndex++) {
		// set the image index we want to display
		myErr = GraphicsImportSetImageIndex(gImporter, myIndex);
		if (myErr != noErr) goto bail;
		// determine the natural size of the image
		GraphicsImportGetNaturalBounds(gImporter, &myRect);
		MacOffsetRect(&myRect, 50, 50);
		// create a window to display the image in
		gImageWindow = NewCWindow(NULL, &myRect, "\pUntitled", 
					true, movableDBoxProc, (WindowPtr)-1L, true, 0);
		if (gImageWindow == NULL) goto bail;
		// set the current port and draw
		GraphicsImportSetGWorld(gImporter, 
													(CGrafPtr)gImageWindow, NULL);
		GraphicsImportDraw(gImporter);
		Delay(kImageDisplayTime, &myIgnore);
		DisposeWindow(gImageWindow);
	}
bail:
	if (gImporter != NULL)
		CloseComponent(gImporter);
}

Shortcut Movies

A shortcut is a QuickTime reference movie that references a single other movie. A typical reference movie references more than one other movie, and the target of the reference movie is determined at runtime depending on certain features of the user's machine, such as the actual components that are available on the machine or the speed of the user's connection to the Internet. (Reference movies that select a target depending on the speed of the Internet connection are also called "multiple data rate movies".) A shortcut is essentially the simplest possible reference movie; all it does is refer to some target, which is opened (or imported) when the reference movie is opened (or imported).

Shortcut movies can be useful as a cross-platform, media-centric aliasing mechanism. The data reference contained in a shortcut can be any one of the data reference types supported by QuickTime (an alias to a file, a URL to an FTP or HTTP movie, and so forth) and that reference can address any kind of data that can be opened by QuickTime. Thus, you could put shortcut movies on a server that point to files elsewhere on the server, on another server, or even on the user's local machine. When a user opens a shortcut movie, its target data is automatically opened. This indirection allows a server administrator to move the files targetted by some shortcut movies to new locations and then update the shortcuts. Any client references to the shortcuts (HTML embeddings, explicit URLs used by an application, and so forth) would be unaffected by this move.

Shortcut movies have been supported by QuickTime beginning with version 3. QuickTime version 4 introduced the Movie Toolbox function CreateShortcutMovieFile, which you can use to create a shortcut movie given a data reference, its type, and a specification of the output shortcut movie file.

Conclusion

QuickTime 4 provides a wealth of new features - both for the end user and for the applications developer - and of course we've only really scratched the surface in looking at any of them. The most important new addition is QuickTime's new real-time streaming architecture, which permits live broadcasts and video-on-demand services over existing networks using industry-standard networking protocols. In addition, the server-side component of the streaming architecture is implemented using non-proprietary file formats. This opens the door for a wide variety of server products that can deliver high-quality streamed content from virtually any computer in the world to any other computer that is running the QuickTime client software. The day of desktop broadcasting has arrived!

References

  • The main source of QuickTime 4 software, documentation, sample code, and other information is the web site <http://www.apple.com/quicktime>.
  • You can download the source code for the QuickTime Streaming Server at <http://www.publicsource.apple.com>.

Tim Monroe <monroe@apple.com> is a software engineer on Apple's QuickTime team. He is currently developing sample code and utilities for the QuickTime software development kit.

 
AAPL
$97.67
Apple Inc.
+0.64
MSFT
$44.50
Microsoft Corpora
+0.10
GOOG
$589.02
Google Inc.
-4.33

MacTech Search:
Community Search:

Software Updates via MacUpdate

Vienna 3.0.0 RC 2 :be5265e: - RSS and At...
Vienna is a freeware and Open-Source RSS/Atom newsreader with article storage and management via a SQLite database, written in Objective-C and Cocoa, for the OS X operating system. It provides... Read more
VLC Media Player 2.1.5 - Popular multime...
VLC Media Player is a highly portable multimedia player for various audio and video formats (MPEG-1, MPEG-2, MPEG-4, DivX, MP3, OGG, ...) as well as DVDs, VCDs, and various streaming protocols. It... Read more
Default Folder X 4.6.7 - Enhances Open a...
Default Folder X attaches a toolbar to the right side of the Open and Save dialogs in any OS X-native application. The toolbar gives you fast access to various folders and commands. You just click... Read more
TinkerTool 5.3 - Expanded preference set...
TinkerTool is an application that gives you access to additional preference settings Apple has built into Mac OS X. This allows to activate hidden features in the operating system and in some of the... Read more
Audio Hijack Pro 2.11.0 - Record and enh...
Audio Hijack Pro drastically changes the way you use audio on your computer, giving you the freedom to listen to audio when you want and how you want. Record and enhance any audio with Audio Hijack... Read more
Intermission 1.1.1 - Pause and rewind li...
Intermission allows you to pause and rewind live audio from any application on your Mac. Intermission will buffer up to 3 hours of audio, allowing users to skip through any assortment of audio... Read more
Autopano Giga 3.6 - Stitch multiple imag...
Autopano Giga allows you to stitch 2, 20, or 2,000 images. Version 3.0 integrates impressive new features that will definitely make you adopt Autopano Pro or Autopano Giga: Choose between 9... Read more
Airfoil 4.8.7 - Send audio from any app...
Airfoil allows you to send any audio to AirPort Express units, Apple TVs, and even other Macs and PCs, all in sync! It's your audio - everywhere. With Airfoil you can take audio from any... Read more
Microsoft Remote Desktop 8.0.8 - Connect...
With Microsoft Remote Desktop, you can connect to a remote PC and your work resources from almost anywhere. Experience the power of Windows with RemoteFX in a Remote Desktop client designed to help... Read more
xACT 2.30 - Audio compression toolkit. (...
xACT stands for X Aaudio Compression Toolkit, an application that encodes and decodes FLAC, SHN, Monkey’s Audio, TTA, Wavpack, and Apple Lossless files. It also can encode these formats to MP3, AAC... Read more

Latest Forum Discussions

See All

This Week at 148Apps: July 21-25, 2014
Another Week of Expert App Reviews   At 148Apps, we help you sort through the great ocean of apps to find the ones we think you’ll like and the ones you’ll need. Our top picks become Editor’s Choice, our stamp of approval for apps with that little... | Read more »
Reddme for iPhone - The Reddit Client (...
Reddme for iPhone - The Reddit Client 1.0 Device: iOS iPhone Category: News Price: $.99, Version: 1.0 (iTunes) Description: Reddme for iPhone is an iOS 7-optimized Reddit client that offers a refreshing new way to experience Reddit... | Read more »
Jacob Jones and the Bigfoot Mystery : Ep...
Jacob Jones and the Bigfoot Mystery : Episode 2 1.0 Device: iOS Universal Category: Games Price: $1.99, Version: 1.0 (iTunes) Description: Jacob Jones is back in Episode 2 of one of Apples 'Best of 2013' games and an App Store... | Read more »
New Trailer For Outcast Odyssey, A New K...
New Trailer For Outcast Odyssey, A New Kind of Card Battler Posted by Jennifer Allen on July 25th, 2014 [ permalink ] Out this Fall is a new kind of card battle game: Outcast Odyssey. | Read more »
Hay Day – Tip, Tricks, Strategies, and C...
Recently got into Supercell’s other huge hit, Hay Day and could do with some advice on what to do? We’ve got you covered with some helpful trips and tricks to bear in mind! Ticking Along One of the key things to keep in mind while building up that... | Read more »
Monster Head Review
Monster Head Review By Nadia Oxford on July 25th, 2014 Our Rating: :: FEEDING TIMEUniversal App - Designed for iPhone and iPad Racking up a high score with Monster Head is trickier than it first appears. The appeal wears out fairly... | Read more »
Garfield: Survival of the Fattest Coming...
Garfield: Survival of the Fattest Coming to iOS this Fall Posted by Jennifer Allen on July 25th, 2014 [ permalink ] Who loves lasagna? Me. Also everyone’s favorite grumpy fat cat, Garfield. | Read more »
Happy Flock Review
Happy Flock Review By Andrew Fisher on July 25th, 2014 Our Rating: :: HERD IT ALL BEFOREUniversal App - Designed for iPhone and iPad Underneath the gloss of Happy Flock’s visuals is a game of very little substance. It’s cute, but... | Read more »
Square Register Updates Adds Offline Pay...
Square Register Updates Adds Offline Payments Posted by Ellis Spice on July 25th, 2014 [ permalink ] Universal App - Designed for iPhone and iPad | Read more »
Looking For Group – Hearthstone’s Curse...
For the first time since its release (which has thankfully been a much shorter window for iPad players than their PC counterparts), Blizzard’s wildly successful Hearthstone: Heroes of Warcraft CCG is sporting some brand new content: the single... | Read more »

Price Scanner via MacPrices.net

Apple’s 2014 Back to School promotion: $100 g...
 Apple’s 2014 Back to School promotion includes a free $100 App Store Gift Card with the purchase of any new Mac (Mac mini excluded), or a $50 Gift Card with the purchase of an iPad or iPhone,... Read more
iMacs on sale for $150 off MSRP, $250 off for...
Best Buy has iMacs on sale for up to $160 off MSRP for a limited time. Choose free home shipping or free instant local store pickup (if available). Prices are valid for online orders only, in-store... Read more
Mac minis on sale for $100 off MSRP, starting...
Best Buy has Mac minis on sale for $100 off MSRP. Choose free shipping or free instant local store pickup. Prices are for online orders only, in-store prices may vary: 2.5GHz Mac mini: $499.99 2.3GHz... Read more
Global Tablet Market Grows 11% in Q2/14 Notwi...
Worldwide tablet sales grew 11.0 percent year over year in the second quarter of 2014, with shipments reaching 49.3 million units according to preliminary data from the International Data Corporation... Read more
New iPhone 6 Models to Have Staggered Release...
Digitimes’ Cage Chao and Steve Shen report that according to unnamed sources in Apple’s upstream iPhone supply chain, the new 5.5-inch iPhone will be released several months later than the new 4.7-... Read more
New iOS App Helps People Feel Good About thei...
Mobile shoppers looking for big savings at their favorite stores can turn to the Goodshop app, a new iOS app with the latest coupons and deals at more than 5,000 online stores. In addition to being a... Read more
Save on 5th generation refurbished iPod touch...
The Apple Store has Apple Certified Refurbished 5th generation iPod touches available starting at $149. Apple’s one-year warranty is included with each model, and shipping is free. Many, but not all... Read more
What Should Apple’s Next MacBook Priority Be;...
Stabley Times’ Phil Moore says that after expanding its iMac lineup with a new low end model, Apple’s next Mac hardware decision will be how it wants to approach expanding its MacBook lineup as well... Read more
ArtRage For iPhone Painting App Free During C...
ArtRage for iPhone is currently being offered for free (regularly $1.99) during Comic-Con San Diego #SDCC, July 24-27, in celebration of the upcoming ArtRage 4.5 and other 64-bit versions of the... Read more
With The Apple/IBM Alliance, Is The iPad Now...
Almost since the iPad was rolled out in 2010, and especially after Apple made a 128 GB storage configuration available in 2012, there’s been debate over whether the iPad is a serious tool for... Read more

Jobs Board

*Apple* Solutions Consultant (ASC) - Apple (...
**Job Summary** The ASC is an Apple employee who serves as an Apple brand ambassador and influencer in a Reseller's store. The ASC's role is to grow Apple Read more
WW Sales Program Manager, *Apple* Online St...
**Job Summary** Imagine what you could do here. At Apple , great ideas have a way of becoming great products, services, and customer experiences very quickly. Bring Read more
Lead Software Engineer, *Apple* Online Stor...
**Job Summary** Imagine what you could do here. At Apple , great ideas have a way of becoming great products, services, and customer experiences very quickly. Bring Read more
Manager, *Apple* Fullfillment Operation (AF...
…cross-functional teams to drive the highest level of program management quality for Apple . You will help plan launch strategy and demand generation programs with Read more
Project Manager / Business Analyst, WW *Appl...
…a senior project manager / business analyst to work within our Worldwide Apple Fulfillment Operations and the Business Process Re-engineering team. This role will work Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.