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

DVD

开发平台:

Others

  1. /* **************************************************************************************
  2.  *  Copyright (c) 2001 ZORAN Corporation, All Rights Reserved
  3.  *  THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF ZORAN CORPORATION
  4.  *
  5.  *  File: "NVM_BMK.h"                                            05/27/03
  6.  *
  7.  * Description:
  8.  * ============
  9.  * NVM Bookmark 
  10.  * 
  11.  * Log:
  12.  * ====
  13.  * $Revision: 4 $
  14.  * Last Modified by $Author: Fwang $ at $Modtime: 03-06-17 14:28 $ 
  15.  ****************************************************************************************
  16.  * Updates:
  17.  ****************************************************************************************
  18.  * $Log: /SourceCode/I64_Common/I64_Reference/Playcore/Coremain/NVM_BMK.h $
  19.  * 
  20.  * 4     03-06-17 14:59 Fwang
  21.  * Add API -- NVM_BMK_Flush(). Optimize API parameters.
  22.  * 
  23.  * 3     03-06-02 18:24 Fwang
  24.  * Add API function for get available setting slot.
  25.  * Optimize verifier.
  26.  * 
  27.  * 2     03-05-28 11:18 Fwang
  28.  * Add NVM_BMK_Get() to get bookmark
  29.  * Support specified postion in NVM_BMK_SET()
  30.  * 
  31.  * 1     03-05-27 22:47 Fwang
  32.  * Creat
  33. ****************************************************************************************/
  34. #include "Config.h" // Global Configuration - do not remove!
  35. #ifndef NVM_BMK_H
  36. #define NVM_BMK_H
  37. #include "PlaycoreNav_DVDHeaderdvddef.h"
  38. #include "PlaycoreCoremaincoregdef.h"
  39. typedef enum{
  40. BMK_NONE,
  41. BMK_DVD,
  42. BMK_SVCD,
  43. BMK_CDDA,
  44. #ifdef DVD_VR_SUPPORT
  45. BMK_DVD_VR
  46. #endif
  47. }BMK_TYPE;
  48. typedef struct{
  49. WORD checksum;
  50. DWORD dw_ifobase;
  51. DVD_BOOKMARK dvd_bmk;
  52. WORD gprm[18];
  53. }DVD_NVM_BMK;
  54. typedef struct{
  55. WORD wLeadOut;
  56. SVCD_Marker m_CurrPosition;
  57. BOOL m_bIsUsingPSD;
  58. SVCD_PSDList m_CurrList;
  59. BYTE m_iCurrVideoType;
  60. }SVCD_NVM_BMK;
  61. typedef struct{
  62. WORD wLeadOut;
  63. CDDA_Marker m_ResumePlayback;
  64. }CDDA_NVM_BMK;
  65. #ifdef DVD_VR_SUPPORT
  66. typedef struct{
  67. WORD checksum;
  68. Vr_BookMark dvd_vr_bmk;
  69. }DVD_VR_NVM_BMK;
  70. #endif
  71. typedef struct{
  72. union{
  73. DVD_NVM_BMK dvd;
  74. SVCD_NVM_BMK svcd;
  75. CDDA_NVM_BMK cdda;
  76. #ifdef DVD_VR_SUPPORT
  77. DVD_VR_NVM_BMK dvd_vr;
  78. #endif
  79. }marker;
  80. BYTE bmk_type;
  81. BYTE age;
  82. BYTE checksum;
  83. }NVM_GENERIC_BMK;
  84. #ifndef STORE_PS_DATA_IN_FLASH
  85. typedef union{
  86. NVM_GENERIC_BMK bmk;
  87. BYTE data[sizeof(NVM_GENERIC_BMK)]; 
  88. }BMK_STORAGE;
  89. #endif
  90. #ifdef STORE_PS_DATA_IN_FLASH
  91. #ifdef _DEBUG
  92. void NVM_BMK_DebugOut();
  93. #endif
  94. #endif
  95. BOOL NVM_BMK_Cache();
  96. void NVM_BMK_UnCache();
  97. BOOL NVM_BMK_IsCached();
  98. BOOL NVM_BMK_hit(int *h_BmkSlot);
  99. void NVM_BMK_Get_FreeSlot(int *h_BmkSlot);
  100. #ifdef STORE_PS_DATA_IN_FLASH
  101. void NVM_BMK_Save(BOOL bUpdateFlash);
  102. #else
  103. void NVM_BMK_Save(void);
  104. #endif
  105. void NVM_BMK_Flush( int position );
  106. void NVM_BMK_FlushAll();
  107. void NVM_BMK_Verify();
  108. int NVM_BMK_AvailableSlot();
  109. void NVM_BMK_SET(int position);
  110. BOOL NVM_BMK_Play();
  111. #if 0
  112. NVM_GENERIC_BMK *NVM_BMK_Get(int slot);
  113. #endif
  114. void NVM_BMK_Hook(BMK_TYPE bmk_type, BOOL(*match_func)(NVM_GENERIC_BMK*), void(*set_func)(WORD), void(*play_func)(NVM_GENERIC_BMK*));
  115. void NVM_BMK_UnHook();
  116. #endif  //NVM_BMK_H