Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

Next Page > Hide TOC

DVD Playback Framework Reference

Framework
DVDPlayback
Companion guide
Declared in
DVDPlayback.h

Overview

DVD Playback is a core technology introduced in Mac OS X version 10.3. Mac OS X applications can use DVD Playback to display a DVD-Video recording located on an optical disc or a mass storage device such as a hard drive. DVD Playback makes it easy for applications to incorporate basic video playback features such as selecting a title from a menu and playing the title, as well as advanced features such as bookmarks, video clips, and multiple viewing angles.

Functions by Task

Starting and Ending Playback Sessions

Opening and Closing DVD Media

Accessing the Playback Device Using a GDevice Record

Accessing the Playback Device Using a Quartz Display ID

Accessing Video Information

Accessing Audio Streams

These functions are used to access audio streams in the current title.

Accessing the Playback Time Position

You can use these functions to access the current video playback position relative to the beginning or end of the title.

Controlling Playback

Accessing the Audio Volume

These functions are used to adjust the playback audio volume, relative to the current system volume.

Menu Navigation

These functions are used to access menus, navigate between menu buttons in response to keyboard or mouse events, and perform the actions that buttons represent.

Accessing Media Information

Accessing Titles

Accessing Chapters

These functions are used to access chapters in the current title.

Accessing Camera Angles

Controlling Subpictures

These functions are used to access subpictures in the current title.

Accessing Language Codes

These functions are used to access language codes that determine which subpicture, audio stream, or menu is used.

Accessing Bookmarks

Accessing Region Codes

These functions are used to access region codes on a DVD-Video disc or a DVD drive.

Using Event Callbacks

Obsolete Functions

Functions

DVDClearLastPlayBookmark

Sets the video playback position to the beginning of the disc.

OSStatus DVDClearLastPlayBookmark (
   void
);

Return Value

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

Discussion

This function sets the video playback position to the beginning of the disc, but does not begin playing the media. Calling this function is equivalent to calling the function DVDStop twice in succession. Before calling this function, media needs to be open.

Availability
Declared In
DVDPlayback.h

DVDCloseMediaFile

Closes a previously opened VIDEO_TS media folder on a mass storage device.

OSStatus DVDCloseMediaFile (
   void
);

Return Value

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

Discussion

This function closes a VIDEO_TS media folder that was previously opened using the function DVDOpenMediaFile. If necessary, this function stops playback before closing the folder. You must call this function before attempting to open another media folder.

Availability
Declared In
DVDPlayback.h

DVDCloseMediaVolume

Closes a previously opened VIDEO_TS media folder on a DVD-Video disc.

OSStatus DVDCloseMediaVolume (
   void
);

Return Value

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

Discussion

This function closes a VIDEO_TS media folder that was previously opened using the function DVDOpenMediaVolume. If necessary, this function stops playback before closing the folder. You must call this function before attempting to open another media folder.

Availability
Declared In
DVDPlayback.h

DVDDisplaySubPicture

Turns the display of subpictures on or off.

OSStatus DVDDisplaySubPicture (
   Boolean inDisplay
);

Parameters
inDisplay

A Boolean value that specifies whether to display subpictures in the current title. To display subpictures, specify TRUE. To hide subpictures, specify FALSE.

Return Value

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

Discussion

Before calling this function, DVD-Video media needs to be open and video playback started. You can use this function to display or hide additional bitmap graphic elements such as subtitles.

Availability
Declared In
DVDPlayback.h

DVDDispose

Ends the current DVD-Video playback session.

OSStatus DVDDispose (
   void
);

Return Value

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

Discussion

You call this function when you’re finished using DVD Playback, usually when your application quits.

Availability
Declared In
DVDPlayback.h

DVDDoButtonActivate

Selects and activates a menu button by index.

OSStatus DVDDoButtonActivate (
   SInt32 inIndex
);

Parameters
inIndex

The 1-based index of the menu button the user has selected.

Return Value

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

Discussion

If the index coincides with an active button, this function executes the action corresponding to the button.

Availability
Declared In
DVDPlayback.h

DVDDoUserNavigation

Allows the user to navigate between menu buttons.

OSStatus DVDDoUserNavigation (
   DVDUserNavigation inNavigation
);

Parameters
inNavigation

A user-navigation constant that specifies the direction the user is navigating in the menu. For a list of possible values, see “User Navigation Directions.”

