PlayMode.h
上传用户:super_houu
上传日期:2008-09-21
资源大小:4099k
文件大小:5k
- /****************************************************************************************
- * Copyright (c) 2002 ZORAN Corporation, All Rights Reserved
- * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF ZORAN CORPORATION
- *
- * File: $Workfile: PlayMode.h $
- *
- * Description:
- * ============
- *
- *
- * Log:
- * ====
- * $Revision: 9 $
- * Last Modified by $Author: Williaml $ at $Modtime: 04-03-30 11:10 $
- ****************************************************************************************
- * Updates:
- ****************************************************************************************
- * $Log: /I76/I76_Common/I76_Reference/Playcore/PlayMode/PlayMode.h $
- *
- * 9 04-03-30 11:10 Williaml
- * Merge the latest code for K1
- *
- * 8 2/20/04 6:21p Glenl
- * Merged S1 code
- *
- * 7 2/10/04 3:58p Leonh
- * rewrite the shuffle, rename the old one as random
- *
- * 6 03-03-07 19:11 Jerryc
- * jerryc, add support for random play mode.
- *
- * 5 03-03-05 17:38 Jerryc
- * jerryc, clean up.
- *
- * 4 03-02-20 18:04 Victorwu
- * Add intro mode
- *
- * 3 03-02-19 17:17 Victorwu
- * Add more playmode as Vestel request
- *
- * 2 10/30/02 17:49 Rond
- *
- * 5 23/04/02 9:35 Nirm
- * - Added dependency in "Config.h".
- *
- * 4 9/01/02 16:47 Nirm
- * Corrected Include-Paths.
- *
- * 3 9/01/02 9:19 Nirm
- * Corrected Include-Paths.
- *
- * 2 12/26/01 18:54 Ettim
- * After updating nav_svcd.c & pe_cd.c
- ****************************************************************************************/
- #include "Config.h" // Global Configuration - do not remove!
- #ifndef PLAYMODE_H_
- #define PLAYMODE_H_
- #include "PlaycoreCoremaincoremain.h"
- #include "PlaycoreCoremaincoregdef.h"
- /////////////////////////////////////////////////////////////////////////////////////////////////
- // Constants
- #define PM_MAX_BOOKMARKS 3
- #define PM_PLAYBACK_NORMAL 0
- #define PM_PLAYBACK_SHUFFLE 1
- #define PM_PLAYBACK_PROGRAM 2
- #define PM_PLAYBACK_RANDOM 4
- #ifdef K1_WL
- #define PM_PLAYBACK_INTRO 4 //add by wl011704
- #endif
- #define PM_PLAYBACK_MASK 0x7
- #define PM_PBC_MASK 0x8
- #define PM_REPEAT_SINGLE 0x1
- #define PM_REPEAT_ALL 0x2
- #define PM_REPEAT_AB_A 0x4
- #define PM_REPEAT_AB_B 0x8
- #define PM_REPEAT_AB_MASK 0xC
- #define PM_REPEAT_FOLDER 0x10
- #ifdef S1_GUI
- #define PM_REPEAT_10SEC 0x20
- #endif
- /////////////////////////////////////////////////////////////////////////////////////////////////
- // Data-Structures
- typedef struct PlayModeInfo_TAG {
- BYTE iPlaybackMode; // Specifies the type of Playback (Normal, Shuffle, or Program)
- BYTE iRepeatMode; // Specifies the type of Repetition (Single, All, for AB: A, B, or Cancel)
- WORD uProgramListSize; // The number of valid entries in the Program-List
- #ifdef D_PM_BOOKDESC //stivenz_1116_2004_Mem_Opt: Remove since it never use.
- LPSTR aBookmarkDescription[PM_MAX_BOOKMARKS];
- #endif //D_PM_BOOKDESC
- } PlayModeInfo;
- extern PlayModeInfo g_PlayModeInfo;
- /////////////////////////////////////////////////////////////////////////////////////////////////
- // Public Services
- #define PM_IsPlaybackNormal(iPlaybackMode) (PM_PLAYBACK_NORMAL == (iPlaybackMode & PM_PLAYBACK_MASK))
- #define PM_IsPlaybackShuffle(iPlaybackMode) (PM_PLAYBACK_SHUFFLE == (iPlaybackMode & PM_PLAYBACK_MASK))
- #define PM_IsPlaybackProgram(iPlaybackMode) (PM_PLAYBACK_PROGRAM == (iPlaybackMode & PM_PLAYBACK_MASK))
- #ifdef K1_WL
- #define PM_IsPlaybackIntro(iPlaybackMode) (PM_PLAYBACK_INTRO == (iPlaybackMode & PM_PLAYBACK_MASK)) //add by wl011704
- #endif
- #define PM_IsPBC(iPlaybackMode) ((iPlaybackMode & PM_PBC_MASK) ? TRUE : FALSE)
- #define PM_IsPlaybackRandom(iPlaybackMode) (PM_PLAYBACK_RANDOM == (iPlaybackMode & PM_PLAYBACK_MASK))
- BYTE PM_GetPlaybackMode(void);
- void PM_SetPlaybackMode(BYTE iPlaybackMode);
- void PM_SetPBC(BOOL bEnable);
- BOOL PM_IsRepeatSingle(void);
- BOOL PM_IsRepeatAll(void);
- BYTE PM_GetRepeatAB(void);
- BOOL PM_IsRepeatFolder(void);
- void PM_SetRepeatSingle(BOOL bEnable);
- void PM_SetRepeatAll(BOOL bEnable);
- void PM_SetRepeatAB(BYTE iRepeatAB);
- void PM_SetRepeatFolder(BOOL bEnable);
- void PM_ClearRepeat(void);
- #ifdef D_PM_BOOKDESC //stivenz_1116_2004_Mem_Opt: Remove since it never use.
- LPSTR PM_GetBookmarkDescription(WORD uBookmarkNumber);
- void PM_SetBookmarkDescription(WORD uBookmarkNumber, LPSTR lpszDescription);
- #endif //D_PM_BOOKDESC
- void PM_InitializeProgramList(void);
- WORD PM_GetProgramSize(void);
- void PM_SetProgramListEntry(WORD uEntryNumber, WORD wContents);
- WORD PM_GetProgramListEntry(WORD uEntryNumber);
- //Leon.He_1001_2004_a: rewrite the shuffle, rename the old one as random
- void PM_RandomProgramList(BOOL bExcludePivot, WORD uPivotEntryNumber);
- void PM_ShuffleProgramList(BOOL bExcludePivot, WORD uPivotEntryNumber);
- BOOL PM_IsLastProgramListEntry(WORD wContents);
- void PM_ReConstructProgramListEntry(void);
- WORD PM_GetRandomItemFromProgramList(void);
- /////////////////////////////////////////////////////////////////////////////////////////////////
- // Private Services
- #endif //PLAYMODE_H_