Mac Developer Library

Developer

DVDPlayback Framework Reference DVD Playback Framework Reference

Options
Deployment Target:

On This Page
Language:

DVD Playback Framework Reference

DVD Playback is a core technology introduced in OS X version 10.3. Mac apps 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

  • Starts a new DVD-Video playback session.

    Declaration

    Swift

    func DVDInitialize() -> OSStatus

    Objective-C

    OSStatus DVDInitialize ( void );

    Return Value

    A result code. If a new DVD-Video playback session is successfully initiated, this function returns noErr. If a session already exists, this function returns kDVDErrorInitializingLib. For other possible result codes, see DVD Playback Result Codes.

    Discussion

    When preparing to play a DVD, you must call this function to initialize a new DVD-Video playback session. Only one process at a time can use DVD Playback. When you are finished using DVD Playback, you should call the function DVDDispose to end the session.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Registers a callback function to handle unrecoverable errors.

    Declaration

    Swift

    func DVDSetFatalErrorCallBack(_ inCallBackProc: DVDFatalErrCallBackFunctionPtr, _ inRefCon: UnsafeMutablePointer<Void>) -> OSStatus

    Objective-C

    OSStatus DVDSetFatalErrorCallBack ( DVDFatalErrCallBackFunctionPtr inCallBackProc, void *inRefCon );

    Parameters

    inCallBackProc

    A pointer to the callback function you provide to handle unrecoverable errors. For information about the requirements for such a function, see DVDFatalErrCallBackFunctionPtr.

    inRefCon

    Application-defined data that is passed to your callback function when it is called to handle a fatal error.

    Return Value

    A result code. See DVD Playback Result Codes.

    Discussion

    This function registers a callback that you write to handle unrecoverable errors during video playback. You should call this function immediately after calling the function DVDInitialize. If you don’t register a callback to handle unrecoverable errors, your application may crash when a fatal error occurs. For information about how to write such a callback function, see DVDFatalErrCallBackFunctionPtr.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Ends the current DVD-Video playback session.

    Declaration

    Swift

    func DVDDispose() -> OSStatus

    Objective-C

    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.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Determines whether a VIDEO_TS media folder has a valid layout.

    Declaration

    Swift

    func DVDIsValidMediaRef(_ inFile: UnsafeMutablePointer<FSRef>, _ outIsValid: UnsafeMutablePointer<Boolean>) -> OSStatus

    Objective-C

    OSStatus DVDIsValidMediaRef ( FSRef *inRef, Boolean *outIsValid );

    Parameters

    inFile

    A pointer to a VIDEO_TS media folder on a DVD-Video disc or another mass storage device. To convert a path into an FSRef structure, use the function FSPathMakeRef.

    outIsValid

    A pointer to a Boolean variable. On return, a value of TRUE indicates the folder layout is valid. A value of FALSE indicates the layout is not valid and the folder cannot be opened for playback.

    Return Value

    A result code. See DVD Playback Result Codes.

    Discussion

    Before attempting to open a DVD-Video media folder, you should call this function to verify that the folder is valid. If another media folder is open, before calling this function you should call DVDCloseMediaFile or DVDCloseMediaVolume to close the other folder.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Opens a VIDEO_TS media folder located on a mass storage device.

    Declaration

    Swift

    func DVDOpenMediaFile(_ inFile: UnsafeMutablePointer<FSRef>) -> OSStatus

    Objective-C

    OSStatus DVDOpenMediaFile ( FSRef *inFile );

    Parameters

    inFile

    A pointer to a VIDEO_TS media folder on a mass storage device other than a DVD-Video disc. To convert a path into an FSRef structure, use the function FSPathMakeRef.

    Return Value

    A result code. See DVD Playback Result Codes.

    Discussion

    This function opens a VIDEO_TS media folder on a mass storage device such as a hard drive. To open the media folder on a DVD-Video disc, you should use the function DVDOpenMediaVolume instead.

    Before calling this function:

    After you are finished playing the DVD-Video media, you should call the function DVDCloseMediaFile to close the folder.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Opens a VIDEO_TS media folder located on a DVD-Video disc.

    Declaration

    Swift

    func DVDOpenMediaVolume(_ inVolume: UnsafeMutablePointer<FSRef>) -> OSStatus

    Objective-C

    OSStatus DVDOpenMediaVolume ( FSRef *inVolume );

    Parameters

    inVolume

    A pointer to the VIDEO_TS media folder located at the root level of a DVD-Video disc. To convert a path into an FSRef structure, use the function FSPathMakeRef.

    Return Value

    A result code. See DVD Playback Result Codes.

    Discussion

    This function opens the VIDEO_TS media folder on a DVD-Video disc. To open a media folder on a mass storage device such as a hard drive, you should use the function DVDOpenMediaFile instead.

    Before calling this function:

    After you are finished playing the media on the disc, you should call the function DVDCloseMediaVolume to close the folder.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Determines whether DVD-Video media is open for playback.

    Declaration

    Swift

    func DVDHasMedia(_ outHasMedia: UnsafeMutablePointer<Boolean>) -> OSStatus

    Objective-C

    OSStatus DVDHasMedia ( Boolean *outHasMedia );

    Parameters

    outHasMedia

    A pointer to a Boolean variable. On return, a value of TRUE indicates that DVD-Video media is open for playback. A value of FALSE indicates no media is currently open.

    Return Value

    A result code. See DVD Playback Result Codes.

    Discussion

    This function checks to see if DVD-Video media is currently open as a result of successfully calling DVDOpenMediaFile or DVDOpenMediaVolume.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

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

    Declaration

    Swift

    func DVDCloseMediaFile() -> OSStatus

    Objective-C

    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.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

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

    Declaration

    Swift

    func DVDCloseMediaVolume() -> OSStatus

    Objective-C

    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.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Determines whether a graphics device supports DVD-Video playback.

    Deprecation Statement

    Use DVDIsSupportedDisplay instead.

    Declaration

    Objective-C

    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.

    Import Statement

    Availability

    Available in OS X v10.3 and later.

    Deprecated in OS X v10.5.

    Not available to 64-bit applications.

  • Sets the graphics device for the current DVD-Video playback session.

    Deprecation Statement

    Use DVDSetVideoDisplay instead.

    Declaration

    Objective-C

    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.

    Import Statement

    Availability

    Available in OS X v10.3 and later.

    Deprecated in OS X v10.5.

    Not available to 64-bit applications.

  • If a graphics device supports DVD-Video playback, sets the device for the current playback session.

    Deprecation Statement

    Use DVDSwitchToDisplay instead.

    Declaration

    Objective-C

    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.

    Import Statement

    Availability

    Available in OS X v10.3 and later.

    Deprecated in OS X v10.5.

    Not available to 64-bit applications.

  • Gets the graphics device for the current DVD-Video playback session.

    Deprecation Statement

    Use DVDGetVideoDisplay instead.

    Declaration

    Objective-C

    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.

    Import Statement

    Availability

    Available in OS X v10.3 and later.

    Deprecated in OS X v10.5.

    Not available to 64-bit applications.

  • Determines whether a graphics display supports DVD-Video playback.

    Declaration

    Swift

    func DVDIsSupportedDisplay(_ inDisplay: CGDirectDisplayID, _ outSupported: UnsafeMutablePointer<Boolean>) -> OSStatus

    Objective-C

    OSStatus DVDIsSupportedDisplay ( CGDirectDisplayID inDisplay, Boolean *outSupported );

    Parameters

    inDisplay

    The Quartz display ID for the graphics display you want to use for video playback. For information about how to get a display ID, see Quartz Display Services Reference.

    outSupported

    A pointer to a Boolean variable. On return, a value of TRUE indicates that the specified graphics display can be used for DVD-Video playback. A value of FALSE indicates the display cannot be used for this purpose. If the value is FALSE, the display 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 DVDSetVideoWindowID with a valid window.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Sets the graphics display for the current DVD-Video playback session.

    Declaration

    Swift

    func DVDSetVideoDisplay(_ inDisplay: CGDirectDisplayID) -> OSStatus

    Objective-C

    OSStatus DVDSetVideoDisplay ( CGDirectDisplayID inDisplay );

    Parameters

    inDisplay

    The Quartz display ID for the graphics display you want to use for video playback. For information about how to get a display ID, see Quartz Display Services Reference.

    Return Value

    A result code. See DVD Playback Result Codes.

    Discussion

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

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • If a specified graphics display supports DVD-Video playback, sets the display for the current playback session.

    Declaration

    Swift

    func DVDSwitchToDisplay(_ newDisplay: CGDirectDisplayID, _ outSupported: UnsafeMutablePointer<Boolean>) -> OSStatus

    Objective-C

    OSStatus DVDSwitchToDisplay ( CGDirectDisplayID newDisplay, Boolean *outSupported );

    Parameters

    newDisplay

    The Quartz display ID for the graphics display you want to use for video playback. For information about how to get a display ID, see Quartz Display Services Reference.

    outSupported

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

    Return Value

    A result code. If the new display is not supported, returns an error and maintains the current display. See DVD Playback Result Codes.

    Discussion

    This convenience function is equivalent to calling the function DVDIsSupportedDisplay followed by a call to DVDSetVideoDisplay. This function works correctly even if there is no current video playback display.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Gets the graphics display for the current DVD-Video playback session.

    Declaration

    Swift

    func DVDGetVideoDisplay(_ outDisplay: UnsafeMutablePointer<CGDirectDisplayID>) -> OSStatus

    Objective-C

    OSStatus DVDGetVideoDisplay ( CGDirectDisplayID *outDisplay );

    Parameters

    outDisplay

    A pointer to a Quartz display ID. On return, the display ID is set to the current video playback display.

    Return Value

    A result code. See DVD Playback Result Codes.

    Discussion

    Before calling this function, you need to set the video playback display using DVDSetVideoDisplay or DVDSwitchToDisplay.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Enables or disables DVD-Video playback in a Carbon window.

    Deprecation Statement

    Use DVDSetVideoWindowRef instead.

    Declaration

    Objective-C

    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:

    • After calling the function DVDInitialize to start a new DVD-Video playback session, you should call this function and pass the graphics port for the window.

    • When video is not playing and you want to draw into the area of the window you set by calling the function DVDSetVideoBounds, you should call this function and pass NULL in the inVidPort parameter. When you are finished drawing into the video area of the window and you are ready to resume video playback, you should call this function again and pass the window port in the inVidPort parameter.

    Import Statement

    Availability

    Available in OS X v10.3 and later.

    Deprecated in OS X v10.5.

    Not available to 64-bit applications.

  • Gets the graphics port of the Carbon window in use for DVD-Video playback.

    Deprecation Statement

    Use DVDGetVideoWindowRef instead.

    Declaration

    Objective-C

    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.

    Import Statement

    Availability

    Available in OS X v10.3 and later.

    Deprecated in OS X v10.5.

    Not available to 64-bit applications.

  • Enables or disables DVD-Video playback in a Cocoa window.

    Declaration

    Swift

    func DVDSetVideoWindowID(_ inVidWindowID: UInt32) -> OSStatus

    Objective-C

    OSStatus DVDSetVideoWindowID ( UInt32 inVidWindowID );

    Parameters

    inVidWindowID

    The window ID associated with a Cocoa 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 Cocoa window for DVD-Video playback, you need to use this function in two different situations:

    • Immediately after calling the function DVDInitialize to start a new DVD-Video playback session, you should call this function and pass the window ID associated with the Cocoa window.

    • When video is not playing and you want to draw into the area of the window you set by calling the function DVDSetVideoBounds, you should call this function and pass NULL in the inVidWindowID parameter.

    To learn how to obtain the window number for a Cocoa window, see the description of the windowNumber method in the NSWindow class.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Gets the window ID of the Cocoa window in use for DVD-Video playback.

    Declaration

    Swift

    func DVDGetVideoWindowID(_ outVidWindowID: UnsafeMutablePointer<UInt32>) -> OSStatus

    Objective-C

    OSStatus DVDGetVideoWindowID ( UInt32 *outVidWindowID );

    Parameters

    outVidWindowID

    A pointer to a Cocoa window ID. On return, the window ID of the Cocoa window currently in use for DVD-Video playback, or zero if there is no Cocoa window.

    Return Value

    A result code. See DVD Playback Result Codes.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Sets the bounds in which to display the video.

    Deprecation Statement

    Use DVDSetVideoCGBounds instead.

    Declaration

    Objective-C

    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.

    Import Statement

    Availability

    Available in OS X v10.3 and later.

    Deprecated in OS X v10.5.

    Not available to 64-bit applications.

  • Gets the bounds in which to display the video.

    Deprecation Statement

    Use DVDGetVideoCGBounds instead.

    Declaration

    Objective-C

    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.

    Import Statement

    Availability

    Available in OS X v10.3 and later.

    Deprecated in OS X v10.5.

    Not available to 64-bit applications.

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

    Declaration

    Swift

    func DVDGetNativeVideoSize(_ outWidth: UnsafeMutablePointer<UInt16>, _ outHeight: UnsafeMutablePointer<UInt16>) -> OSStatus

    Objective-C

    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.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Gets the aspect ratio of the current title or menu.

    Declaration

    Swift

    func DVDGetAspectRatio(_ outRatio: UnsafeMutablePointer<DVDAspectRatio>) -> OSStatus

    Objective-C

    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.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

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

    Declaration

    Swift

    func DVDGetFormatStandard(_ outFormat: UnsafeMutablePointer<DVDFormat>) -> OSStatus

    Objective-C

    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.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

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

  • Sets the audio stream to use.

    Declaration

    Swift

    func DVDSetAudioStream(_ inStreamNum: UInt16) -> OSStatus

    Objective-C

    OSStatus DVDSetAudioStream ( UInt16 inStreamNum );

    Parameters

    inStreamNum

    An integer from 1 to 8 that specifies an audio stream in the current title. DVD-Video media supports up to 8 audio 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.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Gets the audio stream currently being used.

    Declaration

    Swift

    func DVDGetAudioStream(_ outStreamNum: UnsafeMutablePointer<UInt16>) -> OSStatus

    Objective-C

    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.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Gets the number of audio streams currently available.

    Declaration

    Swift

    func DVDGetNumAudioStreams(_ outNumStreams: UnsafeMutablePointer<UInt16>) -> OSStatus

    Objective-C

    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.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Gets the current audio stream format.

    Declaration

    Swift

    func DVDGetAudioStreamFormat(_ outFormat: UnsafeMutablePointer<DVDAudioFormat>, _ outBitsPerSample: UnsafeMutablePointer<UInt32>, _ outSamplesPerSecond: UnsafeMutablePointer<UInt32>, _ outChannels: UnsafeMutablePointer<UInt32>) -> OSStatus

    Objective-C

    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.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Gets the audio format for a specified stream.

    Declaration

    Swift

    func DVDGetAudioStreamFormatByStream(_ inStreamNum: UInt32, _ outFormat: UnsafeMutablePointer<DVDAudioFormat>, _ outBitsPerSample: UnsafeMutablePointer<UInt32>, _ outSamplesPerSecond: UnsafeMutablePointer<UInt32>, _ outChannels: UnsafeMutablePointer<UInt32>) -> OSStatus

    Objective-C

    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.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.4 and later.

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

  • Sets the video playback position relative to the specified time code (elapsed, remaining).

    Declaration

    Swift

    func DVDSetTime(_ inTimeCode: DVDTimeCode, _ inTime: DVDTimePosition, _ inFrames: UInt16) -> OSStatus

    Objective-C

    OSStatus DVDSetTime ( DVDTimeCode inTimeCode, DVDTimePosition inTime, UInt16 inFrames );

    Parameters

    inTimeCode

    A time code constant. You must specify one of two values: kDVDTimeCodeElapsedSeconds or kDVDTimeCodeRemainingSeconds.

    inTime

    An integer that specifies the position in seconds.

    inFrames

    An integer that specifies the frame number. For the NTSC video format, the range of frame numbers is 0 to 29. For the PAL format, the range is 0 to 24.

    Return Value

    A result code. If the media does not allow this action, the result code is kDVDErrorUserActionNoOp. For other possible result codes, see DVD Playback Result Codes.

    Discussion

    This function sets the video playback position in the current title. Not all titles permit this operation, so it’s important to check the result code returned by this function.

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

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Gets the current video playback position in the current title or menu, relative to the specified time code (elapsed, remaining).

    Declaration

    Swift

    func DVDGetTime(_ inTimeCode: DVDTimeCode, _ outTime: UnsafeMutablePointer<DVDTimePosition>, _ outFrames: UnsafeMutablePointer<UInt16>) -> OSStatus

    Objective-C

    OSStatus DVDGetTime ( DVDTimeCode inTimeCode, DVDTimePosition *outTime, UInt16 *outFrames );

    Parameters

    inTimeCode

    A time code constant. You must specify one of two values: kDVDTimeCodeElapsedSeconds or kDVDTimeCodeRemainingSeconds.

    outTime

    A pointer to an integer. On return, the integer contains the current video playback position in seconds.

    outFrames

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

    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. The video playback position in a menu refers to animated menus.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Turns DVD@ccess support on or off.

    Declaration

    Swift

    func DVDEnableWebAccess(_ inEnable: Boolean) -> OSStatus

    Objective-C

    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.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Determines if media is open and playing (even if paused).

    Declaration

    Swift

    func DVDIsPlaying(_ outIsPlaying: UnsafeMutablePointer<Boolean>) -> OSStatus

    Objective-C

    OSStatus DVDIsPlaying ( Boolean *outIsPlaying );

    Parameters

    outIsPlaying

    A pointer to a Boolean variable. On return, a value of TRUE indicates that media is open and playing, even if paused. A value of FALSE indicates that media is open and stopped, or not open.

    Return Value

    A result code. See DVD Playback Result Codes.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Determines if media is open and playing, and video playback is paused.

    Declaration

    Swift

    func DVDIsPaused(_ outIsPaused: UnsafeMutablePointer<Boolean>) -> OSStatus

    Objective-C

    OSStatus DVDIsPaused ( Boolean *outIsPaused );

    Parameters

    outIsPaused

    A pointer to a Boolean variable. On return, a value of TRUE indicates that media is open and paused. A value of FALSE indicates that media is open and not paused, or not open.

    Return Value

    A result code. See DVD Playback Result Codes.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Starts playing the media, if currently stopped.

    Declaration

    Swift

    func DVDPlay() -> OSStatus

    Objective-C

    OSStatus DVDPlay ( void );

    Return Value

    A result code. See DVD Playback Result Codes.

    Discussion

    Before calling this function, DVD-Video media needs to be open. If you call this function after calling DVDStop, video playback resumes at the stop position.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Pauses the media, if currently playing.

    Declaration

    Swift

    func DVDPause() -> OSStatus

    Objective-C

    OSStatus DVDPause ( void );

    Return Value

    A result code. See DVD Playback Result Codes.

    Discussion

    This function pauses the video playback and freezes the video. Before calling this function, DVD-Video media needs to be open and video playback started. After calling this function, the media is still considered to be in video playback mode—that is, you may call DVDStop without first calling DVDResume.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Resumes playing the media, if currently paused.

    Declaration

    Swift

    func DVDResume() -> OSStatus

    Objective-C

    OSStatus DVDResume ( void );

    Return Value

    A result code. See DVD Playback Result Codes.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Stops playing the current title. If video playback is already stopped, the current video playback position is cleared.

    Declaration

    Swift

    func DVDStop() -> OSStatus

    Objective-C

    OSStatus DVDStop ( void );

    Return Value

    A result code. See DVD Playback Result Codes.

    Discussion

    If you call this function while a title is playing, video playback is stopped, the current video playback position is saved, and the video area is cleared to the color black.

    If you call this function a second time with no intervening play commands, the video playback position is cleared and the playback position is now the beginning of the disc. This is equivalent to calling the function DVDClearLastPlayBookmark.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Fast forwards or rewinds at the specified scan rate.

    Declaration

    Swift

    func DVDScan(_ inRate: DVDScanRate, _ inDirection: DVDScanDirection) -> OSStatus

    Objective-C

    OSStatus DVDScan ( DVDScanRate inRate, DVDScanDirection inDirection );

    Parameters

    inRate

    An integer that specifies the rate at which to scan. For a list of possible values, see Scan Rates.

    inDirection

    An integer that specifies the direction in which to scan. For a list of possible values, see Scan Directions.

    Return Value

    A result code. See DVD Playback Result Codes.

    Discussion

    This function advances the media in the specified direction at the specified rate. When you scan at a rate other than kDVDScanRate1x (normal speed), the audio channel is muted and subtitles are not displayed. If the scan rate is normal and the direction is forward, this function is equivalent to DVDPlay. This function does not support video playback at normal speed in the reverse direction.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Gets the current scan direction and scan rate.

    Declaration

    Swift

    func DVDGetScanRate(_ outRate: UnsafeMutablePointer<DVDScanRate>, _ outDirection: UnsafeMutablePointer<DVDScanDirection>) -> OSStatus

    Objective-C

    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.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

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

    Declaration

    Swift

    func DVDGetState(_ outState: UnsafeMutablePointer<DVDState>) -> OSStatus

    Objective-C

    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.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Steps one frame in the forward direction.

    Declaration

    Swift

    func DVDStepFrame(_ inDirection: DVDScanDirection) -> OSStatus

    Objective-C

    OSStatus DVDStepFrame ( DVDScanDirection inDirection );

    Parameters

    inDirection

    An integer that specifies the direction in which to step. This function does not support frame-stepping in the backward direction, so you should pass the constant kDVDScanDirectionForward.

    Return Value

    A result code. See DVD Playback Result Codes.

    Discussion

    Before calling this function, the media needs to be open and video playback started. If the media is not paused when you call this function, this function pauses the media before stepping the frame in the forward direction.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Saves video playback state information and suspends playback.

    Declaration

    Swift

    func DVDSleep() -> OSStatus

    Objective-C

    OSStatus DVDSleep ( void );

    Return Value

    A result code. See DVD Playback Result Codes.

    Discussion

    You should call this function when the operating system is putting the machine to sleep, to save video playback information. To find out when the machine is about to sleep:

    • Cocoa applications can add an observer to the workspace notification center for the notification NSWorkspaceWillSleepNotification.

    • Carbon applications can use the procedure described in Technical Q&A QA1340.

    You should also call this function if the user changes the display configuration or resolution during video playback. To learn how to receive a notification that the display configuration is about to change, see Quartz Display Services Reference.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Restores video playback state information and resumes playback.

    Declaration

    Swift

    func DVDWakeUp() -> OSStatus

    Objective-C

    OSStatus DVDWakeUp ( void );

    Return Value

    A result code. See DVD Playback Result Codes.

    Discussion

    This function restores the video playback information saved by a previous call to the function DVDSleep. You should call this function whenever the operating system wakes up the machine and you have already called DVDSleep. To find out when the machine is waking up from sleep:

    • Cocoa applications can add an observer to the workspace notification center for the notification NSWorkspaceDidWakeNotification.

    • Carbon applications can use the procedure described in Technical Q&A QA1340.

    You should also call this function if the user changes the display configuration or resolution during video playback. To learn how to receive a notification that the display configuration has changed, see Quartz Display Services Reference.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

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

  • Determines whether the video playback volume is currently muted.

    Declaration

    Swift

    func DVDIsMuted(_ outIsMuted: UnsafeMutablePointer<Boolean>) -> OSStatus

    Objective-C

    OSStatus DVDIsMuted ( Boolean *outIsMuted );

    Parameters

    outIsMuted

    A pointer to a Boolean variable. On return, a value of TRUE indicates the video playback volume is currently muted. A value of FALSE indicates the volume is not muted.

    Return Value

    A result code. See DVD Playback Result Codes.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Toggles the mute setting on or off.

    Declaration

    Swift

    func DVDMute(_ inMute: Boolean) -> OSStatus

    Objective-C

    OSStatus DVDMute ( Boolean inMute );

    Parameters

    inMute

    A Boolean value that specifies whether to turn the mute setting on or off. To mute the video playback volume, pass TRUE. To restore the previous volume setting, pass FALSE.

    Return Value

    A result code. See DVD Playback Result Codes.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Sets the playback audio volume setting (0 - 255).

    Declaration

    Swift

    func DVDSetAudioVolume(_ inVolume: UInt16) -> OSStatus

    Objective-C

    OSStatus DVDSetAudioVolume ( UInt16 inVolume );

    Parameters

    inVolume

    An integer in the range 0 to 255 that specifies the new video playback volume setting. Larger values are clamped to 255.

    Return Value

    A result code. See DVD Playback Result Codes.

    Discussion

    This function changes the current playback audio volume setting, not the system audio volume setting. The actual audio volume experienced by the user is a function of these two settings:

    • actual audio volume = system volume * playback audio volume / 255

    For example, if you set the playback volume to 127, the actual volume is approximately one-half the current system volume.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

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

    Declaration

    Swift

    func DVDGetAudioVolume(_ outVolume: UnsafeMutablePointer<UInt16>) -> OSStatus

    Objective-C

    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.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

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

    Declaration

    Swift

    func DVDGetAudioVolumeInfo(_ outMinVolume: UnsafeMutablePointer<UInt16>, _ outCurVolume: UnsafeMutablePointer<UInt16>, _ outMaxVolume: UnsafeMutablePointer<UInt16>) -> OSStatus

    Objective-C

    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.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

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.

  • Determines whether a specified input menu is available.

    Declaration

    Swift

    func DVDHasMenu(_ inMenu: DVDMenu, _ outHasMenu: UnsafeMutablePointer<Boolean>) -> OSStatus

    Objective-C

    OSStatus DVDHasMenu ( DVDMenu inMenu, Boolean *outHasMenu );

    Parameters

    inMenu

    A constant that specifies an input menu. For a list of possible values, see Playback Menus.

    outHasMenu

    A pointer to a Boolean variable. On return, a value of TRUE indicates the specified input menu is available. A value of FALSE indicates the menu is not available.

    Return Value

    A result code. See DVD Playback Result Codes.

    Discussion

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

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Determines whether a menu is being displayed, and if so, which one.

    Declaration

    Swift

    func DVDIsOnMenu(_ outOnMenu: UnsafeMutablePointer<Boolean>, _ outMenu: UnsafeMutablePointer<DVDMenu>) -> OSStatus

    Objective-C

    OSStatus DVDIsOnMenu ( Boolean *outOnMenu, DVDMenu *outMenu );

    Parameters

    outOnMenu

    A pointer to a Boolean variable. On return, a value of TRUE indicates a menu with one or more buttons is displayed. A value of FALSE indicates no menu is being displayed.

    outMenu

    A pointer to a menu code. On return, the code’s value is the current menu or kDVDMenuNone. For a list of all possible values, see Playback Menus.

    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. There can be only one menu displayed at a time.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Jumps to a specified menu.

    Declaration

    Swift

    func DVDGoToMenu(_ inMenu: DVDMenu) -> OSStatus

    Objective-C

    OSStatus DVDGoToMenu ( DVDMenu inMenu );

    Parameters

    inMenu

    A constant that specifies the desired menu. For a list of possible values, see Playback Menus.

    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. Not every DVD has every menu type. If you attempt to jump to a non-existent menu, this function returns an error.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Returns from a menu to the current position within the title.

    Declaration

    Swift

    func DVDReturnToTitle() -> OSStatus

    Objective-C

    OSStatus DVDReturnToTitle ( void );

    Return Value

    A result code. See DVD Playback Result Codes.

    Discussion

    This function returns to the last played position in the current title.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • If a submenu is active, moves up one level in the same domain.

    Declaration

    Swift

    func DVDGoBackOneLevel() -> OSStatus

    Objective-C

    OSStatus DVDGoBackOneLevel ( void );

    Return Value

    A result code. If no submenu is active, this function does nothing and returns . For other possible result codes, see DVD Playback Result Codes.

    Discussion

    This function is used to navigate one level up in a hierarchical structure in the same domain—for example, from a scene selection menu back to the main menu. This action is comparable to navigating upwards in the directory or folder hierarchy of a file system.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Allows the user to navigate between menu buttons.

    Declaration

    Swift

    func DVDDoUserNavigation(_ inNavigation: DVDUserNavigation) -> OSStatus

    Objective-C

    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.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • If a menu button contains a specified point, the button’s action is executed and the button’s index is passed back.

    Deprecation Statement

    Use DVDDoMenuCGClick instead.

    Declaration

    Objective-C

    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.

    Import Statement

    Availability

    Available in OS X v10.3 and later.

    Deprecated in OS X v10.5.

    Not available to 64-bit applications.

  • If a specified point lies inside a menu button, focuses the button and passes back its index.

    Deprecation Statement

    Use DVDDoMenuCGMouseOver instead.

    Declaration

    Objective-C

    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.

    Import Statement

    Availability

    Available in OS X v10.3 and later.

    Deprecated in OS X v10.5.

    Not available to 64-bit applications.

  • Selects and activates a menu button by index.

    Declaration

    Swift

    func DVDDoButtonActivate(_ inIndex: Int32) -> OSStatus

    Objective-C

    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.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.4 and later.

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

    Declaration

    Swift

    func DVDGetButtoninfo(_ numberOfButtons: UnsafeMutablePointer<UInt32>, _ selectedButton: UnsafeMutablePointer<UInt32>, _ forcedActivateButton: UnsafeMutablePointer<UInt32>, _ userButtonOffset: UnsafeMutablePointer<UInt32>, _ numberOfUserButtons: UnsafeMutablePointer<UInt32>) -> OSStatus

    Objective-C

    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.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.4 and later.

  • Gets the position and default action of a menu button.

    Declaration

    Swift

    func DVDGetButtonPosition(_ index: UInt32, _ outRect: UnsafeMutablePointer<CGRect>, _ autoAction: UnsafeMutablePointer<UInt32>) -> OSStatus

    Objective-C

    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.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.4 and later.

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

    Declaration

    Swift

    func DVDGetGPRMValue(_ index: UInt32, _ value: UnsafeMutablePointer<UInt32>) -> OSStatus

    Objective-C

    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.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.4 and later.

  • Gets a unique identifier for a media folder.

    Declaration

    Swift

    func DVDGetMediaUniqueID(_ outDiscID: UnsafeMutablePointer<UInt8>) -> OSStatus

    Objective-C

    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:

    • Two copies of the same DVD that are produced at different times do not necessarily have the same identifier. This can happen when the two media folders have minor differences.

    • Two different DVDs with similar content—collections of episodes from a television series, for example—do not always have different identifiers. This can happen when the two media folders are identical.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

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

    Declaration

    Swift

    func DVDGetMediaVolumeCFName(_ outDiscVolumeCFName: UnsafeMutablePointer<Unmanaged<CFString>?>) -> OSStatus

    Objective-C

    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 OS X mounts a DVD-Video disc. For information about using Core Foundation strings, see CFString Reference.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.4 and later.

  • Sets the title to play.

    Declaration

    Swift

    func DVDSetTitle(_ inTitleNum: UInt16) -> OSStatus

    Objective-C

    OSStatus DVDSetTitle ( UInt16 inTitleNum );

    Parameters

    inTitleNum

    An integer in the range 1 to 99 that specifies the title to play.

    Return Value

    A result code. See DVD Playback Result Codes.

    Discussion

    If the specified title exists on the current media and the media permits this operation, this function begins playing the title.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Gets the number of the current title.

    Declaration

    Swift

    func DVDGetTitle(_ outTitleNum: UnsafeMutablePointer<UInt16>) -> OSStatus

    Objective-C

    OSStatus DVDGetTitle ( UInt16 *outTitleNum );

    Parameters

    outTitleNum

    A pointer to an integer. On return, the integer contains the current title number, or 0 if a menu is active. DVD-Video media can contain up to 99 titles.

    Return Value

    A result code. See DVD Playback Result Codes.

    Discussion

    ( discussion forthcoming )

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Gets the number of titles available on the media.

    Declaration

    Swift

    func DVDGetNumTitles(_ outNumTitles: UnsafeMutablePointer<UInt16>) -> OSStatus

    Objective-C

    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.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

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

  • Sets the chapter to play.

    Declaration

    Swift

    func DVDSetChapter(_ inChapterNum: UInt16) -> OSStatus

    Objective-C

    OSStatus DVDSetChapter ( UInt16 inChapterNum );

    Parameters

    inChapterNum

    An integer that specifies the chapter to play.

    Return Value

    A result code. See DVD Playback Result Codes.

    Discussion

    This function defines the specified chapter to be the current video playback chapter. If video playback is paused, this function starts playing the chapter immediately. Note that some discs do not allow jumping directly to a chapter.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Gets the current chapter.

    Declaration

    Swift

    func DVDGetChapter(_ outChapterNum: UnsafeMutablePointer<UInt16>) -> OSStatus

    Objective-C

    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.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Gets the number of chapters in the specified title.

    Declaration

    Swift

    func DVDGetNumChapters(_ inTitleNum: UInt16, _ outNumChapters: UnsafeMutablePointer<UInt16>) -> OSStatus

    Objective-C

    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.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Plays the previous chapter in the current title.

    Declaration

    Swift

    func DVDPreviousChapter() -> OSStatus

    Objective-C

    OSStatus DVDPreviousChapter ( void );

    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. This function finds and begins to play the previous chapter. If there is no previous chapter, this function rewinds to the beginning of the current chapter and begins playing.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Plays the next chapter in the current title.

    Declaration

    Swift

    func DVDNextChapter() -> OSStatus

    Objective-C

    OSStatus DVDNextChapter ( void );

    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. This function finds and begins to play the next chapter. If there is no next chapter, this function continues playing the current chapter.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Sets the camera angle to display.

    Declaration

    Swift

    func DVDSetAngle(_ inAngleNum: UInt16) -> OSStatus

    Objective-C

    OSStatus DVDSetAngle ( UInt16 inAngleNum );

    Parameters

    inAngleNum

    A 1-based index that specifies the camera angle to display. The angle number of the main angle is 1. DVD-Video media supports up to nine camera angles.

    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. The DVD-Video author decides how many camera angles are used. If the specified angle does not exist, this function does nothing.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Gets the camera angle displayed.

    Declaration

    Swift

    func DVDGetAngle(_ outAngleNum: UnsafeMutablePointer<UInt16>) -> OSStatus

    Objective-C

    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.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Gets the number of camera angles currently available.

    Declaration

    Swift

    func DVDGetNumAngles(_ outNumAngles: UnsafeMutablePointer<UInt16>) -> OSStatus

    Objective-C

    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.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

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

  • Turns the display of subpictures on or off.

    Declaration

    Swift

    func DVDDisplaySubPicture(_ inDisplay: Boolean) -> OSStatus

    Objective-C

    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.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Determines if subpictures are currently being displayed.

    Declaration

    Swift

    func DVDIsDisplayingSubPicture(_ outDisplayingSubPicture: UnsafeMutablePointer<Boolean>) -> OSStatus

    Objective-C

    OSStatus DVDIsDisplayingSubPicture ( Boolean *outDisplayingSubPicture );

    Parameters

    outDisplayingSubPicture

    A pointer to a Boolean variable. On return, a value of TRUE indicates subpictures are being displayed. A value of FALSE indicates subpictures are hidden.

    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.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Sets the current subpicture stream.

    Declaration

    Swift

    func DVDSetSubPictureStream(_ inStreamNum: UInt16) -> OSStatus

    Objective-C

    OSStatus DVDSetSubPictureStream ( UInt16 inStreamNum );

    Parameters

    inStreamNum

    A positive integer that specifies the subpicture stream to display. Subpicture stream numbers range from 1 to 32.

    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.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Gets the current subpicture stream.

    Declaration

    Swift

    func DVDGetSubPictureStream(_ outStreamNum: UnsafeMutablePointer<UInt16>) -> OSStatus

    Objective-C

    OSStatus DVDGetSubPictureStream ( UInt16 *outStreamNum );

    Parameters

    outStreamNum

    A pointer to an integer. On return, the integer contains the identifier of the current subpicture stream, or 0 if the current title has no subpictures. 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.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Gets the number of subpicture streams currently available.

    Declaration

    Swift

    func DVDGetNumSubPictureStreams(_ outNumStreams: UnsafeMutablePointer<UInt16>) -> OSStatus

    Objective-C

    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.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

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

  • Sets the default subpicture language and extension when subpictures are enabled.

    Declaration

    Swift

    func DVDSetDefaultSubPictureLanguageCode(_ inCode: DVDLanguageCode, _ inExtension: DVDSubpictureExtensionCode) -> OSStatus

    Objective-C

    OSStatus DVDSetDefaultSubPictureLanguageCode ( DVDLanguageCode inCode, DVDSubpictureExtensionCode inExtension );

    Parameters

    inCode

    A constant that specifies the default language for the specified subpicture extension. For a list of possible values, see Language Codes. If no language is specified—that is, if you pass in kDVDLanguageNoPreference or kDVDLanguageCodeNone—the default subpicture language code is matched to the language setting in the International Preferences Panel.

    inExtension

    A constant that specifies a subpicture extension. For a list of possible values, see Subpicture Extension Codes.

    Return Value

    A result code. If the current title is playing, this function does nothing and returns kDVDErrorAlreadyPlaying. For a list of other possible result codes, see DVD Playback Result Codes.

    Discussion

    This function is used to select a subpicture language other than the system default language. Before calling this function, DVD-Video media needs to be open and video playback stopped.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

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

    Declaration

    Swift

    func DVDGetSubPictureLanguageCode(_ outCode: UnsafeMutablePointer<DVDLanguageCode>, _ outExtension: UnsafeMutablePointer<DVDSubpictureExtensionCode>) -> OSStatus

    Objective-C

    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 variable. On return, the variable contains the extension code for the current subpicture. For a list of possible values, see Subpicture Extension Codes.

    Return Value

    A result code. If subpictures are not available, this function does nothing and returns noErr. For a list of other possible result codes, see DVD Playback Result Codes.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Gets the subpicture language code and extension for a specified subpicture stream.

    Declaration

    Swift

    func DVDGetSubPictureLanguageCodeByStream(_ inStreamNum: UInt16, _ outCode: UnsafeMutablePointer<DVDLanguageCode>, _ outExtension: UnsafeMutablePointer<DVDSubpictureExtensionCode>) -> OSStatus

    Objective-C

    OSStatus DVDGetSubPictureLanguageCodeByStream ( UInt16 inStreamNum, DVDLanguageCode *outCode, DVDSubpictureExtensionCode *outExtension );

    Parameters

    inStreamNum

    A subpicture stream number in the current title. Subpicture stream numbers range from 1 to 32.

    outCode

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

    outExtension

    A pointer to a subpicture extension variable. On return, the variable contains the extension code for the subpicture stream. For a list of possible values, see Subpicture Extension Codes.

    Return Value

    A result code. See DVD Playback Result Codes.

    Discussion

    If subpictures are not available, this function does nothing and returns a non-zero result code.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Sets the default audio language code and extension.

    Declaration

    Swift

    func DVDSetDefaultAudioLanguageCode(_ inCode: DVDLanguageCode, _ inExtension: DVDAudioExtensionCode) -> OSStatus

    Objective-C

    OSStatus DVDSetDefaultAudioLanguageCode ( DVDLanguageCode inCode, DVDAudioExtensionCode inExtension );

    Parameters

    inCode

    A constant that specifies the default audio language for the specified audio extension.. For a list of possible values, see Language Codes. If no language is specified—that is, if you pass in kDVDLanguageNoPreference or kDVDLanguageCodeNone—the default audio language is matched to the language setting in the International Preferences Panel.

    inExtension

    A constant that specifies an audio extension. For a list of possible values, see Audio Extension Codes.

    Return Value

    A result code. See DVD Playback Result Codes.

    Discussion

    This function selects an audio language other than the DVD’s default language for a specified audio extension. Before calling this function, DVD-Video media needs to be open.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Gets the current audio language code and extension.

    Declaration

    Swift

    func DVDGetAudioLanguageCode(_ outCode: UnsafeMutablePointer<DVDLanguageCode>, _ outExtension: UnsafeMutablePointer<DVDAudioExtensionCode>) -> OSStatus

    Objective-C

    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.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

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

    Declaration

    Swift

    func DVDGetAudioLanguageCodeByStream(_ inStreamNum: UInt16, _ outCode: UnsafeMutablePointer<DVDLanguageCode>, _ outExtension: UnsafeMutablePointer<DVDAudioExtensionCode>) -> OSStatus

    Objective-C

    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.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Sets the default menu language code.

    Declaration

    Swift

    func DVDSetDefaultMenuLanguageCode(_ inCode: DVDLanguageCode) -> OSStatus

    Objective-C

    OSStatus DVDSetDefaultMenuLanguageCode ( DVDLanguageCode inCode );

    Parameters

    inCode

    An integer code that specifies the default menu language for the current title. For a list of possible values, see Language Codes. If no language is specified—that is, if you pass in kDVDLanguageNoPreference or kDVDLanguageCodeNone—the default menu language is matched to the language setting in the International Preferences Panel.

    Return Value

    A result code. See DVD Playback Result Codes.

    Discussion

    This function selects a language other than the DVD’s default language for menus in the current title. Before calling this function, DVD-Video media needs to be open and video playback stopped.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Gets the menu language code for the current title.

    Declaration

    Swift

    func DVDGetMenuLanguageCode(_ outCode: UnsafeMutablePointer<DVDLanguageCode>) -> OSStatus

    Objective-C

    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.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Requests a bookmark to the current play position.

    Declaration

    Swift

    func DVDGetBookmark(_ outBookmarkData: UnsafeMutablePointer<Void>, _ ioBookmarkDataSize: UnsafeMutablePointer<UInt32>) -> OSStatus

    Objective-C

    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.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Sets the video playback position using a bookmark, and resumes play.

    Declaration

    Swift

    func DVDGotoBookmark(_ inBookmarkData: UnsafeMutablePointer<Void>, _ inBookmarkDataSize: UInt32) -> OSStatus

    Objective-C

    OSStatus DVDGotoBookmark ( void *inBookMarkData, UInt32 inBookMarkDataSize );

    Parameters

    inBookmarkData

    A generic pointer to memory for a bookmark. To learn how to obtain a bookmark, see DVDGetBookmark or DVDGetLastPlayBookmark.

    inBookmarkDataSize

    The actual size of the specified bookmark in bytes.

    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 uses the specified bookmark to set the video playback position, and begins playing the media. See also DVDSetLastPlayBookmark.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Requests a bookmark to the last play position.

    Declaration

    Swift

    func DVDGetLastPlayBookmark(_ outBookmarkData: UnsafeMutablePointer<Void>, _ ioBookmarkDataSize: UnsafeMutablePointer<UInt32>) -> OSStatus

    Objective-C

    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.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Sets the video playback position using a bookmark.

    Declaration

    Swift

    func DVDSetLastPlayBookmark(_ inBookmarkData: UnsafeMutablePointer<Void>, _ inBookmarkDataSize: UInt32) -> OSStatus

    Objective-C

    OSStatus DVDSetLastPlayBookmark ( void *inBookMarkData, UInt32 inBookMarkDataSize );

    Parameters

    inBookmarkData

    A generic pointer to memory that contains a bookmark.

    inBookmarkDataSize

    The actual size of the specified bookmark in bytes.

    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 uses the specified bookmark to set the video playback position, but does not begin playing the media. See also DVDGotoBookmark.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

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

    Declaration

    Swift

    func DVDClearLastPlayBookmark() -> OSStatus

    Objective-C

    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.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

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

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

    Declaration

    Swift

    func DVDGetDiscRegionCode(_ outCode: UnsafeMutablePointer<DVDRegionCode>) -> OSStatus

    Objective-C

    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
    • }

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

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

    Declaration

    Swift

    func DVDGetDriveRegionCode(_ outCode: UnsafeMutablePointer<DVDRegionCode>, _ outNumberChangesLeft: UnsafeMutablePointer<Int16>) -> OSStatus

    Objective-C

    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
    • }

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Sets the drive region code (requires user authentication).

    Declaration

    Swift

    func DVDSetDriveRegionCode(_ inCode: DVDRegionCode, _ inAuthorization: AuthorizationRef) -> OSStatus

    Objective-C

    OSStatus DVDSetDriveRegionCode ( DVDRegionCode inCode, AuthorizationRef inAuthorization );

    Parameters

    inCode

    A region code. For a list of possible values, see Region Codes.

    inAuthorization

    An authorization object. For information on how to obtain a valid user authorization, see Authorization Services Programming Guide.

    Return Value

    A result code. See DVD Playback Result Codes.

    Discussion

    In order to play a DVD-Video disc in a DVD drive, the region code assigned to the drive must match one of the region codes assigned to the disc. The region code assigned to a DVD drive may be changed a total of five times, after which the drive’s region is permanently locked. The initial region code assigned to a new drive is set automatically when the user inserts a disc for the first time.

    You can use the function DVDGetDiscRegionCode to retrieve the region codes on a disc; you can use the function DVDGetDriveRegionCode to retrieve the region code assigned to a drive and the number of remaining changes. If there is a mismatch and the number of remaining changes is greater than zero, you should display a dialog that asks whether the user wants to reset the drive region to match one of the disc regions. If the user wants to proceed, you should obtain an authorization object and call this function.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Registers a callback function to get notified when state changes in DVD Playback occur.

    Declaration

    Swift

    func DVDRegisterEventCallBack(_ inCallBackProc: DVDEventCallBackFunctionPtr, _ inCode: UnsafeMutablePointer<DVDEventCode>, _ inCodeCount: UInt32, _ inRefCon: UnsafeMutablePointer<Void>, _ outCallBackID: UnsafeMutablePointer<DVDEventCallBackRef>) -> OSStatus

    Objective-C

    OSStatus DVDRegisterEventCallBack ( DVDEventCallBackFunctionPtr inCallBackProc, DVDEventCode *inCode, UInt32 inCodeCount, void *inRefCon, DVDEventCallBackRef *outCallBackID );

    Parameters

    inCallBackProc

    A callback function that handles one or more DVD Playback events.

    inCode

    An array of one or more events for which you are registering this callback. For a list of possible events, see Event Codes.

    inCodeCount

    The number of events for which you are registering.

    inRefCon

    Application-defined data that’s passed to your callback. If you decide not to use this parameter, you should pass NULL.

    outCallBackID

    A pointer to an integer. On return, the integer contains the unique identifier for this registration.

    Return Value

    A result code. See DVD Playback Result Codes.

    Discussion

    This function is optional. You may register more than one callback, and you may register multiple events for a single callback. For every call to this function, there should be a corresponding call to the function DVDUnregisterEventCallBack using the identifier for this registration. You should unregister your callbacks before calling the function DVDDispose to end the current DVD-Video playback session.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Unregisters an event callback.

    Declaration

    Swift

    func DVDUnregisterEventCallBack(_ inCallBackID: DVDEventCallBackRef) -> OSStatus

    Objective-C

    OSStatus DVDUnregisterEventCallBack ( DVDEventCallBackRef inCallBackID );

    Parameters

    inCallBackID

    The unique identifier for an event callback registration. See DVDRegisterEventCallBack.

    Return Value

    A result code. See DVD Playback Result Codes.

    Discussion

    This function should be called once for each call to the function DVDRegisterEventCallBack. You should unregister all event callbacks before calling the function DVDDispose to end the current DVD-Video playback session.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Determines if an event callback is already registered.

    Declaration

    Swift

    func DVDIsRegisteredEventCallBack(_ inCallBackID: DVDEventCallBackRef) -> Boolean

    Objective-C

    Boolean DVDIsRegisteredEventCallBack ( DVDEventCallBackRef inCallBackID );

    Parameters

    inCallBackID

    The unique identifier for an event callback registration. See DVDRegisterEventCallBack.

    Return Value

    A Boolean value that indicates whether the corresponding event callback has been registered.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Sets the rate of the DVD Playback time event.

    Declaration

    Swift

    func DVDSetTimeEventRate(_ inMilliseconds: UInt32) -> OSStatus

    Objective-C

    OSStatus DVDSetTimeEventRate ( UInt32 inMilliseconds );

    Parameters

    inMilliseconds

    The new interval between time events, specified in milliseconds.

    Return Value

    A result code. See DVD Playback Result Codes.

    Discussion

    The default interval between DVD Playback time events is 900 milliseconds. You can use this function to lengthen or shorten the interval between time events. This function is relevant when you have used the function DVDRegisterEventCallBack to register a callback for one or both of the time events: kDVDEventTitleTime and kDVDEventChapterTime . Time event callbacks are typically used for tasks such as updating the elapsed time or remaining time displayed in your user interface.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Gets the rate of the time event.

    Declaration

    Swift

    func DVDGetTimeEventRate(_ outMilliseconds: UnsafeMutablePointer<UInt32>) -> OSStatus

    Objective-C

    OSStatus DVDGetTimeEventRate ( UInt32 *outMilliseconds );

    Parameters

    outMilliseconds

    A pointer to an integer variable. On return, the integer contains the current interval between time events in milliseconds.

    Return Value

    A result code. See DVD Playback Result Codes.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

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

    Declaration

    Swift

    func DVDGetMediaVolumeName(_ outDiscVolumeName: UnsafeMutablePointer<UnsafeMutablePointer<Int8>>) -> OSStatus

    Objective-C

    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 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 OS X version 10.4 or later should use the replacement function DVDGetMediaVolumeCFName instead.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Gets the key color used by the video driver.

    Deprecation Statement

    There is no replacement function.

    Declaration

    Objective-C

    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.

    Import Statement

    Availability

    Available in OS X v10.3 and later.

    Deprecated in OS X v10.5.

    Not available to 64-bit applications.

  • Indicates whether there is a chapter after the current chapter.

    Declaration

    Swift

    func DVDHasNextChapter(_ outHasChapter: UnsafeMutablePointer<Boolean>) -> OSStatus

    Objective-C

    OSStatus DVDHasNextChapter ( Boolean *outHasChapter );

    Parameters

    outHasChapter

    A pointer to a Boolean variable. On return, its value is TRUE.

    Return Value

    A result code. See DVD Playback Result Codes.

    Discussion

    This function does nothing and passes back TRUE.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Indicates whether there is a chapter before the current chapter.

    Declaration

    Swift

    func DVDHasPreviousChapter(_ outHasChapter: UnsafeMutablePointer<Boolean>) -> OSStatus

    Objective-C

    OSStatus DVDHasPreviousChapter ( Boolean *outHasChapter );

    Parameters

    outHasChapter

    A pointer to a Boolean variable. On return, its value is TRUE.

    Return Value

    A result code. See DVD Playback Result Codes.

    Discussion

    This function does nothing and passes back TRUE.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Not recommended.

    Declaration

    Swift

    func DVDIdle() -> OSStatus

    Objective-C

    OSStatus DVDIdle ( void );

    Return Value

    A result code. See DVD Playback Result Codes.

    Discussion

    This function does nothing and returns noErr.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Sets the aspect ratio for the current title.

    Declaration

    Swift

    func DVDSetAspectRatio(_ inRatio: DVDAspectRatio) -> OSStatus

    Objective-C

    OSStatus DVDSetAspectRatio ( DVDAspectRatio inRatio );

    Parameters

    inRatio

    A constant that specifies the desired aspect ratio for the current title. For a list of possible values, see Aspect Ratios.

    Return Value

    A result code. See DVD Playback Result Codes.

    Discussion

    This function does nothing and returns noErr.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

  • Not recommended.

    Declaration

    Swift

    func DVDUpdateVideo() -> OSStatus

    Objective-C

    OSStatus DVDUpdateVideo ( void );

    Return Value

    A result code. See DVD Playback Result Codes.

    Discussion

    This function does nothing and returns noErr.

    Import Statement

    import DVDPlayback

    Availability

    Available in OS X v10.3 and later.

