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

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: PlayMode.h $             
  6.  *
  7.  * Description: 
  8.  * ============
  9.  * 
  10.  * 
  11.  * Log:
  12.  * ====
  13.  * $Revision: 9 $
  14.  * Last Modified by $Author: Williaml $ at $Modtime: 04-03-30 11:10 $ 
  15.  ****************************************************************************************
  16.  * Updates:
  17.  ****************************************************************************************
  18.  * $Log: /I76/I76_Common/I76_Reference/Playcore/PlayMode/PlayMode.h $
  19.  * 
  20.  * 9     04-03-30 11:10 Williaml
  21.  * Merge the latest code for K1
  22.  * 
  23.  * 8     2/20/04 6:21p Glenl
  24.  * Merged S1 code
  25.  * 
  26.  * 7     2/10/04 3:58p Leonh
  27.  * rewrite the shuffle, rename the old one as random
  28.  * 
  29.  * 6     03-03-07 19:11 Jerryc
  30.  * jerryc, add support for random play mode.
  31.  * 
  32.  * 5     03-03-05 17:38 Jerryc
  33.  * jerryc, clean up.
  34.  * 
  35.  * 4     03-02-20 18:04 Victorwu
  36.  * Add intro mode
  37.  * 
  38.  * 3     03-02-19 17:17 Victorwu
  39.  * Add more playmode as Vestel request
  40.  * 
  41.  * 2     10/30/02 17:49 Rond
  42.  * 
  43.  * 5     23/04/02 9:35 Nirm
  44.  * - Added dependency in "Config.h".
  45.  * 
  46.  * 4     9/01/02 16:47 Nirm
  47.  * Corrected Include-Paths.
  48.  *
  49.  * 3     9/01/02 9:19 Nirm
  50.  * Corrected Include-Paths.
  51.  * 
  52.  * 2     12/26/01 18:54 Ettim
  53.  * After updating nav_svcd.c & pe_cd.c
  54.  ****************************************************************************************/
  55. #include "Config.h" // Global Configuration - do not remove!
  56. #ifndef PLAYMODE_H_
  57. #define PLAYMODE_H_
  58. #include "PlaycoreCoremaincoremain.h"
  59. #include "PlaycoreCoremaincoregdef.h"
  60. /////////////////////////////////////////////////////////////////////////////////////////////////
  61. // Constants
  62. #define PM_MAX_BOOKMARKS 3
  63. #define PM_PLAYBACK_NORMAL 0
  64. #define PM_PLAYBACK_SHUFFLE 1
  65. #define PM_PLAYBACK_PROGRAM 2
  66. #define PM_PLAYBACK_RANDOM  4
  67. #ifdef K1_WL
  68. #define PM_PLAYBACK_INTRO 4 //add by wl011704
  69. #endif
  70. #define PM_PLAYBACK_MASK 0x7
  71. #define PM_PBC_MASK 0x8
  72. #define PM_REPEAT_SINGLE 0x1
  73. #define PM_REPEAT_ALL 0x2
  74. #define PM_REPEAT_AB_A 0x4
  75. #define PM_REPEAT_AB_B 0x8
  76. #define PM_REPEAT_AB_MASK 0xC
  77. #define PM_REPEAT_FOLDER 0x10
  78. #ifdef S1_GUI 
  79. #define PM_REPEAT_10SEC 0x20
  80. #endif
  81. /////////////////////////////////////////////////////////////////////////////////////////////////
  82. // Data-Structures
  83. typedef struct PlayModeInfo_TAG {
  84. BYTE iPlaybackMode; // Specifies the type of Playback (Normal, Shuffle, or Program)
  85. BYTE iRepeatMode; // Specifies the type of Repetition (Single, All, for AB: A, B, or Cancel)
  86. WORD uProgramListSize; // The number of valid entries in the Program-List
  87. #ifdef D_PM_BOOKDESC //stivenz_1116_2004_Mem_Opt: Remove since it never use.
  88. LPSTR aBookmarkDescription[PM_MAX_BOOKMARKS];
  89. #endif //D_PM_BOOKDESC
  90. } PlayModeInfo;
  91. extern PlayModeInfo g_PlayModeInfo;
  92. /////////////////////////////////////////////////////////////////////////////////////////////////
  93. // Public Services
  94. #define PM_IsPlaybackNormal(iPlaybackMode) (PM_PLAYBACK_NORMAL == (iPlaybackMode & PM_PLAYBACK_MASK))
  95. #define PM_IsPlaybackShuffle(iPlaybackMode) (PM_PLAYBACK_SHUFFLE == (iPlaybackMode & PM_PLAYBACK_MASK))
  96. #define PM_IsPlaybackProgram(iPlaybackMode) (PM_PLAYBACK_PROGRAM == (iPlaybackMode & PM_PLAYBACK_MASK))
  97. #ifdef K1_WL
  98. #define PM_IsPlaybackIntro(iPlaybackMode) (PM_PLAYBACK_INTRO == (iPlaybackMode & PM_PLAYBACK_MASK))  //add by wl011704
  99. #endif
  100. #define PM_IsPBC(iPlaybackMode) ((iPlaybackMode & PM_PBC_MASK) ? TRUE : FALSE)
  101. #define PM_IsPlaybackRandom(iPlaybackMode) (PM_PLAYBACK_RANDOM == (iPlaybackMode & PM_PLAYBACK_MASK))
  102. BYTE PM_GetPlaybackMode(void);
  103. void PM_SetPlaybackMode(BYTE iPlaybackMode);
  104. void PM_SetPBC(BOOL bEnable);
  105. BOOL PM_IsRepeatSingle(void);
  106. BOOL PM_IsRepeatAll(void);
  107. BYTE PM_GetRepeatAB(void);
  108. BOOL PM_IsRepeatFolder(void);
  109. void PM_SetRepeatSingle(BOOL bEnable);
  110. void PM_SetRepeatAll(BOOL bEnable);
  111. void PM_SetRepeatAB(BYTE iRepeatAB);
  112. void PM_SetRepeatFolder(BOOL bEnable);
  113. void PM_ClearRepeat(void);
  114. #ifdef D_PM_BOOKDESC    //stivenz_1116_2004_Mem_Opt: Remove since it never use.
  115. LPSTR PM_GetBookmarkDescription(WORD uBookmarkNumber);
  116. void PM_SetBookmarkDescription(WORD uBookmarkNumber, LPSTR lpszDescription);
  117. #endif //D_PM_BOOKDESC
  118. void PM_InitializeProgramList(void);
  119. WORD PM_GetProgramSize(void);
  120. void PM_SetProgramListEntry(WORD uEntryNumber, WORD wContents);
  121. WORD PM_GetProgramListEntry(WORD uEntryNumber);
  122. //Leon.He_1001_2004_a: rewrite the shuffle, rename the old one as random
  123. void PM_RandomProgramList(BOOL bExcludePivot, WORD uPivotEntryNumber);
  124. void PM_ShuffleProgramList(BOOL bExcludePivot, WORD uPivotEntryNumber);
  125. BOOL PM_IsLastProgramListEntry(WORD wContents);
  126. void PM_ReConstructProgramListEntry(void);
  127. WORD PM_GetRandomItemFromProgramList(void);
  128. /////////////////////////////////////////////////////////////////////////////////////////////////
  129. // Private Services
  130. #endif //PLAYMODE_H_