< Previous PageNext Page > Hide TOC

Deprecated DVD Playback Framework Functions

A function identified as deprecated has been superseded and may become unsupported in the future.

Deprecated in Mac OS X v10.5

DVDDoMenuClick

If a menu button contains a specified point, the button’s action is executed and the button’s index is passed back. (Deprecated in Mac OS X v10.5. Use DVDDoMenuCGClick instead.)

OSStatus DVDDoMenuClick (
   Point inPortPt,
   SInt32 *outIndex
);

Parameters
inPortPt

A point specified using window local coordinates.

outIndex

A pointer to an integer. On return, if the specified point lies inside the clickable area of a menu button, the integer contains the 1-based index of the button.

Return Value

A result code. See “DVD Playback Result Codes.”

Discussion

This function checks to see if a specified point lies inside one of the buttons in the current menu. If so, this function executes the button’s action and passes back its index. Note that the bounding rectangle of a button is not necessarily the same as the clickable area; not all buttons even have a clickable area. See also DVDDoButtonActivate.

Availability
Related Sample Code
Declared In
DVDPlayback.h

DVDDoMenuMouseOver

If a specified point lies inside a menu button, focuses the button and passes back its index. (Deprecated in Mac OS X v10.5. Use DVDDoMenuCGMouseOver instead.)

OSStatus DVDDoMenuMouseOver (
   Point inPortPt,
   SInt32 *outIndex
);

Parameters
inPortPt

A point specified using window local coordinates.

outIndex

A pointer to an integer. On return, if the point lies inside the button in focus, the integer contains the 1-based index of the button.

Return Value

A result code. See “DVD Playback Result Codes.”

Discussion

See also DVDDoUserNavigation.

Availability
Related Sample Code
Declared In
DVDPlayback.h

DVDGetVideoBounds

Gets the bounds in which to display the video. (Deprecated in Mac OS X v10.5. Use DVDGetVideoCGBounds instead.)

OSStatus DVDGetVideoBounds (
   Rect *outPortRect
);

Parameters
outPortRect

A pointer to a rectangle. On return, the rectangle contains the current bounds of the video area in window local coordinates.

Return Value

A result code. See “DVD Playback Result Codes.”

Discussion

This function gets the video bounding rectangle previously set by calling the function DVDSetVideoBounds.

Availability
Declared In
DVDPlayback.h

DVDGetVideoDevice

Gets the graphics device for the current DVD-Video playback session. (Deprecated in Mac OS X v10.5. Use DVDGetVideoDisplay instead.)

OSStatus DVDGetVideoDevice (
   GDHandle *outDevice
);

Parameters
outDevice

A pointer to a graphics device handle. On return, the device handle is set to the current video playback device.

Return Value

A result code. See “DVD Playback Result Codes.”

Discussion

Before calling this function, you need to set the video playback device using DVDSetVideoDevice or DVDSwitchToDevice.

Availability
Declared In
DVDPlayback.h

DVDGetVideoKeyColor

Gets the key color used by the video driver. (Deprecated in Mac OS X v10.5. There is no replacement function.)

OSStatus DVDGetVideoKeyColor (
   RGBColor *outKeyColor
);

Parameters
outKeyColor

A pointer to an RGB color structure. On return, this structure contains the red, green, and blue color values for the color black.

Return Value

A result code. See “DVD Playback Result Codes.”

Discussion

This function does nothing and returns the color black.

Availability
Declared In
DVDPlayback.h

DVDGetVideoPort

Gets the graphics port of the Carbon window in use for DVD-Video playback. (Deprecated in Mac OS X v10.5. Use DVDGetVideoWindowRef instead.)

OSStatus DVDGetVideoPort (
   CGrafPtr *outVidPort
);

Parameters
outVidPort

A pointer to a QuickDraw graphics port. On return, the graphics port of the Carbon window currently in use for DVD-Video playback, or NULL if there is no Carbon window.

Return Value

A result code. See “DVD Playback Result Codes.”

Availability
Declared In
DVDPlayback.h

DVDIsSupportedDevice