Callbacks

  • Defines a pointer to an application-defined callback function that’s called when a registered event occurs.

    Declaration

    Objective-C

    typedef void (*DVDEventCallBackFunctionPtr) ( DVDEventCode inEventCode, UInt32 inEventValue1, UInt32 inEventValue2, UInt32 inRefCon );

    Parameters

    inEventCode

    A code that identifies the event. For a list of event codes, see Event Codes.

    inEventValue1

    The first event-specific parameter value. For a list of one or both parameters associated with each event, see Event Codes.

    inEventValue2

    The second event-specific parameter value. For a list of one or both parameters associated with each event, see Event Codes.

    inRefCon

    Optional application-defined data. This is the same data you pass in when you register the callback using the function DVDRegisterEventCallBack.

    Discussion

    Your callback function is called from a different thread than the main application thread. You should not attempt to draw inside this function. Instead, cache any necessary information and do the actual drawing when you are back in the main thread for your application.

    If your callback function is registered for multiple events, the function is called separately for each different event.

    Import Statement

    Availability

    Available in OS X version 10.3 and later.

  • Defines a pointer to an application-defined callback function that’s called when an unrecoverable error occurs during a DVD-Video playback session.

    Declaration

    Objective-C

    typedef void (*DVDFatalErrCallBackFunctionPtr) ( DVDErrorCode inError, UInt32 inRefCon );

    Parameters

    inError

    A code that identifies the fatal error. See DVD Playback Result Codes for a list of possible values.

    inRefCon

    Optional application-defined data. This is the same data that you pass in when you register this callback using the function DVDSetFatalErrorCallBack.

    Discussion

    When an unrecoverable error occurs, the DVD-Video playback session cannot continue and your callback function is invoked to handle the error. Your function should report the fatal error to the user, perform any necessary cleanup, and call the function DVDDispose.

    Import Statement

    Availability

    Available in OS X version 10.3 and later.

