?? dvdcallback.h.svn-base
字號:
/***************************************** Copyright (c) 2001-2003 Sigma Designs, Inc. All Rights Reserved Proprietary and Confidential *****************************************//** @file dvdcallback.h @brief Callbacks invoked by the navigation core in case of events. @author Mathieu Lacage, Michael Ignaszewski @date 2002-01-22*/#ifndef __DVDCALLBACK_H__#define __DVDCALLBACK_H__/** None of the callback defined below is allowed to call the navigation core's schedule functions.*//****************************************************************** DVD _required_ interfaces with the outside world. ******************************************************************//** This callback type is used to notify the user about different simple events. @remark this callback is invoked at the exact moment the associated Video data is being displayed by the decoder. */typedef void (*RMdvdCallbackPlaybackEvent) (void *userData);/** This callback is invoked whenever the navigation core has decided that a given block is to be presented. Namely, it must be de-multiplexed and sent to the hardware. This callback will be invoked only on VOBU blocks. @param sectorOffset the offset from the start of the VOBU in sector units to the data to be read by the callback. @param sectorsToRead The number of sectors to read starting at logicalSectorNumberStart+sectorOffset. @param sectorsRead the number of sectors read. @param userData application context. returns RM_ERROR_NOT_FINISHED if it could not complete presentation of this data, RM_ERROR_INVALID_SECTORS if one of the requested sectors cannot be read from the DVD drive. If so, sectorsRead contains the number of the sector which could be read. @remarks This callback is called during the RMdvdSchedulePresentation function.*/typedef RMstatus (*RMdvdCallbackPresentLogicalSector) (RMuint32 sectorOffset, RMuint8 sectorsToRead, RMuint8 *const sectorsRead, RMuint32 cellNumber, RMuint32 accessRestricted, void *const userData);/** This callback is invoked whenever the navigation core knows there is a data discontinuity in the data stream the next time RMdvdCallbackPresentLogicalBlock is called. The application must flush all the data before the next data transfer. @param userData application context. @remarks This callback is called during the RMdvdSchedulePresentation function and the DVD Navigation functions.*/typedef RMstatus (*RMdvdCallbackDataFlushDiscontinuity) (void *userData);/** This callback is invoked whenever the navigation core knows there is a time discontinuity in the data stream the next time RMdvdCallbackPresentLogicalBlock is called. @param deltaPTS Delta PTS to apply to the stream. NewStreamPTS = OldStreamPTS + deltaPTS. Audio, Video and Subpicure PTS have to be restamped, as well as the highlight presentation stamps. @param userData application context. @remarks This callback is called during the RMdvdSchedulePresentation function and the DVD Navigation functions.*/typedef RMstatus (*RMdvdCallbackDataPTSDiscontinuity) (RMint64 deltaPTS, void *userData);/** This callback returns a decoder clock. The time unit is in units of 90KHz. @param clock pointer to the return value of clock. @param userData application context. */typedef RMstatus (*RMdvdCallbackDecoderPresentationTime) (RMuint64 *clock, void *userData);/** This callback is invoked whenever the navigation core knows the title has been changed and authentication is needed. @param logicalSectorNumber The logical block number relative from the start of the VMGI (video_ts/video_ts.ifo) to authenticate. @param userData application context. @remarks This callback is called during the RMdvdSchedulePresentation function and the DVD Navigation functions. This callback is called after RMdvdCallbackDataDiscontinuity has been called. Applications are expected to handle CGMS support in this callback too.*/typedef RMstatus (*RMdvdCallbackAuthenticate) (RMuint32 logicalSectorNumber, void *userData);/** This callback is invoked whenever the navigation core needs to read sectors to parse the IFOs files or to read navigation sectors in the data stream. @param logicalBlockNumberStart The logical block number relative from the start of the VMGI (video_ts/video_ts.ifo) to read from. @param sectorsToRead The number of sectors to read. @param ppSector a pointer to a buffer of size 2048 * sectorsToRead. @param userData application context. @returns RM_OK or RM_ERROR_INVALID_SECTORS. _Must Not_ return RM_ERROR_NOT_FINISHED. @remarks This callback is called during RMdvdNew, RMdvdSchedulePresentation. */typedef RMstatus (*RMdvdCallbackReadIFOSectors) (RMuint32 logicalSectorNumberStart, RMuint8 sectorsToRead, RMuint8 *const ppSector, void *const userData);/** This callback is invoked in the Init function. The navigation is currently building its backup table. It is asking the application to try to recover the first sector of the VTSI_MAT table of VTSN vtsn. @param VTSN VTSN of VTSI_MAT to recover. @param ppSector a pointer to a buffer of size 2048. @param userDara application context. @remark This function should be implemented with a read of the first 2048 bytes of the file "video_ts/vts_X_0.bup" where X is VTSN. */typedef RMstatus (*RMdvdCallbackBackupVTSIFirstSector) (RMuint8 VTSN, RMuint8 *const ppSector, void *const userData);/** This callback is invoked in the Init function. The navigation is currently building its backup table. It is asking the application to try to recover the first sector of the VTSI_MAT table of VTSN vtsn. @param VTSN VTSN of VTSI_MAT to recover. @param ppSector a pointer to a buffer of size 2048. @param userDara application context. @remark This function should be implemented with a read of the first 2048 bytes of the file "video_ts/video_ts.bup"*/typedef RMstatus (*RMdvdCallbackBackupVMGIFirstSector) (RMuint8 *const ppSector, void *const userData);/** This callback is invoked to update the highlight to display on screen. @param leftb @param topb @param rightb @param bottomb @param wColor @param wContrast @param userData application context.*/typedef RMstatus (*RMdvdCallbackSubpictureHilight) (RMuint16 leftb, RMuint16 topb, RMuint16 rightb, RMuint16 bottomb, RMuint32 wColor, RMuint32 wContrast, void *userData);/** This callback is invoked whenever the navigation core knows the subpicture palette has changed. @param pSubpicturePalette Pointer to the subpicture palette. This palette contains 16 elements. Each Element is coded on 32 bits with: | 31 24 | 23 16 | 15 8 | 7 0 | | Reserved | Y | U | V | @param userData application context.*/typedef RMstatus (*RMdvdCallbackSubpicturePalette) (RMuint8 sppal[16*4], void *userData);/** This callback is invoked whenever the highlight specified by the above callback must be displayed or turned off. @param on TRUE : turn highlight on. FALSE turn it off. */typedef RMstatus (*RMdvdCallbackSubpictureHighlightOn) (RMbool on, void *userData);/********************************************************* * The callbacks below must be Synchronous _and_ * Asynchronous.. That is, they should return emediatly * _But_ they should not be executed unless the Data with * PTS smaller than the PTS has been played. **********************************************************//** This callback is invoked whenever the subpicture has to be displayed and composed with the video. @param compositionOn If TRUE, the composition happens and the subpicture is displayed, if FALSE, the subpicture stream, if it exists is decoded but not composed and displayed. @param userData application context.*/typedef RMstatus (*RMdvdCallbackSubpictureCompositionOn) (RMuint32 PTS, RMbool compositionOn, void *userData);/** This callback indicates the macrovision level of the next VOBU. @param macrovisionLevel Macrovision Level. @param userData application context.*/typedef RMstatus (*RMdvdCallbackMacrovisionLevel) (RMuint32 PTS, RMdvdMacrovisionLevel macrovisionLevel, void *userData);/** This callback indicates the current aspect ratio and video mode. The video mode given here is based on the user's input in RMdvd_Video_Mode_Change and on the video stream's aspect ratio and allowed display modes. @param videoMode Aspect ratio and video mode. @param userData application context.*/typedef RMstatus (*RMdvdCallbackVideoMode) (RMuint32 PTS, RMdvdVideoMode videoMode, void *userData);/** This callback indicates the current audio and sub-picture decoding stream number. @param decodingASTN decoding audio stream number. 0 <= ASTN <= 7. If 0xff, it is disabled. @param type audio type associated with decoding audio stream. @param frequency audio frequency associated with decoding audio stream. @param numberOfChannels audio channels associated with decoding audio stream. @param decodingSPSTN decoding sub-picture stream number. 0 <= SPSTN <= 31. If 0xff or 63, it is disabled. @param userData application context. */typedef RMstatus (*RMdvdCallbackSTN) (RMuint32 PTS, RMuint8 decodingASTN, RMdvdAudioType type, RMdvdAudioFrequency frequency,
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -