Nav_CDDA.h
上传用户:super_houu
上传日期:2008-09-21
资源大小:4099k
文件大小:4k
- /****************************************************************************************
- * Copyright (c) 2002 ZORAN Corporation, All Rights Reserved
- * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF ZORAN CORPORATION
- *
- * File: $Workfile: Nav_CDDA.h $
- *
- * Description:
- * ============
- *
- *
- * Log:
- * ====
- * $Revision: 11 $
- * Last Modified by $Author: Johnk $ at $Modtime: 4/01/04 9:56p $
- ****************************************************************************************
- * Updates:
- ****************************************************************************************
- * $Log: /I76/I76_Common/I76_Reference/Playcore/Nav_CDDA/Nav_CDDA.h $
- *
- * 11 4/01/04 10:49p Johnk
- * support HW POWER_ON_RESUME for S1 spec
- *
- * 10 03-05-27 22:42 Fwang
- * clean code.
- *
- * 9 03-01-09 4:38 Leslie
- * CDDA Intro playback supported
- *
- * 10 6/23/02 18:29 Rinata
- * add CDDA_IsCDDTS
- *
- * 9 3/06/02 11:41 Nirm
- * - Eliminated multiple definition of CDDA_MAX_BOOKMARKS.
- *
- * 8 7/05/02 16:41 Ettim
- * Added PowerOnResume playback support.
- *
- * 7 23/04/02 9:31 Nirm
- * - Added dependency in "Config.h".
- *
- * 6 4/02/02 10:49 Nirm
- * Removal of compilation-warnings.
- *
- * 5 1/13/02 18:18 Ettim
- *
- * 4 9/01/02 15:43 Nirm
- * Corrected Include-Paths.
- ****************************************************************************************/
- #include "Config.h" // Global Configuration - do not remove!
- #ifndef NAV_CDDA_H_
- #define NAV_CDDA_H_
- #include "PlaycoreCoremaincoremain.h"
- #include "eeprom.h"
- #define CDDA_TICKS_PER_SECOND 5
- #define CDDA_BLOCKS_PER_SEC 75L
- #define CDDA_PB_HANGUP_TIMEOUT (CDDA_TICKS_PER_SECOND * 5) // Playback-Hangup tolerance (in Ticks)
- #define CDDA_POSITION_TOLERANCE ((3 * CDDA_BLOCKS_PER_SEC) / 4)
- #define CDDA_MAX_PROGRAM_SIZE 99
- //<<<ZORAN LX012102
- #define CDDA_LeadOut_Info_ADDR CDDARsmInfo_ADDR
- #define PonCDDA (CDDA_LeadOut_Info_ADDR + sizeof(WORD))
- //ZORAN LX011702>>>
- typedef enum { ePause, eStopResume, eFullStop } enCDDA_StopType;
- typedef enum { eMarkerA, eMarkerB, eResumePlayback, eBookmark } enCDDA_MarkerType;
- typedef enum { eEndOfItem, ePositionA, ePositionB } enCDDA_RendezvousType;
- /////////////////////////////////////////////////////////////////////////////////////////////////
- // Public Services - Prototype declaration
- int CDDA_Navigator(HDLR_OP op, EVENT evt, void *param);
- static void Constructor(void);
- static void Destructor(void);
- static void SetMarker(enCDDA_MarkerType eMarkerType, WORD uBookmarkNumber);
- static void ClearMarker(enCDDA_MarkerType eMarkerType, WORD uBookmarkNumber);
- static BOOL InvokePlayback(void);
- static DWORD CalculateRecoveryAddress(DWORD dwErrorAddress, BOOL bForeward);
- static void PerformErrorRecovery(void);
- static void ScanTrack(WORD uTrackNumber);
- static void CancelRepeatModes(BYTE uModesMask);
- // Event Handlers
- static void OnTick(void);
- static void OnPlay(void);
- static void OnPlaybackFinished(void);
- static void OnStop(enCDDA_StopType eType);
- static void OnRendezvousPoint(enCDDA_RendezvousType eType);
- static void OnModeChange(void);
- static void OnSetMarkerA(void);
- static void OnSetMarkerB(void);
- static void OnCancelABRepeat(void);
- static void OnGoToBookmark(WORD uBookmarkNumber);
- static void OnScan(int iSpeed);
- static void OnNextItem(void);
- static void OnPreviousItem(void);
- static void OnNumericSelection(ULONG uSelection);
- static void OnGotoTime(ULONG ulTime);
- static void OnGotoDiscTime(ULONG ulTime);
- static void OnArtificialSoundsSelection(BYTE mode);
- BOOL CDDA_IsCDDTS(void);
- void OnIntro(void);
- #ifdef EXINO2 // ZKR JK0331 : for power_on_resume in EEPROM
- #ifdef HW_POWER_ON_RESUME
- static WORD GetResumeLeadOutInfo(void);
- static void SetResumeLeadOutInfo(void);
- void ClearResumeLeadOutInfo(void);
- void save_CDDA_info(void);
- void restore_CDDA_info(void);
- #endif
- #endif //EXINO2
- static void OnStatusReport(void);
- #endif //NAV_CDDA_H_