Return Value

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

Discussion

You should call this function whenever the user navigates between buttons in the menu using the keyboard. This function moves the focus to the button. If you pass in kDVDUserNavigationEnter, the button action is executed.

Availability
Declared In
DVDPlayback.h

DVDEnableWebAccess

Turns DVD@ccess support on or off.

OSStatus DVDEnableWebAccess (
   Boolean inEnable
);

Parameters
inEnable

To turn on support for DVD@ccess, specify TRUE. To turn off DVD@ccess support, specify FALSE.

Return Value

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

Discussion

DVD@ccess is a feature in Apple’s DVD Studio Pro that allows the DVD-Video author to embed external links to web-based resources and activate these links during video playback. Some users may find this feature to be intrusive, so DVD@ccess support is turned off by default.

Availability
Declared In
DVDPlayback.h

DVDGetAngle

Gets the camera angle displayed.

OSStatus DVDGetAngle (
   UInt16 *outAngleNum
);

Parameters
outAngleNum

A pointer to an integer. On return, the integer contains the 1-based index of the current camera angle.

Return Value

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

Discussion

Before calling this function, DVD-Video media needs to be open and video playback started.

Availability
Declared In
DVDPlayback.h

DVDGetAspectRatio

Gets the aspect ratio of the current title or menu.

OSStatus DVDGetAspectRatio (
   DVDAspectRatio *outRatio
);

Parameters
outRatio

A pointer to a DVDAspectRatio variable. On return, the variable specifies the aspect ratio of the current title. For a list of possible aspect ratios, see “Aspect Ratios.”

Return Value

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

Discussion

The aspect ratio of the video can change whenever a different title or menu is displayed. You can use this function together with DVDGetNativeVideoSize to calculate the bounds of the video area in a window.

Availability
Declared In
DVDPlayback.h

DVDGetAudioLanguageCode

Gets the current audio language code and extension.

OSStatus DVDGetAudioLanguageCode (
   DVDLanguageCode *outCode,
   DVDAudioExtensionCode *outExtension
);

Parameters
outCode

A pointer to a language code variable. On return, the variable contains the language code for the current audio stream. For a list of possible values, see “Language Codes.”

outExtension

A pointer to an audio extension code variable. On return, the variable contains the audio extension code for the current audio stream. For a list of possible values, see “Audio Extension Codes.”

Return Value

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

Availability
Declared In
DVDPlayback.h

DVDGetAudioLanguageCodeByStream

Gets the audio language code and extension for a specified stream.

OSStatus DVDGetAudioLanguageCodeByStream (
   UInt16 inStreamNum,
   DVDLanguageCode *outCode,
   DVDAudioExtensionCode *outExtension
);

Parameters
inStreamNum

An integer in the range 1 to 8 that specifies an audio stream in the current title.

outCode

A pointer to a language code variable. On return, the variable contains the language code for the specified audio stream. For a list of possible values, see “Language Codes.”

outExtension

A pointer to an audio extension code variable. On return, the variable contains the audio extension code for the specified audio stream. For a list of possible values, see “Audio Extension Codes.”

Return Value

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

Availability
Declared In
DVDPlayback.h

DVDGetAudioStream

Gets the audio stream currently being used.

OSStatus DVDGetAudioStream (
   UInt16 *outStreamNum
);

Parameters
outStreamNum

A pointer to an integer. On return, the integer contains the number of the current audio stream, or 0 if the current title has no audio streams.

Return Value

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

Discussion

Before calling this function, DVD-Video media needs to be open and video playback started.

Availability
Declared In
DVDPlayback.h

DVDGetAudioStreamFormat

Gets the current audio stream format.

OSStatus DVDGetAudioStreamFormat (
   DVDAudioFormat *outFormat,
   UInt32 *outBitsPerSample,
   UInt32 *outSamplesPerSecond,
   UInt32 *outChannels
);

Parameters
outFormat

A pointer to an audio format variable. On return, the variable contains the audio format of the audio stream for the current title. For a list of possible formats, see “Audio Stream Formats.”

outBitsPerSample

A pointer to an integer. On return, the integer contains the number of bits per sample in the current audio stream.

outSamplesPerSecond

A pointer to an integer. On return, the integer contains the number of samples per second in the current audio stream.

outChannels

