02.04.2013 Views

QuickTime Kit Programming Guide - filibeto.org

QuickTime Kit Programming Guide - filibeto.org

QuickTime Kit Programming Guide - filibeto.org

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

C H A P T E R 5<br />

Extending the QT<strong>Kit</strong>Player To Stream Audio and Video<br />

mDidEndSelector = didEndSelector;<br />

mContextInfo = contextInfo;<br />

// load the bundle (if necessary)<br />

if (mPanel == nil)<br />

[NSBundle loadNibNamed:@"OpenURLPanel" owner:self];<br />

// start the sheet (or window)<br />

[NSApp beginSheet:mPanel modalForWindow:window modalDelegate:nil<br />

didEndSelector:nil contextInfo:nil];<br />

}<br />

13. Add these lines to close it down:<br />

- (void)close<br />

{<br />

// close it down<br />

[NSApp endSheet:mPanel];<br />

[mPanel close];<br />

}<br />

This completes the steps for adding code to your OpenURLPanel.m implementation file. There is only<br />

one more sequence of steps, described in the next section, before you can run and build your<br />

QT<strong>Kit</strong>Player application for streaming audio and video.<br />

Adding Code to QT<strong>Kit</strong>PlayerDelegate<br />

In this next sequence of steps, you’ll be adding a small amount of code to your<br />

QT<strong>Kit</strong>PlayerAppDelegate.h class interface file.<br />

In Xcode 2.0, you’ll see the class model for the delegate, as shown in Figure 5-12.<br />

Adding Code To Stream Audio and Video 93<br />

2005-11-09 | © 2004, 2005 Apple Computer, Inc. All Rights Reserved.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!