Data Types

  • Defines a unique identifier for a DVD-Video media folder.

    Declaration

    Objective-C

    typedef UInt8 DVDDiscID[8];

    Discussion

    The purpose of this 64-bit identifier is to help you distinguish between different media folders. You can obtain the identifier for a media folder by calling the function DVDGetMediaUniqueID.

    Import Statement

    Availability

    Available in OS X v10.4 and later.

  • Defines the number of seconds with respect to a time basis specified with a DVD Playback Services time code.

    Declaration

    Objective-C

    typedef UInt32 DVDTimePosition;

    Discussion

    This data type is used in conjunction with a time code to find an exact temporal location within the current title and chapter. See Time Codes.

    Import Statement

    Availability

    Available in OS X v10.3 and later.

  • Defines a non-zero result code passed to a callback function.

    Declaration

    Objective-C

    typedef OSStatus DVDErrorCode;

    Discussion

    This data type is used to pass a result code to the following types of callback functions:

    For information about the result codes defined for DVD Playback Services, see DVD Playback Result Codes.

    Import Statement

    Availability

    Available in OS X v10.3 and later.

Constants

  • Constants that specify the current play state of the framework.

    Declaration

    Objective-C

    enum { kDVDStateUnknown, kDVDStatePlaying, kDVDStatePlayingStill, kDVDStatePaused, kDVDStateStopped, kDVDStateScanning, kDVDStateIdle, kDVDStatePlayingSlow }; typedef OSStatus DVDState;

    Constants

    • kDVDStateUnknown

      kDVDStateUnknown

      The initial state of a new DVD-Video playback session.

      Available in OS X v10.3 and later.

    • kDVDStatePlaying

      kDVDStatePlaying

      DVD-Video media is open and playing at normal rate (1x scan rate).

      Available in OS X v10.3 and later.

    • kDVDStatePlayingStill

      kDVDStatePlayingStill

      DVD-Video media is open and playing a single frame.

      Available in OS X v10.3 and later.

    • kDVDStatePaused

      kDVDStatePaused

      DVD-Video media is open and paused or frame-stepping.

      Available in OS X v10.3 and later.

    • kDVDStateStopped

      kDVDStateStopped

      DVD-Video media is open and stopped (not playing).

      Available in OS X v10.3 and later.

    • kDVDStateScanning

      kDVDStateScanning

      DVD-Video media is open and playing in fast motion (greater than 1x scan rate).

      Available in OS X v10.3 and later.

    • kDVDStateIdle

      kDVDStateIdle

      Not used.

      Available in OS X v10.3 and later.

    • kDVDStatePlayingSlow

      kDVDStatePlayingSlow

      DVD-Video media is open and playing in slow motion (less than 1x scan rate).

      Available in OS X v10.4 and later.

    Discussion

    These constants are passed back to your application when calling the function DVDGetState or when handling the kDVDEventPlayback event.

    Import Statement

    Availability

    Available in OS X v10.3 and later.

  • Constants that specify input menus for a DVD-Video volume.

    Declaration

    Objective-C

    enum { kDVDMenuTitle, kDVDMenuRoot, kDVDMenuSubPicture, kDVDMenuAudio, kDVDMenuAngle, kDVDMenuPTT, kDVDMenuNone }; typedef UInt32 DVDMenu;

    Constants

    • kDVDMenuTitle

      kDVDMenuTitle

      A title or top menu.

      Available in OS X v10.3 and later.

    • kDVDMenuRoot

      kDVDMenuRoot

      A root menu.

      Available in OS X v10.3 and later.

    • kDVDMenuSubPicture

      kDVDMenuSubPicture

      A menu used to select subpictures.

      Available in OS X v10.3 and later.

    • kDVDMenuAudio

      kDVDMenuAudio

      An audio menu.

      Available in OS X v10.3 and later.

    • kDVDMenuAngle

      kDVDMenuAngle

      A viewing angle menu.

      Available in OS X v10.3 and later.

    • kDVDMenuPTT

      kDVDMenuPTT

      A part-of-title (PTT) or chapter menu.

      Available in OS X v10.3 and later.

    • kDVDMenuNone

      kDVDMenuNone

      Menu not defined.

      Available in OS X v10.3 and later.

    Discussion

    These constants are used when calling DVDGoToMenu and other menu-related functions, or when handling the kDVDEventMenuCalled event.

    Import Statement

    Availability

    Available in OS X v10.3 and later.

  • Constants that specify keyboard operations used to select a menu button and execute the action or command associated with a button.

    Declaration

    Objective-C

    enum { kDVDUserNavigationMoveUp = 1, kDVDUserNavigationMoveDown, kDVDUserNavigationMoveLeft, kDVDUserNavigationMoveRight, kDVDUserNavigationEnter }; typedef UInt32 DVDUserNavigation;

    Constants

    • kDVDUserNavigationMoveUp

      kDVDUserNavigationMoveUp

      Move to and select the button above the current location.

      Available in OS X v10.3 and later.

    • kDVDUserNavigationMoveDown

      kDVDUserNavigationMoveDown

      Move to and select the button below the current location.

      Available in OS X v10.3 and later.

    • kDVDUserNavigationMoveLeft

      kDVDUserNavigationMoveLeft

      Move to and select the button to the left of the current location.

      Available in OS X v10.3 and later.

    • kDVDUserNavigationMoveRight

      kDVDUserNavigationMoveRight

      Move to and select the button to the right of the current location.

      Available in OS X v10.3 and later.

    • kDVDUserNavigationEnter

      kDVDUserNavigationEnter

      Execute the action of the selected button.

      Available in OS X v10.3 and later.

    Discussion

    These constants are used when calling the function DVDDoUserNavigation.

    Import Statement

    Availability

    Available in OS X v10.3 and later.

  • Constants that specify a temporal location in the video stream of the current title or chapter.

    Declaration

    Objective-C

    enum { kDVDTimeCodeUninitialized, kDVDTimeCodeElapsedSeconds, kDVDTimeCodeRemainingSeconds, kDVDTimeCodeTitleDurationSeconds, kDVDTimeCodeChapterElapsedSeconds, kDVDTimeCodeChapterRemainingSeconds, kDVDTimeCodeChapterDurationSeconds }; typedef SInt16 DVDTimeCode;

    Constants

    • kDVDTimeCodeUninitialized

      kDVDTimeCodeUninitialized

      Not used.

      Available in OS X v10.3 and later.

    • kDVDTimeCodeElapsedSeconds

      kDVDTimeCodeElapsedSeconds

      Number of seconds after a specified position.

      Available in OS X v10.3 and later.

    • kDVDTimeCodeRemainingSeconds

      kDVDTimeCodeRemainingSeconds

      Number of seconds before a specified position.

      Available in OS X v10.3 and later.

    • kDVDTimeCodeTitleDurationSeconds

      kDVDTimeCodeTitleDurationSeconds

      Number of seconds in the current title.

      Available in OS X v10.3 and later.

    • kDVDTimeCodeChapterElapsedSeconds

      kDVDTimeCodeChapterElapsedSeconds

      Number of seconds elapsed since the beginning of the current chapter.

      Available in OS X v10.3 and later.

    • kDVDTimeCodeChapterRemainingSeconds

      kDVDTimeCodeChapterRemainingSeconds

      Number of seconds remaining before the end of the current chapter.

      Available in OS X v10.3 and later.

    • kDVDTimeCodeChapterDurationSeconds

      kDVDTimeCodeChapterDurationSeconds

      Number of seconds in the current chapter.

      Available in OS X v10.3 and later.

    Discussion

    These constants are used, along with the DVD time position, to find an exact temporal position within the current title or chapter. See the functions DVDSetTime and DVDGetTime.

    Import Statement

    Availability

    Available in OS X v10.3 and later.

  • Constants that specify the direction of play.

    Declaration

    Objective-C

    enum { kDVDScanDirectionForward, kDVDScanDirectionBackward }; typedef SInt8 DVDScanDirection;

    Constants

    • kDVDScanDirectionForward

      kDVDScanDirectionForward

      Scan in the forward direction.

      Available in OS X v10.3 and later.

    • kDVDScanDirectionBackward

      kDVDScanDirectionBackward

      Scan in the reverse direction.

      Available in OS X v10.3 and later.

    Discussion

    These constants are used along with the scan rate to specify the direction and speed of play. See the functions DVDScan, DVDGetScanRate, and DVDStepFrame.

    Import Statement

    Availability

    Available in OS X v10.3 and later.

  • Constants that specify the rate at which to scan.

    Declaration

    Objective-C

    enum { kDVDScanRateOneEigth = -8, kDVDScanRateOneFourth = -4, kDVDScanRateOneHalf = -2, kDVDScanRate1x = 1, kDVDScanRate2x = 2, kDVDScanRate4x = 4, kDVDScanRate8x = 8, kDVDScanRate16x = 16, kDVDScanRate32x = 32 }; typedef SInt16 DVDScanRate;

    Discussion

    These constants are used along with the scan direction to specify the speed and direction of play. The constant kDVDScanRate1x represents the normal playback speed; the slower and faster playback speeds are multiples of the normal speed. See the functions DVDScan and DVDGetScanRate.

    Import Statement

    Availability

    Available in OS X version 10.3 and later.

  • Constants that specify the current aspect ratio.

    Declaration

    Objective-C

    enum { kDVDAspectRatioUninitialized, kDVDAspectRatio4x3, kDVDAspectRatio4x3PanAndScan, kDVDAspectRatio16x9, kDVDAspectRatioLetterBox }; typedef SInt16 DVDAspectRatio;

    Constants

    • kDVDAspectRatioUninitialized

      kDVDAspectRatioUninitialized

      An unspecified aspect ratio.

      Available in OS X v10.3 and later.

    • kDVDAspectRatio4x3

      kDVDAspectRatio4x3

      The process of displaying a 4:3 video frame on a screen with the same aspect ratio.

      Available in OS X v10.3 and later.

    • kDVDAspectRatio4x3PanAndScan

      kDVDAspectRatio4x3PanAndScan

      The process of choosing a sample area of a 16:9 video frame for display on a 4:3 screen, using center-of-interest information stored on the DVD.

      Available in OS X v10.3 and later.

    • kDVDAspectRatio16x9

      kDVDAspectRatio16x9

      The process of displaying a 16:9 video frame on a screen with the same aspect ratio.

      Available in OS X v10.3 and later.

    • kDVDAspectRatioLetterBox

      kDVDAspectRatioLetterBox

      The process of displaying the entire 16:9 video frame on a 4:3 screen by shrinking the frame and adding mattes or black bars above and below the frame.

      Available in OS X v10.3 and later.

    Discussion

    These constants are used to specify an aspect ratio when calling the function DVDGetAspectRatio and when handling the kDVDEventDisplayMode event.

    Import Statement

    Availability

    Available in OS X v10.3 and later.

  • Constants that specify video broadcast formats used in DVD media.

    Declaration

    Objective-C

    enum { kDVDFormatUninitialized, kDVDFormatNTSC, kDVDFormatPAL }; typedef SInt16 DVDFormat;

    Constants

    • kDVDFormatUninitialized

      kDVDFormatUninitialized

      An unspecified video format.

      Available in OS X v10.3 and later.

    • kDVDFormatNTSC

      kDVDFormatNTSC

      National Television Standards Committee (NTSC) video format used in North America and Japan.

      Available in OS X v10.3 and later.

    • kDVDFormatPAL

      kDVDFormatPAL

      Phase Alternating Line (PAL) video format widely used in Europe, South Asia, Africa, and South America.

      Available in OS X v10.3 and later.

    Discussion

    These constants are passed back when calling the function DVDGetFormatStandard to indicate the video format used in a DVD.

    Import Statement

    Availability

    Available in OS X v10.3 and later.

  • Constants that specify the audio stream format.

    Declaration

    Objective-C

    enum { kDVDAudioUnknownFormat, kDVDAudioAC3Format, kDVDAudioMPEG1Format, kDVDAudioMPEG2Format, kDVDAudioPCMFormat, kDVDAudioDTSFormat, kDVDAudioSDDSFormat }; typedef SInt16 DVDAudioFormat;

    Constants

    • kDVDAudioUnknownFormat

      kDVDAudioUnknownFormat

      An unspecified audio format.

      Available in OS X v10.3 and later.

    • kDVDAudioAC3Format

      kDVDAudioAC3Format

      The Dolby Digital AC-3 format.

      Available in OS X v10.3 and later.

    • kDVDAudioMPEG1Format

      kDVDAudioMPEG1Format

      The MPEG-1 Layer II digital format.

      Available in OS X v10.3 and later.

    • kDVDAudioMPEG2Format

      kDVDAudioMPEG2Format

      The MPEG-2 digital format.

      Available in OS X v10.3 and later.

    • kDVDAudioPCMFormat

      kDVDAudioPCMFormat

      The linear pulse-code modulation (PCM) format used on CDs.

      Available in OS X v10.3 and later.

    • kDVDAudioDTSFormat

      kDVDAudioDTSFormat

      The Digital Theater Systems (DTS) format. This format is not supported.

      Available in OS X v10.3 and later.

    • kDVDAudioSDDSFormat

      kDVDAudioSDDSFormat

      The Sony Dynamic Digital Sound (SDDS) format. This format is not supported.

      Available in OS X v10.3 and later.

    Discussion

    These constants are used when calling the functions DVDGetAudioStreamFormat and DVDGetAudioStreamFormatByStream.

    Import Statement

    Availability

    Available in OS X v10.3 and later.

  • Constants that specify languages used in subpictures, audio, and menus.

    Declaration

    Objective-C

    enum { kDVDLanguageCodeUninitialized = FOUR_CHAR_CODE ('?? '), kDVDLanguageNoPreference = FOUR_CHAR_CODE ('** '), kDVDLanguageCodeNone = FOUR_CHAR_CODE ('00 '), kDVDLanguageCodeAfar = FOUR_CHAR_CODE ('aa '), kDVDLanguageCodeAbkhazian = FOUR_CHAR_CODE ('ab '), kDVDLanguageCodeAfrikaans = FOUR_CHAR_CODE ('af '), kDVDLanguageCodeAmharic = FOUR_CHAR_CODE ('am '), kDVDLanguageCodeArabic = FOUR_CHAR_CODE ('ar '), kDVDLanguageCodeAssamese = FOUR_CHAR_CODE ('as '), kDVDLanguageCodeAymara = FOUR_CHAR_CODE ('ay '), kDVDLanguageCodeAzerbaijani = FOUR_CHAR_CODE ('az '), kDVDLanguageCodeBashkir = FOUR_CHAR_CODE ('ba '), kDVDLanguageCodeByelorussian = FOUR_CHAR_CODE ('be '), kDVDLanguageCodeBulgarian = FOUR_CHAR_CODE ('bg '), kDVDLanguageCodeBihari = FOUR_CHAR_CODE ('bh '), kDVDLanguageCodeBislama = FOUR_CHAR_CODE ('bi '), kDVDLanguageCodeBengali = FOUR_CHAR_CODE ('bn '), kDVDLanguageCodeTibetan = FOUR_CHAR_CODE ('bo '), kDVDLanguageCodeBreton = FOUR_CHAR_CODE ('br '), kDVDLanguageCodeCatalan = FOUR_CHAR_CODE ('ca '), kDVDLanguageCodeCorsican = FOUR_CHAR_CODE ('co '), kDVDLanguageCodeCzech = FOUR_CHAR_CODE ('cs '), kDVDLanguageCodeWelsh = FOUR_CHAR_CODE ('cy '), kDVDLanguageCodeDanish = FOUR_CHAR_CODE ('da '), kDVDLanguageCodeGerman = FOUR_CHAR_CODE ('de '), kDVDLanguageCodeBhutani = FOUR_CHAR_CODE ('dz '), kDVDLanguageCodeGreek = FOUR_CHAR_CODE ('el '), kDVDLanguageCodeEnglish = FOUR_CHAR_CODE ('en '), kDVDLanguageCodeEsperanto = FOUR_CHAR_CODE ('eo '), kDVDLanguageCodeSpanish = FOUR_CHAR_CODE ('es '), kDVDLanguageCodeEstonian = FOUR_CHAR_CODE ('et '), kDVDLanguageCodeBasque = FOUR_CHAR_CODE ('eu '), kDVDLanguageCodePersian = FOUR_CHAR_CODE ('fa '), kDVDLanguageCodeFinnish = FOUR_CHAR_CODE ('fi '), kDVDLanguageCodeFiji = FOUR_CHAR_CODE ('fj '), kDVDLanguageCodeFaeroese = FOUR_CHAR_CODE ('fo '), kDVDLanguageCodeFrench = FOUR_CHAR_CODE ('fr '), kDVDLanguageCodeFrisian = FOUR_CHAR_CODE ('fy '), kDVDLanguageCodeIrish = FOUR_CHAR_CODE ('ga '), kDVDLanguageCodeScotsGaelic = FOUR_CHAR_CODE ('gd '), kDVDLanguageCodeGalician = FOUR_CHAR_CODE ('gl '), kDVDLanguageCodeGuarani = FOUR_CHAR_CODE ('gn '), kDVDLanguageCodeGujarati = FOUR_CHAR_CODE ('gu '), kDVDLanguageCodeHausa = FOUR_CHAR_CODE ('ha '), kDVDLanguageCodeHindi = FOUR_CHAR_CODE ('hi '), kDVDLanguageCodeCroatian = FOUR_CHAR_CODE ('hr '), kDVDLanguageCodeHungarian = FOUR_CHAR_CODE ('hu '), kDVDLanguageCodeArmenian = FOUR_CHAR_CODE ('hy '), kDVDLanguageCodeInterlingua = FOUR_CHAR_CODE ('ia '), kDVDLanguageCodeInterlingue = FOUR_CHAR_CODE ('ie '), kDVDLanguageCodeInupiak = FOUR_CHAR_CODE ('ik '), kDVDLanguageCodeIndonesian = FOUR_CHAR_CODE ('in '), kDVDLanguageCodeIcelandic = FOUR_CHAR_CODE ('is '), kDVDLanguageCodeItalian = FOUR_CHAR_CODE ('it '), kDVDLanguageCodeHebrew = FOUR_CHAR_CODE ('iw '), kDVDLanguageCodeJapanese = FOUR_CHAR_CODE ('ja '), kDVDLanguageCodeYiddish = FOUR_CHAR_CODE ('ji '), kDVDLanguageCodeJavanese = FOUR_CHAR_CODE ('jw '), kDVDLanguageCodeGeorgian = FOUR_CHAR_CODE ('ka '), kDVDLanguageCodeKazakh = FOUR_CHAR_CODE ('kk '), kDVDLanguageCodeGreenlandic = FOUR_CHAR_CODE ('kl '), kDVDLanguageCodeCambodian = FOUR_CHAR_CODE ('km '), kDVDLanguageCodeKannada = FOUR_CHAR_CODE ('kn '), kDVDLanguageCodeKorean = FOUR_CHAR_CODE ('ko '), kDVDLanguageCodeKashmiri = FOUR_CHAR_CODE ('ks '), kDVDLanguageCodeKurdish = FOUR_CHAR_CODE ('ku '), kDVDLanguageCodeKirghiz = FOUR_CHAR_CODE ('ky '), kDVDLanguageCodeLatin = FOUR_CHAR_CODE ('la '), kDVDLanguageCodeLingala = FOUR_CHAR_CODE ('ln '), kDVDLanguageCodeLaothian = FOUR_CHAR_CODE ('lo '), kDVDLanguageCodeLithuanian = FOUR_CHAR_CODE ('lt '), kDVDLanguageCodeLatvian = FOUR_CHAR_CODE ('lv '), kDVDLanguageCodeMalagasy = FOUR_CHAR_CODE ('mg '), kDVDLanguageCodeMaori = FOUR_CHAR_CODE ('mi '), kDVDLanguageCodeMacedonian = FOUR_CHAR_CODE ('mk '), kDVDLanguageCodeMalayalam = FOUR_CHAR_CODE ('ml '), kDVDLanguageCodeMongolian = FOUR_CHAR_CODE ('mn '), kDVDLanguageCodeMoldavian = FOUR_CHAR_CODE ('mo '), kDVDLanguageCodeMarathi = FOUR_CHAR_CODE ('mr '), kDVDLanguageCodeMalay = FOUR_CHAR_CODE ('ms '), kDVDLanguageCodeMaltese = FOUR_CHAR_CODE ('mt '), kDVDLanguageCodeBurmese = FOUR_CHAR_CODE ('my '), kDVDLanguageCodeNauru = FOUR_CHAR_CODE ('na '), kDVDLanguageCodeNepali = FOUR_CHAR_CODE ('ne '), kDVDLanguageCodeDutch = FOUR_CHAR_CODE ('nl '), kDVDLanguageCodeNorwegian = FOUR_CHAR_CODE ('no '), kDVDLanguageCodeOccitan = FOUR_CHAR_CODE ('oc '), kDVDLanguageCodeOromo = FOUR_CHAR_CODE ('om '), kDVDLanguageCodeOriya = FOUR_CHAR_CODE ('or '), kDVDLanguageCodePunjabi = FOUR_CHAR_CODE ('pa '), kDVDLanguageCodePolish = FOUR_CHAR_CODE ('pl '), kDVDLanguageCodePashto = FOUR_CHAR_CODE ('ps '), kDVDLanguageCodePortugese = FOUR_CHAR_CODE ('pt '), kDVDLanguageCodeQuechua = FOUR_CHAR_CODE ('qu '), kDVDLanguageCodeRhaetoRomance = FOUR_CHAR_CODE ('rm '), kDVDLanguageCodeKirundi = FOUR_CHAR_CODE ('rn '), kDVDLanguageCodeRomanian = FOUR_CHAR_CODE ('ro '), kDVDLanguageCodeRussian = FOUR_CHAR_CODE ('ru '), kDVDLanguageCodeKinyarwanda = FOUR_CHAR_CODE ('rw '), kDVDLanguageCodeSanskrit = FOUR_CHAR_CODE ('sa '), kDVDLanguageCodeSindhi = FOUR_CHAR_CODE ('sd '), kDVDLanguageCodeSangro = FOUR_CHAR_CODE ('sg '), kDVDLanguageCodeSerboCroatian = FOUR_CHAR_CODE ('sh '), kDVDLanguageCodeSinghalese = FOUR_CHAR_CODE ('si '), kDVDLanguageCodeSlovak = FOUR_CHAR_CODE ('sk '), kDVDLanguageCodeSlovenian = FOUR_CHAR_CODE ('sl '), kDVDLanguageCodeSamoan = FOUR_CHAR_CODE ('sm '), kDVDLanguageCodeShona = FOUR_CHAR_CODE ('sn '), kDVDLanguageCodeSomali = FOUR_CHAR_CODE ('so '), kDVDLanguageCodeAlbanian = FOUR_CHAR_CODE ('sq '), kDVDLanguageCodeSerbian = FOUR_CHAR_CODE ('sr '), kDVDLanguageCodeSiswati = FOUR_CHAR_CODE ('ss '), kDVDLanguageCodeSesotho = FOUR_CHAR_CODE ('st '), kDVDLanguageCodeSudanese = FOUR_CHAR_CODE ('su '), kDVDLanguageCodeSwedish = FOUR_CHAR_CODE ('sv '), kDVDLanguageCodeSwahili = FOUR_CHAR_CODE ('sw '), kDVDLanguageCodeTamil = FOUR_CHAR_CODE ('ta '), kDVDLanguageCodeTelugu = FOUR_CHAR_CODE ('te '), kDVDLanguageCodeTajik = FOUR_CHAR_CODE ('tg '), kDVDLanguageCodeThai = FOUR_CHAR_CODE ('th '), kDVDLanguageCodeTigrinya = FOUR_CHAR_CODE ('ti '), kDVDLanguageCodeTurkmen = FOUR_CHAR_CODE ('tk '), kDVDLanguageCodeTagalog = FOUR_CHAR_CODE ('tl '), kDVDLanguageCodeSetswana = FOUR_CHAR_CODE ('tn '), kDVDLanguageCodeTonga = FOUR_CHAR_CODE ('to '), kDVDLanguageCodeTurkish = FOUR_CHAR_CODE ('tr '), kDVDLanguageCodeTsonga = FOUR_CHAR_CODE ('ts '), kDVDLanguageCodeTatar = FOUR_CHAR_CODE ('tt '), kDVDLanguageCodeTwi = FOUR_CHAR_CODE ('tw '), kDVDLanguageCodeUkranian = FOUR_CHAR_CODE ('uk '), kDVDLanguageCodeUrdu = FOUR_CHAR_CODE ('ur '), kDVDLanguageCodeUzbek = FOUR_CHAR_CODE ('uz '), kDVDLanguageCodeVietnamese = FOUR_CHAR_CODE ('vi '), kDVDLanguageCodeVolapuk = FOUR_CHAR_CODE ('vo '), kDVDLanguageCodeWolof = FOUR_CHAR_CODE ('wo '), kDVDLanguageCodeXhosa = FOUR_CHAR_CODE ('xh '), kDVDLanguageCodeYoruba = FOUR_CHAR_CODE ('yo '), kDVDLanguageCodeChinese = FOUR_CHAR_CODE ('zh '), kDVDLanguageCodeZulu = FOUR_CHAR_CODE ('zu ') }; typedef OSType DVDLanguageCode;

    Discussion

    These constants are used when calling the functions described in Accessing Language Codes. By convention, ISO 639 language codes are used to define these constants.

    Import Statement

    Availability

    Available in OS X version 10.3 and later.

  • Constants that specify the purpose of an audio channel.

    Declaration

    Objective-C

    enum { kDVDAudioExtensionCodeNotSpecified = 0, kDVDAudioExtensionCodeNormalCaptions = 1, kDVDAudioExtensionCodeNVisualImpaired = 2, kDVDAudioExtensionCodeDirectorsComment1 = 3, kDVDAudioExtensionCodeDirectorsComment2 = 4 }; typedef OSType DVDAudioExtensionCode;

    Constants

    • kDVDAudioExtensionCodeNotSpecified

      kDVDAudioExtensionCodeNotSpecified

      Audio extension not specified.

      Available in OS X v10.3 and later.

    • kDVDAudioExtensionCodeNormalCaptions

      kDVDAudioExtensionCodeNormalCaptions

      Audio channel for extended information about the title.

      Available in OS X v10.3 and later.

    • kDVDAudioExtensionCodeNVisualImpaired

      kDVDAudioExtensionCodeNVisualImpaired

      Audio channel for the visually impaired.

      Available in OS X v10.3 and later.

    • kDVDAudioExtensionCodeDirectorsComment1

      kDVDAudioExtensionCodeDirectorsComment1

      First audio channel for the artistic director’s comments.

      Available in OS X v10.3 and later.

    • kDVDAudioExtensionCodeDirectorsComment2

      kDVDAudioExtensionCodeDirectorsComment2

      Second audio channel for the artistic director’s comments.

      Available in OS X v10.3 and later.

    Discussion

    These constants are used along with a language code to specify the characteristics of an audio channel. See the audio-related functions described in Accessing Language Codes.

    Import Statement

    Availability

    Available in OS X v10.3 and later.

  • Constants that specify the purpose of a subpicture stream.

    Declaration

    Objective-C

    enum { kDVDSubpictureExtensionCodeNotSpecified = 0, kDVDSubpictureExtensionCodeCaptionNormalSize = 1, kDVDSubpictureExtensionCodeCaptionBiggerSize = 2, kDVDSubpictureExtensionCodeCaption4Children = 3, kDVDSubpictureExtensionCodeClosedCaptionNormalSize = 5, kDVDSubpictureExtensionCodeClosedCaptionBiggerSize = 6, kDVDSubpictureExtensionCodeClosedCaption4Children = 7, kDVDSubpictureExtensionCodeForcedCaption = 9, kDVDSubpictureExtensionDirectorsCommentNormalSize = 13, kDVDSubpictureExtensionDirectorsCommentBiggerSize = 14, kDVDSubpictureExtensionDirectorsComment4Children = 15 }; typedef OSType DVDSubpictureExtensionCode;

    Constants

    • kDVDSubpictureExtensionCodeNotSpecified

      kDVDSubpictureExtensionCodeNotSpecified

      Subpicture not specified.

      Available in OS X v10.3 and later.

    • kDVDSubpictureExtensionCodeCaptionNormalSize

      kDVDSubpictureExtensionCodeCaptionNormalSize

      A language-caption subpicture.

      Available in OS X v10.3 and later.

    • kDVDSubpictureExtensionCodeCaptionBiggerSize

      kDVDSubpictureExtensionCodeCaptionBiggerSize

      A large language-caption subpicture.

      Available in OS X v10.3 and later.

    • kDVDSubpictureExtensionCodeCaption4Children

      kDVDSubpictureExtensionCodeCaption4Children

      A language-caption subpicture for children.

      Available in OS X v10.3 and later.

    • kDVDSubpictureExtensionCodeClosedCaptionNormalSize

      kDVDSubpictureExtensionCodeClosedCaptionNormalSize

      A closed-caption subpicture.

      Available in OS X v10.3 and later.

    • kDVDSubpictureExtensionCodeClosedCaptionBiggerSize

      kDVDSubpictureExtensionCodeClosedCaptionBiggerSize

      A large closed-caption subpicture.

      Available in OS X v10.3 and later.

    • kDVDSubpictureExtensionCodeClosedCaption4Children

      kDVDSubpictureExtensionCodeClosedCaption4Children

      A closed-caption subpicture for children.

      Available in OS X v10.3 and later.

    • kDVDSubpictureExtensionCodeForcedCaption

      kDVDSubpictureExtensionCodeForcedCaption

      A subpicture which is always visible, regardless of the viewer’s preferences.

      Available in OS X v10.3 and later.

    • kDVDSubpictureExtensionDirectorsCommentNormalSize

      kDVDSubpictureExtensionDirectorsCommentNormalSize

      A normal subpicture for director’s comments.

      Available in OS X v10.3 and later.

    • kDVDSubpictureExtensionDirectorsCommentBiggerSize

      kDVDSubpictureExtensionDirectorsCommentBiggerSize

      A large subpicture for director’s comments.

      Available in OS X v10.3 and later.

    • kDVDSubpictureExtensionDirectorsComment4Children

      kDVDSubpictureExtensionDirectorsComment4Children

      A subpicture for director’s comments for children.

      Available in OS X v10.3 and later.

    Discussion

    These constants are used along with a language code to specify the characteristics of a subpicture. See the subpicture functions described in Accessing Language Codes.

    Import Statement

    Availability

    Available in OS X v10.3 and later.

  • Constants that specify marketing regions for DVD discs and playback devices.

    Declaration

    Objective-C

    enum { kDVDRegionCodeUninitialized = 0xff, kDVDRegionCode1 = 0xfe, kDVDRegionCode2 = 0xfd, kDVDRegionCode3 = 0xfb, kDVDRegionCode4 = 0xf7, kDVDRegionCode5 = 0xef, kDVDRegionCode6 = 0xdf, kDVDRegionCode7 = 0xbf, kDVDRegionCode8 = 0x7f }; typedef UInt32 DVDRegionCode;

    Constants

    • kDVDRegionCodeUninitialized

      kDVDRegionCodeUninitialized

      The default region code for an uninitialized DVD drive.

      Available in OS X v10.3 and later.

    • kDVDRegionCode1

      kDVDRegionCode1

      Region 1: North America.

      Available in OS X v10.3 and later.

    • kDVDRegionCode2

      kDVDRegionCode2

      Region 2: Japan, Europe, South Africa.

      Available in OS X v10.3 and later.

    • kDVDRegionCode3

      kDVDRegionCode3

      Region 3: Southeast Asia.

      Available in OS X v10.3 and later.

    • kDVDRegionCode4

      kDVDRegionCode4

      Region 4: Australia, New Zealand, Central & South America.

      Available in OS X v10.3 and later.

    • kDVDRegionCode5

      kDVDRegionCode5

      Region 5: Northwest Asia and North Africa.

      Available in OS X v10.3 and later.

    • kDVDRegionCode6

      kDVDRegionCode6

      Region 6: China.

      Available in OS X v10.3 and later.

    • kDVDRegionCode7

      kDVDRegionCode7

      Region 7: Unassigned.

      Available in OS X v10.3 and later.

    • kDVDRegionCode8

      kDVDRegionCode8

      Region 8: Special venues (airplanes, hotels, cruise ships).

      Available in OS X v10.3 and later.

    Discussion

    A DVD Playback region code is a bitfield in which a zero in bit n is used to specify region n. The bits are numbered from right to left, and only the least significant 8 bits are used. For example, the region code 11101111 or 0xef specifies region 5. A region code can also specify more than one region; the region code 11110110 or 0xf6, for example, specifies regions 1 and 4.

    Most DVD drives are designed to play only those discs that are authorized for use in a specific region. Region codes are used to:

    Import Statement

    Availability

    Available in OS X v10.3 and later.

  • Constants that specify playback domains or modes that define a set of possible actions.

    Declaration

    Objective-C

    enum { kDVDFPDomain = 0, kDVDVMGMDomain = 1, kDVDVTSMDomain = 2, kDVDTTDomain = 3, kDVDSTOPDomain = 4, kDVDAMGMDomain = 5, kDVDTTGRDomain = 6 }; typedef UInt32 DVDDomainCode;

    Constants

    • kDVDFPDomain

      kDVDFPDomain

      First Play domain.

      Available in OS X v10.3 and later.

    • kDVDVMGMDomain

      kDVDVMGMDomain

      Video Manager Menu domain.

      Available in OS X v10.3 and later.

    • kDVDVTSMDomain

      kDVDVTSMDomain

      Video Title Set Menu domain.

      Available in OS X v10.3 and later.

    • kDVDTTDomain

      kDVDTTDomain

      Title domain.

      Available in OS X v10.3 and later.

    • kDVDSTOPDomain

      kDVDSTOPDomain

      Stop State domain.

      Available in OS X v10.3 and later.

    • kDVDAMGMDomain

      kDVDAMGMDomain

      Audio Manager Menu domain (DVD-Audio only, not used).

      Available in OS X v10.3 and later.

    • kDVDTTGRDomain

      kDVDTTGRDomain

      Title Group domain (DVD-Audio only, not used).

      Available in OS X v10.3 and later.

    Discussion

    These constants are used to specify the new domain when handling the kDVDEventDomain event. See Event Codes.

    Import Statement

    Availability

    Available in OS X v10.3 and later.

  • Constants that specify user operations (UOP) which are currently disabled.

    Declaration

    Objective-C

    enum { kDVDUOPTimePlaySearch = 0x00000001, kDVDUOPPTTPlaySearch = 0x00000002, kDVDUOPTitlePlay = 0x00000004, kDVDUOPStop = 0x00000008, kDVDUOPGoUp = 0x00000010, kDVDUOPTimePTTSearch = 0x00000020, kDVDUOPPrevTopPGSearch = 0x00000040, kDVDUOPNextPGSearch = 0x00000080, kDVDUOPForwardScan = 0x00000100, kDVDUOPBackwardScan = 0x00000200, kDVDUOPMenuCallTitle = 0x00000400, kDVDUOPMenuCallRoot = 0x00000800, kDVDUOPMenuCallSubPicture = 0x00001000, kDVDUOPMenuCallAudio = 0x00002000, kDVDUOPMenuCallAngle = 0x00004000, kDVDUOPMenuCallPTT = 0x00008000, kDVDUOPResume = 0x00010000, kDVDUOPButton = 0x00020000, kDVDUOPStillOff = 0x00040000, kDVDUOPPauseOn = 0x00080000, kDVDUOPAudioStreamChange = 0x00100000, kDVDUOPSubPictureStreamChange = 0x00200000, kDVDUOPAngleChange = 0x00400000, kDVDUOPKaraokeModeChange = 0x00800000, kDVDUOPVideoModeChange = 0x01000000, kDVDUOPScanOff = 0x02000000, kDVDUOPPauseOff = 0x04000000 }; typedef UInt32 DVDUOPCode;

    Constants

    • kDVDUOPTimePlaySearch

      kDVDUOPTimePlaySearch

      The function DVDSetTime is disabled.

      Available in OS X v10.3 and later.

    • kDVDUOPPTTPlaySearch

      kDVDUOPPTTPlaySearch

      The function DVDSetTime is disabled.

      Available in OS X v10.3 and later.

    • kDVDUOPTitlePlay

      kDVDUOPTitlePlay

      The functions DVDReturnToTitle, DVDSetTitle, and DVDSetChapter are disabled.

      Available in OS X v10.3 and later.

    • kDVDUOPStop

      kDVDUOPStop

      The function DVDStop is disabled.

      Available in OS X v10.3 and later.

    • kDVDUOPGoUp

      kDVDUOPGoUp

      The function DVDGoBackOneLevel is disabled.

      Available in OS X v10.3 and later.

    • kDVDUOPTimePTTSearch

      kDVDUOPTimePTTSearch

      The function DVDSetChapter is disabled.

      Available in OS X v10.3 and later.

    • kDVDUOPPrevTopPGSearch

      kDVDUOPPrevTopPGSearch

      The function DVDPreviousChapter is disabled.

      Available in OS X v10.3 and later.

    • kDVDUOPNextPGSearch

      kDVDUOPNextPGSearch

      The function DVDNextChapter is disabled.

      Available in OS X v10.3 and later.

    • kDVDUOPForwardScan

      kDVDUOPForwardScan

      The function DVDScan in the forward direction is disabled.

      Available in OS X v10.3 and later.

    • kDVDUOPBackwardScan

      kDVDUOPBackwardScan

      The function DVDScan in the backward direction is disabled.

      Available in OS X v10.3 and later.

    • kDVDUOPMenuCallTitle

      kDVDUOPMenuCallTitle

      The function DVDGoToMenu for a title menu is disabled.

      Available in OS X v10.3 and later.

    • kDVDUOPMenuCallRoot

      kDVDUOPMenuCallRoot

      The function DVDGoToMenu for a root menu is disabled.

      Available in OS X v10.3 and later.

    • kDVDUOPMenuCallSubPicture

      kDVDUOPMenuCallSubPicture

      The function DVDGoToMenu for a subpicture menu is disabled.

      Available in OS X v10.3 and later.

    • kDVDUOPMenuCallAudio

      kDVDUOPMenuCallAudio

      The function DVDGoToMenu for an audio menu is disabled.

      Available in OS X v10.3 and later.

    • kDVDUOPMenuCallAngle

      kDVDUOPMenuCallAngle

      The function DVDGoToMenu for an angle menu is disabled.

      Available in OS X v10.3 and later.

    • kDVDUOPMenuCallPTT

      kDVDUOPMenuCallPTT

      The function DVDGoToMenu for a chapter menu is disabled.

      Available in OS X v10.3 and later.

    • kDVDUOPResume

      kDVDUOPResume

      Not used.

      Available in OS X v10.3 and later.

    • kDVDUOPButton

      kDVDUOPButton

      The functions DVDDoMenuClick, DVDDoMenuMouseOver, and DVDDoUserNavigation are disabled.

      Available in OS X v10.3 and later.

    • kDVDUOPStillOff

      kDVDUOPStillOff

      Not used.

      Available in OS X v10.3 and later.

    • kDVDUOPPauseOn

      kDVDUOPPauseOn

      The function DVDPause is disabled.

      Available in OS X v10.3 and later.

    • kDVDUOPAudioStreamChange

      kDVDUOPAudioStreamChange

      The function DVDSetAudioStream is disabled.

      Available in OS X v10.3 and later.

    • kDVDUOPAngleChange

      kDVDUOPAngleChange

      The function DVDSetAngle is disabled.

      Available in OS X v10.3 and later.

    • kDVDUOPKaraokeModeChange

      kDVDUOPKaraokeModeChange

      Not used.

      Available in OS X v10.3 and later.

    • kDVDUOPVideoModeChange

      kDVDUOPVideoModeChange

      Not used.

      Available in OS X v10.3 and later.

    • kDVDUOPScanOff

      kDVDUOPScanOff

      Not used.

      Available in OS X v10.3 and later.

    • kDVDUOPPauseOff

      kDVDUOPPauseOff

      The function DVDResume is disabled.

      Available in OS X v10.3 and later.

    Discussion

    These constants are used to specify one or more disabled user operations in the mask passed as the first value parameter in the kDVDEventValidUOP event. See Event Codes.

    Import Statement

    Availability

    Available in OS X v10.3 and later.

  • Constants that specify events for which applications can register to get notified.

    Declaration

    Objective-C

    enum { kDVDEventTitle = 1, kDVDEventPTT = 2, kDVDEventValidUOP = 3, kDVDEventAngle = 4, kDVDEventAudioStream = 5, kDVDEventSubpictureStream = 6, kDVDEventDisplayMode = 7, kDVDEventDomain = 8, kDVDEventBitrate = 9, kDVDEventStill = 10, kDVDEventPlayback = 11, kDVDEventVideoStandard = 12, kDVDEventStreams = 13, kDVDEventScanSpeed = 14, kDVDEventMenuCalled = 15, kDVDEventParental = 16, kDVDEventPGC = 17, kDVDEventGPRM = 18, kDVDEventRegionMismatch = 19, kDVDEventTitleTime = 20, kDVDEventSubpictureStreamNumbers = 21, kDVDEventAudioStreamNumbers = 22, kDVDEventAngleNumbers = 23, kDVDEventError = 24, kDVDEventCCInfo = 25, kDVDEventChapterTime = 26 }; typedef UInt32 DVDEventCode;

    Discussion

    Table 1 lists the constants you use to register a callback function as an event handler for one or more DVD playback events. To learn how to register an event handler, see the function DVDRegisterEventCallBack.

    Unlike Carbon events, you do not need to call a function to retrieve the data associated with a playback event. When your event callback is invoked, the associated data is contained in one or both event value parameters. For more information, see DVDEventCallBackFunctionPtr.

    Table 1DVD Playback events

    Event ID

    Event description

    Event value 1

    Event value 2

    kDVDEventTitle

    Title has changed.

    Title ID

    -

    kDVDEventPTT

    Chapter has changed.

    Chapter ID

    -

    kDVDEventValidUOP

    User operations that are disabled.

    DVDUOPCode

    -

    kDVDEventAngle

    Camera angle has changed.

    Stream ID

    -

    kDVDEventAudioStream

    Audio stream has changed.

    Stream ID

    -

    kDVDEventSubpictureStream

    Subpicture has changed.

    Stream ID

    isVisible

    kDVDEventDisplayMode

    Display mode has changed.

    DVDAspectRatio

    -

    kDVDEventDomain

    Domain has changed.

    DVDDomainCode

    -

    kDVDEventBitrate

    Bit rate has changed.

    Bits per second

    -

    kDVDEventStill

    Still picture on or off.

    On (1) - Off (0)

    -

    kDVDEventPlayback

    Playback state has changed.

    DVDState

    -

    kDVDEventVideoStandard

    Video format has changed

    DVDFormat

    -

    kDVDEventStreams

    Stream has changed (audio, subpicture, or angle).

    -

    -

    kDVDEventScanSpeed

    Scan rate has changed.

    Speed (1x, 2x, 3x, and so on)

    -

    kDVDEventMenuCalled

    Menu has changed.

    DVDMenu

    -

    kDVDEventParental

    Parental level has changed.

    Level number

    -

    kDVDEventPGC

    Program chain has changed.

    PGC number

    -

    kDVDEventGPRM

    GPRM data has changed.

    GPRM index

    Data

    kDVDEventRegionMismatch

    Region mismatch between disc and playback device.

    Disc region

    -

    kDVDEventTitleTime

    Title time has changed.

    Elapsed time in milliseconds

    Duration in milliseconds

    kDVDEventSubpictureStreamNumbers

    The number of subpicture streams has changed.

    The number of subpicture streams in title

    -

    kDVDEventAudioStreamNumbers

    The number of audio streams has changed.

    The number of audio streams in title

    -

    kDVDEventAngleNumbers

    The number of angles has changed.

    The number of angles in title

    -

    kDVDEventError

    Hardware error.

    DVDErrorCode

    -

    kDVDEventCCInfo

    Closed caption has changed.

    Opcode

    Data

    kDVDEventChapterTime

    Chapter time has changed.

    Elapsed time in milliseconds

    Duration in milliseconds

    Import Statement

    Availability

    Available in OS X version 10.3 and later.