A pointer to an integer. On return, the integer contains the number of audio channels in the current audio stream.

Return Value

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

Discussion

Before calling this function, DVD-Video media needs to be open and video playback started.

Availability
Declared In
DVDPlayback.h

DVDGetAudioStreamFormatByStream

Gets the audio format for a specified stream.

OSStatus DVDGetAudioStreamFormatByStream (
   UInt32 inStreamNum,
   DVDAudioFormat *outFormat,
   UInt32 *outBitsPerSample,
   UInt32 *outSamplesPerSecond,
   UInt32 *outChannels
);

Parameters
inStreamNum

An integer that specifies an audio stream in the current title.

outFormat

A pointer to an audio format variable. On return, the variable contains the audio format of the audio stream for the current title. For a list of possible formats, see “Audio Stream Formats.”

outBitsPerSample

A pointer to an integer. On return, the integer contains the number of bits per sample in the current audio stream.

outSamplesPerSecond

A pointer to an integer. On return, the integer contains the number of samples per second in the current audio stream.

outChannels

A pointer to an integer. On return, the integer contains the number of audio channels in the current audio stream.

Return Value

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

Discussion

Before calling this function, DVD-Video media needs to be open.

Availability
Declared In
DVDPlayback.h

DVDGetAudioVolume

Gets the current playback audio volume setting (0 - 255) .

OSStatus DVDGetAudioVolume (
   UInt16 *outVolume
);

Parameters
outVolume

A pointer to an integer. On return, the integer contains the current playback volume in the range 0 to 255.

Return Value

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

Discussion

This function passes back the current playback audio volume setting. For more information, see DVDSetAudioVolume.

Availability
Declared In
DVDPlayback.h

DVDGetAudioVolumeInfo

Gets video playback volume information (minimum, maximum, and current volume).

OSStatus DVDGetAudioVolumeInfo (
   UInt16 *outMinVolume,
   UInt16 *outCurVolume,
   UInt16 *outMaxVolume
);

Parameters
outMinVolume

A pointer to an integer. On return, the integer contains the minimum video playback volume. This parameter is optional; you may specify NULL.

outCurVolume

A pointer to an integer. On return, the integer contains the current video playback volume. This parameter is optional; you may specify NULL.

outMaxVolume

A pointer to an integer. On return, the integer contains the maximum video playback volume. This parameter is optional; you may specify NULL.

Return Value

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

Discussion

Currently the minimum and maximum volumes are always 0 and 255.

Availability
Declared In
DVDPlayback.h

DVDGetBookmark

Requests a bookmark to the current play position.

OSStatus DVDGetBookmark (
   void *outBookMarkData,
   UInt32 *ioBookMarkDataSize
);

Parameters
outBookmarkData

A generic pointer to memory for a bookmark in your calling program, or NULL. On return, this memory contains the new bookmark.

The size of this memory should be equal to or greater than the actual size of a bookmark in bytes. To determine the actual size of a bookmark, see the Discussion below.

ioBookmarkDataSize

On entry, a pointer to an integer that contains the size of your bookmark memory. If you haven’t allocated memory for a bookmark, set this size to zero. On return, the integer’s value is the actual size of a new bookmark. See the Discussion below.

Return Value

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

Discussion

This function is used when playing media on a DVD-Video disc. Before calling this function, the media needs to be open and playing. This function passes back a bookmark to the current play position in the current DVD-Video playback session.

To request a play bookmark, you need to call this function twice. The first call determines the minimum required size for the bookmark:

UInt32 size = 0;
DVDGetBookmark (NULL, &size);

After you allocate sufficient memory for the bookmark, call this function again to create the bookmark, passing it the location and size of your bookmark memory:

void *bookmark = malloc (size);
OSStatus err = DVDGetBookmark (bookmark, &size);

For information about requesting a bookmark when the media is not playing, see DVDGetLastPlayBookmark.

Availability
Declared In
DVDPlayback.h

DVDGetButtoninfo

Gets information about all available menu buttons in the current title, domain, or content.

OSStatus DVDGetButtoninfo (
   UInt32 *numberOfButtons,
   UInt32 *selectedButton,
   UInt32 *forcedActivateButton,
   UInt32 *userButtonOffset,
   UInt32 *numberOfUserButtons
);

Parameters
numberOfButtons

