- /* **************************************************************************************
- * Copyright (c) 2001 ZORAN Corporation, All Rights Reserved
- * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF ZORAN CORPORATION
- *
- * File: "NVM_BMK.h" 05/27/03
- *
- * Description:
- * ============
- * NVM Bookmark
- *
- * Log:
- * ====
- * $Revision: 4 $
- * Last Modified by $Author: Fwang $ at $Modtime: 03-06-17 14:28 $
- ****************************************************************************************
- * Updates:
- ****************************************************************************************
- * $Log: /SourceCode/I64_Common/I64_Reference/Playcore/Coremain/NVM_BMK.h $
- *
- * 4 03-06-17 14:59 Fwang
- * Add API -- NVM_BMK_Flush(). Optimize API parameters.
- *
- * 3 03-06-02 18:24 Fwang
- * Add API function for get available setting slot.
- * Optimize verifier.
- *
- * 2 03-05-28 11:18 Fwang
- * Add NVM_BMK_Get() to get bookmark
- * Support specified postion in NVM_BMK_SET()
- *
- * 1 03-05-27 22:47 Fwang
- * Creat
- ****************************************************************************************/
- #include "Config.h" // Global Configuration - do not remove!
- #ifndef NVM_BMK_H
- #define NVM_BMK_H
- #include "PlaycoreNav_DVDHeaderdvddef.h"
- #include "PlaycoreCoremaincoregdef.h"
- typedef enum{
- BMK_NONE,
- BMK_DVD,
- BMK_SVCD,
- BMK_CDDA,
- #ifdef DVD_VR_SUPPORT
- BMK_DVD_VR
- #endif
- }BMK_TYPE;
- typedef struct{
- WORD checksum;
- DWORD dw_ifobase;
- DVD_BOOKMARK dvd_bmk;
- WORD gprm[18];
- }DVD_NVM_BMK;
- typedef struct{
- WORD wLeadOut;
- SVCD_Marker m_CurrPosition;
- BOOL m_bIsUsingPSD;
- SVCD_PSDList m_CurrList;
- BYTE m_iCurrVideoType;
- }SVCD_NVM_BMK;
- typedef struct{
- WORD wLeadOut;
- CDDA_Marker m_ResumePlayback;
- }CDDA_NVM_BMK;
- #ifdef DVD_VR_SUPPORT
- typedef struct{
- WORD checksum;
- Vr_BookMark dvd_vr_bmk;
- }DVD_VR_NVM_BMK;
- #endif
- typedef struct{
- union{
- DVD_NVM_BMK dvd;
- SVCD_NVM_BMK svcd;
- CDDA_NVM_BMK cdda;
- #ifdef DVD_VR_SUPPORT
- DVD_VR_NVM_BMK dvd_vr;
- #endif
- }marker;
- BYTE bmk_type;
- BYTE age;
- BYTE checksum;
- }NVM_GENERIC_BMK;
- #ifndef STORE_PS_DATA_IN_FLASH
- typedef union{
- NVM_GENERIC_BMK bmk;
- BYTE data[sizeof(NVM_GENERIC_BMK)];
- }BMK_STORAGE;
- #endif
- #ifdef STORE_PS_DATA_IN_FLASH
- #ifdef _DEBUG
- void NVM_BMK_DebugOut();
- #endif
- #endif
- BOOL NVM_BMK_Cache();
- void NVM_BMK_UnCache();
- BOOL NVM_BMK_IsCached();
- BOOL NVM_BMK_hit(int *h_BmkSlot);
- void NVM_BMK_Get_FreeSlot(int *h_BmkSlot);
- #ifdef STORE_PS_DATA_IN_FLASH
- void NVM_BMK_Save(BOOL bUpdateFlash);
- #else
- void NVM_BMK_Save(void);
- #endif
- void NVM_BMK_Flush( int position );
- void NVM_BMK_FlushAll();
- void NVM_BMK_Verify();
- int NVM_BMK_AvailableSlot();
- void NVM_BMK_SET(int position);
- BOOL NVM_BMK_Play();
- #if 0
- NVM_GENERIC_BMK *NVM_BMK_Get(int slot);
- #endif
- void NVM_BMK_Hook(BMK_TYPE bmk_type, BOOL(*match_func)(NVM_GENERIC_BMK*), void(*set_func)(WORD), void(*play_func)(NVM_GENERIC_BMK*));
- void NVM_BMK_UnHook();
- #endif //NVM_BMK_H