Result Codes

The table below lists the result codes defined for DVD Playback.

  • Unspecified error.

    Value

    -70001

    Description

    Unspecified error.

    Available in OS X v10.3 and later.

  • An error occurred while initializing a DVD-Video playback session. DVD Playback Services is probably being used in another process.

    Value

    -70002

    Description

    An error occurred while initializing a DVD-Video playback session. DVD Playback Services is probably being used in another process.

    Available in OS X v10.3 and later.

  • A DVD-Video playback session has not been initialized. Any function except DVDInitialize could return this value.

    Value

    -70003

    Description

    A DVD-Video playback session has not been initialized. Any function except DVDInitialize could return this value.

    Available in OS X v10.3 and later.

  • The operation is not permitted while DVD-Video media is playing.

    Value

    -70004

    Description

    The operation is not permitted while DVD-Video media is playing.

    Available in OS X v10.3 and later.

  • A graphics port for DVD-Video playback has not been set.

    Value

    -70005

    Description

    A graphics port for DVD-Video playback has not been set.

    Available in OS X v10.3 and later.

  • See kDVDErrorNotAllowedDuringPlayback.

    Value

    -70006

    Description

    See kDVDErrorNotAllowedDuringPlayback.

    Available in OS X v10.3 and later.

  • No callback has been registered to handle unrecoverable errors during playback.

    Value

    -70007

    Description

    No callback has been registered to handle unrecoverable errors during playback.

    Available in OS X v10.3 and later.

  • DVDSleep was called twice without an intervening call to DVDWakeUp.

    Value

    -70008

    Description

    DVDSleep was called twice without an intervening call to DVDWakeUp.

    Available in OS X v10.3 and later.

  • DVDWakeUp was called without first calling DVDSleep.

    Value

    -70009

    Description

    DVDWakeUp was called without first calling DVDSleep.

    Available in OS X v10.3 and later.

  • The time code is outside the valid range for the current title.

    Value

    -70010

    Description

    The time code is outside the valid range for the current title.

    Available in OS X v10.3 and later.

  • The operation is not permitted at this time.

    Value

    -70011

    Description

    The operation is not permitted at this time.

    Available in OS X v10.3 and later.

  • A DVD drive is not available.

    Value

    -70012

    Description

    A DVD drive is not available.

    Available in OS X v10.3 and later.

  • The current system configuration does not support DVD-Video playback.

    Value

    -70013

    Description

    The current system configuration does not support DVD-Video playback.

    Available in OS X v10.3 and later.

  • DVD Playback Services does not support this operation.

    Value

    -70014

    Description

    DVD Playback Services does not support this operation.

    Available in OS X v10.3 and later.

  • A VIDEO_TS media folder is not open for playback.

    Value

    -70015

    Description

    A VIDEO_TS media folder is not open for playback.

    Available in OS X v10.3 and later.

  • An argument is invalid.

    Value

    -70016

    Description

    An argument is invalid.

    Available in OS X v10.3 and later.

  • A graphics device is not available.

    Value

    -70017

    Description

    A graphics device is not available.

    Available in OS X v10.3 and later.

  • A graphics device error was encountered.

    Value

    -70018

    Description

    A graphics device error was encountered.

    Available in OS X v10.3 and later.

  • A VIDEO_TS media folder is already open for playback.

    Value

    -70019

    Description

    A VIDEO_TS media folder is already open for playback.

    Available in OS X v10.3 and later.

  • Region code is not valid.

    Value

    -70020

    Description

    Region code is not valid.

    Available in OS X v10.3 and later.

  • Not used.

    Value

    -70021

    Description

    Not used.

    Available in OS X v10.3 and later.

  • DVD-Video disc region code does not match the region code currently assigned to the DVD drive.

    Value

    -70022

    Description

    DVD-Video disc region code does not match the region code currently assigned to the DVD drive.

    Available in OS X v10.3 and later.

  • Changing the region code assigned to the DVD drive is no longer permitted.

    Value

    -70023

    Description

    Changing the region code assigned to the DVD drive is no longer permitted.

    Available in OS X v10.3 and later.

  • No region code has been assigned to the DVD drive.

    Value

    -70024

    Description

    No region code has been assigned to the DVD drive.

    Available in OS X v10.3 and later.

  • An attempt to change the DVD drive region code could not be authenticated.

    Value

    -70025

    Description

    An attempt to change the DVD drive region code could not be authenticated.

    Available in OS X v10.3 and later.

  • The video driver does not have enough video memory available for playback.

    Value

    -70026

    Description

    The video driver does not have enough video memory available for playback.

    Available in OS X v10.3 and later.

  • An appropriate audio output device could not be found.

    Value

    -70027

    Description

    An appropriate audio output device could not be found.

    Available in OS X v10.3 and later.

  • A system error occurred.

    Value

    -70028

    Description

    A system error occurred.

    Available in OS X v10.3 and later.

  • The user has made a selection not supported in the current menu.

    Value

    -70029

    Description

    The user has made a selection not supported in the current menu.

    Available in OS X v10.3 and later.