A pointer to an integer. On return, the integer contains the number of buttons in the current menu.

selectedButton

A pointer to an integer. On return, the integer contains the 1-based index of the selected button.

forcedActivateButton

A pointer to an integer. On return, the integer contains the index of the button whose action is performed when a specified period of time elapses after the menu is first displayed.

userButtonOffset

A pointer to an integer. On return, the integer contains the index of the first user-selectable button. If the number of user-selectable buttons in a menu is smaller than the total number of buttons, this index may be greater than zero.

numberOfUserButtons

A pointer to an integer. On return, the integer contains the number of user-selectable buttons in the current menu.

Return Value

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

Availability
Declared In
DVDPlayback.h

DVDGetButtonPosition

Gets the position and default action of a menu button.

OSStatus DVDGetButtonPosition (
   UInt32 index,
   CGRect *outRect,
   UInt32 *autoAction
);

Parameters
index

The zero-based index of a menu button. If your button index is 1-based, you should decrement the index before you pass it to this function.

outRect

A pointer to a Quartz rectangle. On return, the rectangle contains the position and dimensions of the specified button in window local coordinates.

autoAction

A pointer to an integer flag. On return, a value of 1 indicates the button is a forced activate button—that is, the button’s action is executed immediately when the button is selected. A value of 0 indicates the button is not a forced activate button.

Return Value

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

Availability
Declared In
DVDPlayback.h

DVDGetChapter

Gets the current chapter.

OSStatus DVDGetChapter (
   UInt16 *outChapterNum
);

Parameters
outChapterNum

A pointer to an integer. On return, the integer contains the current chapter number.

Return Value

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

Availability
Declared In
DVDPlayback.h

DVDGetDiscRegionCode

Gets the region codes available on a DVD-Video disc.

OSStatus DVDGetDiscRegionCode (
   DVDRegionCode *outCode
);

Parameters
outCode

A pointer to a DVDRegionCode variable. On return, the variable contains a bitfield that specifies one or more region codes. For more information about region codes, see “Region Codes.”

Return Value

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

Discussion

This function passes back the region codes assigned to the DVD-Video disc that’s currently in use. Before calling this function, you need to call the function DVDOpenMediaVolume to open the media folder on the disc.

To test whether a disc is authorized for playback in region n, you need to compute the bitwise AND of outCode with region code n. If the result is equal to region code n, the disc is authorized for playback in region n. For example, this source code shows how to test whether a disc is authorized for playback in region 1:

const DVDRegionCode myRegionCode1 = kDVDRegionCode1;
DVDRegionCode outCode;
DVDGetDiscRegionCode (&outCode);
if ((~outCode & ~myRegionCode1) == ~myRegionCode1) {
    // media supports region 1
}
Availability
Declared In
DVDPlayback.h

DVDGetDriveRegionCode

Gets the region code assigned to a DVD drive, and finds how many additional region code changes are permitted.

OSStatus DVDGetDriveRegionCode (
   DVDRegionCode *outCode,
   SInt16 *outNumberChangesLeft
);

Parameters
outCode

A pointer to a DVDRegionCode variable. On return, the variable specifies the region code that’s assigned to the DVD drive currently in use. If the drive was never initialized, the region code is kDVDRegionCodeUninitialized. For more information about region codes, see “Region Codes.”

outNumberChangesLeft

A pointer to an integer. On return, the integer contains the number of region code changes remaining for this drive.

Return Value

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

Discussion

This function passes back the region code assigned to the DVD drive that’s currently in use. Before calling this function, you need to call the function DVDOpenMediaVolume to open the media folder on a disc that’s mounted in the drive.

To test whether region n is assigned to a drive, you need to compute the bitwise AND of outCode with region code n. If the result is equal to region code n, the drive can play discs that are authorized for playback in region n. For example, this source code shows how to test whether region 1 is assigned to a drive:

const DVDRegionCode myRegionCode1 = kDVDRegionCode1;
DVDRegionCode outCode;
SInt16 outNumberChangesLeft;
DVDGetDriveRegionCode (&outCode, &outNumberChangesLeft);
if ((~outCode & ~myRegionCode1) == ~myRegionCode1) {
    // media supports region 1
}
Availability
Declared In
DVDPlayback.h

DVDGetFormatStandard

Gets the video broadcast format of current DVD-Video media.

