Nav_CDDA.h
上传用户:super_houu
上传日期:2008-09-21
资源大小:4099k
文件大小:4k
源码类别:

DVD

开发平台:

Others

  1. /****************************************************************************************
  2.  *  Copyright (c) 2002 ZORAN Corporation, All Rights Reserved
  3.  *  THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF ZORAN CORPORATION
  4.  *
  5.  *  File: $Workfile: Nav_CDDA.h $             
  6.  *
  7.  * Description: 
  8.  * ============
  9.  * 
  10.  * 
  11.  * Log:
  12.  * ====
  13.  * $Revision: 11 $
  14.  * Last Modified by $Author: Johnk $ at $Modtime: 4/01/04 9:56p $ 
  15.  ****************************************************************************************
  16.  * Updates:
  17.  ****************************************************************************************
  18.  * $Log: /I76/I76_Common/I76_Reference/Playcore/Nav_CDDA/Nav_CDDA.h $
  19.  * 
  20.  * 11    4/01/04 10:49p Johnk
  21.  * support HW POWER_ON_RESUME for S1 spec
  22.  * 
  23.  * 10    03-05-27 22:42 Fwang
  24.  * clean code.
  25.  * 
  26.  * 9     03-01-09 4:38 Leslie
  27.  * CDDA Intro playback supported
  28.  * 
  29.  * 10    6/23/02 18:29 Rinata
  30.  * add CDDA_IsCDDTS
  31.  * 
  32.  * 9     3/06/02 11:41 Nirm
  33.  * - Eliminated multiple definition of CDDA_MAX_BOOKMARKS.
  34.  * 
  35.  * 8     7/05/02 16:41 Ettim
  36.  * Added PowerOnResume playback support.
  37.  * 
  38.  * 7     23/04/02 9:31 Nirm
  39.  * - Added dependency in "Config.h".
  40.  * 
  41.  * 6     4/02/02 10:49 Nirm
  42.  * Removal of compilation-warnings.
  43.  * 
  44.  * 5     1/13/02 18:18 Ettim
  45.  * 
  46.  * 4     9/01/02 15:43 Nirm
  47.  * Corrected Include-Paths.
  48.  ****************************************************************************************/
  49. #include "Config.h" // Global Configuration - do not remove!
  50. #ifndef NAV_CDDA_H_
  51. #define NAV_CDDA_H_
  52. #include "PlaycoreCoremaincoremain.h"
  53. #include "eeprom.h"
  54. #define CDDA_TICKS_PER_SECOND 5
  55. #define CDDA_BLOCKS_PER_SEC 75L
  56. #define CDDA_PB_HANGUP_TIMEOUT (CDDA_TICKS_PER_SECOND * 5) // Playback-Hangup tolerance (in Ticks)
  57. #define CDDA_POSITION_TOLERANCE ((3 * CDDA_BLOCKS_PER_SEC) / 4)
  58. #define CDDA_MAX_PROGRAM_SIZE 99
  59. //<<<ZORAN LX012102
  60. #define CDDA_LeadOut_Info_ADDR CDDARsmInfo_ADDR
  61. #define PonCDDA      (CDDA_LeadOut_Info_ADDR + sizeof(WORD))
  62. //ZORAN LX011702>>>
  63. typedef enum { ePause, eStopResume, eFullStop } enCDDA_StopType;
  64. typedef enum { eMarkerA, eMarkerB, eResumePlayback, eBookmark } enCDDA_MarkerType;
  65. typedef enum { eEndOfItem, ePositionA, ePositionB } enCDDA_RendezvousType;
  66. /////////////////////////////////////////////////////////////////////////////////////////////////
  67. // Public Services - Prototype declaration
  68. int CDDA_Navigator(HDLR_OP op, EVENT evt, void *param);
  69. static void Constructor(void);
  70. static void Destructor(void);
  71. static void SetMarker(enCDDA_MarkerType eMarkerType, WORD uBookmarkNumber);
  72. static void ClearMarker(enCDDA_MarkerType eMarkerType, WORD uBookmarkNumber);
  73. static BOOL InvokePlayback(void);
  74. static DWORD CalculateRecoveryAddress(DWORD dwErrorAddress, BOOL bForeward);
  75. static void PerformErrorRecovery(void);
  76. static void ScanTrack(WORD uTrackNumber);
  77. static void CancelRepeatModes(BYTE uModesMask);
  78. // Event Handlers
  79. static void OnTick(void);
  80. static void OnPlay(void);
  81. static void OnPlaybackFinished(void);
  82. static void OnStop(enCDDA_StopType eType);
  83. static void OnRendezvousPoint(enCDDA_RendezvousType eType);
  84. static void OnModeChange(void);
  85. static void OnSetMarkerA(void);
  86. static void OnSetMarkerB(void);
  87. static void OnCancelABRepeat(void);
  88. static void OnGoToBookmark(WORD uBookmarkNumber);
  89. static void OnScan(int iSpeed);
  90. static void OnNextItem(void);
  91. static void OnPreviousItem(void);
  92. static void OnNumericSelection(ULONG uSelection);
  93. static void OnGotoTime(ULONG ulTime);
  94. static void OnGotoDiscTime(ULONG ulTime);
  95. static void OnArtificialSoundsSelection(BYTE mode);
  96. BOOL CDDA_IsCDDTS(void);
  97. void OnIntro(void);
  98. #ifdef EXINO2  // ZKR JK0331 : for power_on_resume in EEPROM
  99. #ifdef HW_POWER_ON_RESUME
  100. static WORD GetResumeLeadOutInfo(void);
  101. static void SetResumeLeadOutInfo(void);
  102. void ClearResumeLeadOutInfo(void);
  103. void save_CDDA_info(void);
  104. void restore_CDDA_info(void);
  105. #endif
  106. #endif //EXINO2
  107. static void OnStatusReport(void);
  108. #endif //NAV_CDDA_H_