Determines whether a graphics device supports DVD-Video playback. (Deprecated in Mac OS X v10.5. Use DVDIsSupportedDisplay instead.)

OSStatus DVDIsSupportedDevice (
   GDHandle inDevice,
   Boolean *outSupported
);

Parameters
inDevice

A handle to the GDevice structure for the graphics device you want to use for video playback.

outSupported

A pointer to a Boolean variable. On return, a value of TRUE indicates that the specified graphics device can be used for DVD-Video playback. A value of FALSE indicates the device cannot be used for this purpose. If the value is FALSE, the device may require a different video driver than the one currently in use.

Return Value

A result code. See “DVD Playback Result Codes.”

Discussion

For this function to work properly, you must first call the function DVDSetVideoPort with a valid graphics port.

Availability
Declared In
DVDPlayback.h

DVDSetVideoBounds

Sets the bounds in which to display the video. (Deprecated in Mac OS X v10.5. Use DVDSetVideoCGBounds instead.)

OSStatus DVDSetVideoBounds (
   Rect *inPortRect
);

Parameters
inPortRect

A pointer to a rectangle that contains the desired bounds in window local coordinates.

Return Value

A result code. See “DVD Playback Result Codes.”

Discussion

This function is used to set the area inside the current window in which to display the video. The video area is not required to fill the entire window. Generally you should set the video area to be smaller than the window whenever the aspect ratio of the current title and window are different. To find the aspect ratio of the current title, use the function DVDGetAspectRatio.

Because the aspect ratios of the titles in a DVD-Video media folder are not always the same, you may need to call this function repeatedly to reset the video area as the user makes different viewing choices.

Availability
Related Sample Code
Declared In
DVDPlayback.h

DVDSetVideoDevice

Sets the graphics device for the current DVD-Video playback session. (Deprecated in Mac OS X v10.5. Use DVDSetVideoDisplay instead.)

OSStatus DVDSetVideoDevice (
   GDHandle inDevice
);

Parameters
inDevice

A handle to the GDevice structure for the graphics device you want to use for video playback.

Return Value

A result code. See “DVD Playback Result Codes.”

Discussion

You need to call this function or DVDSetVideoDisplay each time you move the video playback window to a new graphics device. To avoid degrading video performance, you should not attempt to draw a video playback window that spans two different devices.

Availability
Declared In
DVDPlayback.h

DVDSetVideoPort

Enables or disables DVD-Video playback in a Carbon window. (Deprecated in Mac OS X v10.5. Use DVDSetVideoWindowRef instead.)

OSStatus DVDSetVideoPort (
   CGrafPtr inVidPort
);

Parameters
inVidPort

The QuickDraw graphics port associated with a Carbon window, or NULL. For information about when to pass NULL, see the discussion below.

Return Value

A result code. See “DVD Playback Result Codes.”

Discussion

If you’re using a Carbon window for DVD-Video playback, you need to use this function in two situations:

Availability
Declared In
DVDPlayback.h

DVDSwitchToDevice

If a graphics device supports DVD-Video playback, sets the device for the current playback session. (Deprecated in Mac OS X v10.5. Use DVDSwitchToDisplay instead.)

OSStatus DVDSwitchToDevice (
   GDHandle newDevice,
   Boolean *outSupported
);

Parameters
newDevice

A handle to the GDevice structure for the graphics device you want to use for video playback.

outSupported

A pointer to a Boolean variable. On return, a value of TRUE indicates that the specified graphics device can be used for DVD-Video playback. A value of FALSE indicates the device cannot be used for this purpose. If the value is FALSE, the current video playback device remains unchanged.

Return Value

A result code. If the specified device is not supported, this function returns an error and maintains the current device. See “DVD Playback Result Codes.”

Discussion

This convenience function is equivalent to calling the function DVDIsSupportedDevice followed by a call to DVDSetVideoDevice. This function works correctly even if there is no current video playback device.

Availability
Declared In
DVDPlayback.h

< Previous PageNext Page > Hide TOC


© 2005, 2007 Apple Inc. All Rights Reserved. (Last updated: 2007-06-28)


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.