OSStatus DVDGetFormatStandard (
   DVDFormat *outFormat
);

Parameters
outFormat

A pointer to a DVDFormat variable. On return, the variable contains the video broadcast format of the current media. For a list of possible values, see “ Video Broadcast Formats.”

Return Value

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

Discussion

This function determines which video broadcast format (NTSC or PAL) is used in the current media. Before calling this function, DVD-Video media needs to be open.

Availability
Declared In
DVDPlayback.h

DVDGetGPRMValue

Returns the current value of a general parameter (GPRM) register.

OSStatus DVDGetGPRMValue (
   UInt32 index,
   UInt32 *value
);

Parameters
index

An integer index that specifies the desired GPRM register. The valid range is 1 to 16.

value

A pointer to an integer. On return, the integer contains the current value of the specified GPRM register.

Return Value

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

Availability
Declared In
DVDPlayback.h

DVDGetLastPlayBookmark

Requests a bookmark to the last play position.

OSStatus DVDGetLastPlayBookmark (
   void *outBookMarkData,
   UInt32 *ioBookMarkDataSize
);

Parameters
outBookmarkData

A generic pointer to memory for a bookmark in your calling program, or NULL. On return, this memory contains the last bookmark after the first Stop command.

The size of this memory should be equal to or greater than the actual size of a bookmark in bytes. To determine the actual size of a bookmark, see the discussion below.

ioBookmarkDataSize

On entry, a pointer to an integer that contains the size of your bookmark memory. If you haven’t allocated memory for a bookmark, set this size to zero. On return, the integer’s value is the actual size of a new bookmark. See the Discussion below.

Return Value

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

Discussion

This function is used when playing media on a DVD-Video disc. Before calling this function, the media needs to be open.

This function passes back a bookmark to the last play position in the current DVD-Video playback session. A last play bookmark represents the exact stop position after calling the function DVDStop.

To request the last play bookmark, you need to call this function twice. The first call determines the minimum required size for the bookmark:

UInt32 size = 0;
DVDGetBookmark (NULL, &size);

After you allocate sufficient memory for the bookmark, call this function again to create the bookmark, passing it the location and size of your bookmark memory:

void *bookmark = malloc (size);
OSStatus err = DVDGetBookmark (bookmark, &size);

For information about requesting a bookmark when the media is playing, see DVDGetBookmark.

Availability
Declared In
DVDPlayback.h

DVDGetMediaUniqueID

Gets a unique identifier for a media folder.

OSStatus DVDGetMediaUniqueID (
   DVDDiscID outDiscID
);

Parameters
outDiscID

An 8-byte array of type DVDDiscID. On return, this array contains the unique identifier of the current media.

Return Value

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

Discussion

This function passes back a 64-bit identifier that can help you distinguish between different media folders. While the identifiers generated by this function are not guaranteed to be unique (see below), duplicate identifiers are extremely rare.

There are two known limitations of this function:

Availability
Declared In
DVDPlayback.h

DVDGetMediaVolumeCFName

Gets the volume name of the current media as a Core Foundation string.

OSStatus DVDGetMediaVolumeCFName (
   CFStringRef *outDiscVolumeCFName
);

Parameters
outDiscVolumeCFName

On return, a pointer to the volume name of the current media. If you need to save this Core Foundation string for later use, you should retain it.

Return Value

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

Discussion

This function passes back the media volume name as a Core Foundation string. This is the name seen on the desktop when Mac OS X mounts a DVD-Video disc. For information about using Core Foundation strings, see CFString Reference.

Availability
Declared In
DVDPlayback.h

DVDGetMediaVolumeName

Gets the volume name of the current media as a C string.

OSStatus DVDGetMediaVolumeName (
   char **outDiscVolumeName
);

Parameters
outDiscVolumeName

A pointer to a C string. On return, the C string is the volume name of the current media. You are not responsible for allocating a buffer for the string.

Return Value

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

Discussion

This function passes back the volume name of the current media as a C string. This is the name seen on the desktop when Mac OS X mounts a DVD-Video disc.

Special Considerations

This function has a serious limitation: it does not support volume names with multiple byte characters. For this reason, applications running in Mac OS X version 10.4 or later should use the replacement function DVDGetMediaVolumeCFName instead.

Availability
Declared In
DVDPlayback.h

DVDGetMenuLanguageCode

Gets the menu language code for the current title.

OSStatus DVDGetMenuLanguageCode (
   DVDLanguageCode *outCode
);

Parameters
outCode

A pointer to a language code variable. On return, the variable contains the menu language code for the current title. For a list of possible values, see “Language Codes.”

Return Value

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

Availability
Declared In
DVDPlayback.h

DVDGetNativeVideoSize

Gets the native width and height in pixels of the current title.

OSStatus DVDGetNativeVideoSize (
   UInt16 *outWidth,
   UInt16 *outHeight
);

Parameters
outWidth

A pointer to an integer. On return, the integer contains the native width of the current title.

outHeight

A pointer to an integer. On return, the integer contains the native height of the current title.

Return Value

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

Discussion

The native dimensions of a title are specified by the author of the DVD-Video media. The width and height are typically 720 x 480 pixels for the NTSC video format and 720 x 576 pixels for the PAL video format.

Availability
Declared In
DVDPlayback.h

DVDGetNumAngles

Gets the number of camera angles currently available.

OSStatus DVDGetNumAngles (
   UInt16 *outNumAngles
);

Parameters
outNumAngles

On return, a pointer to the number of different camera angles in the current title. DVD-Video media supports up to 9 camera angles.

Return Value

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

Availability
Declared In
DVDPlayback.h

DVDGetNumAudioStreams

Gets the number of audio streams currently available.

OSStatus DVDGetNumAudioStreams (
   UInt16 *outNumStreams
);

Parameters
outNumStreams

A pointer to an integer. On return, the integer contains the number of audio streams available in the current title.

Return Value

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

Discussion

Before calling this function, DVD-Video media needs to be open.

Availability
Declared In
DVDPlayback.h

DVDGetNumChapters

Gets the number of chapters in the specified title.

OSStatus DVDGetNumChapters (
   UInt16 inTitleNum,
   UInt16 *outNumChapters
);

Parameters
inTitleNum

An integer in the range 1 to 99 that specifies a title on the current media.

outNumChapters

A pointer to an integer. On return, the integer contains the number of chapters in the specified title.

Return Value

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

Discussion

If the specified chapter does not exist, this function does nothing and returns an error.

Availability
Declared In
DVDPlayback.h

DVDGetNumSubPictureStreams

Gets the number of subpicture streams currently available.

OSStatus DVDGetNumSubPictureStreams (
   UInt16 *outNumStreams
);

Parameters
outNumStreams

On return, a pointer to the number of subpicture streams available in the current title. DVD-Video media supports up to 32 subpicture streams per title.

Return Value

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

Discussion

Before calling this function, DVD-Video media needs to be open and video playback started.

Availability
Declared In
DVDPlayback.h

DVDGetNumTitles

Gets the number of titles available on the media.

OSStatus DVDGetNumTitles (
   UInt16 *outNumTitles
);

Parameters
outNumTitles

A pointer to an integer. On return, the integer contains the number of titles on the current media in the range 0 to 99.

Return Value

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

Availability
Declared In
DVDPlayback.h

DVDGetScanRate

Gets the current scan direction and scan rate.

OSStatus DVDGetScanRate (
   DVDScanRate *outRate,
   DVDScanDirection *outDirection
);

Parameters
outRate

A pointer to a DVDScanRate variable. On return, the variable contains the current scan rate. For a list of possible values, see “Scan Rates.”

outDirection

A pointer to a DVDScanDirection variable. On return, the variable contains the current scan direction. For a list of possible values, see “Scan Directions.”

Return Value

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

Availability
Declared In
DVDPlayback.h

DVDGetState

Gets the state of the current DVD-Video playback session.

OSStatus DVDGetState (
   DVDState *outState
);

Parameters
outState

A pointer to a DVDState variable. On return, the variable contains the state of the current playback session. For a list of possible values, see “Playback States.”

Return Value

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

Availability
Declared In
DVDPlayback.h

DVDGetSubPictureLanguageCode

Gets the subpicture language code and extension for the current subpicture stream.

OSStatus DVDGetSubPictureLanguageCode (
   DVDLanguageCode *outCode,
   DVDSubpictureExtensionCode *outExtension
);

Parameters
outCode

A pointer to a language code variable. On return, the variable contains the language code for the current subpicture. For a list of possible values, see “Language Codes.”

outExtension

A pointer to a subpicture extension va