Clip_Impl.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: Clip_Impl.h $             
  6.  *
  7.  * Description: 
  8.  * ============
  9.  * 
  10.  * 
  11.  * Log:
  12.  * ====
  13.  * $Revision: 5 $
  14.  * Last Modified by $Author: Jerryc $ at $Modtime: 03-03-03 15:17 $ 
  15.  ****************************************************************************************
  16.  * Updates:
  17.  ****************************************************************************************
  18.  * $Log: /SourceCode/I64_Common/I64_Reference/Playcore/Nav_Clips/Clip_Impl.h $
  19.  * 
  20.  * 5     03-03-04 11:34 Jerryc
  21.  * jerry cai, merge new nav clips lib 
  22.  * 
  23.  * 4     03-02-08 0:34 Leslie
  24.  * Add MANUAL_DIRECTORY_EXPLORER
  25.  * 
  26.  * 3     03-01-10 12:21 Leslie
  27.  * Add wide-character strings support
  28.  * 
  29.  * 2     03-01-09 12:30 Leslie
  30.  * 
  31.  * 1     10/30/02 18:05 Rond
  32.  * 
  33.  * 1     11/09/02 15:48 Atai
  34.  * 
  35.  * 3     13/08/02 13:47 Nirm
  36.  * - Clip_isFinished() replaced by Clip_getStatus().
  37.  * 
  38.  * 2     2/08/02 19:47 Nirm
  39.  * - Added Caching capability.
  40.  * 
  41.  * 1     30/07/02 18:39 Nirm
  42.  ****************************************************************************************/
  43. #include "Config.h" // Global Configuration - do not remove!
  44. #ifndef __CLIP_IMPL_H_
  45. #define __CLIP_IMPL_H_
  46. #include "IncludeSysDefs.h"
  47. #include "PlaycoreFileSysFileSystem.h"
  48. #include "PlaycoreNav_ClipsClip.h"
  49. /////////////////////////////////////////////////////////////////////////////
  50. // Macros
  51. // Valid Extenions List
  52. #define CLIP_VALID_EXTENSIONS(clipTypeName) g_a##clipTypeName##Extensions
  53. #define BEGIN_CLIP_VALID_EXTENSIONS_MAP(clipTypeName)
  54. static CONST LPCWSTR CLIP_VALID_EXTENSIONS(clipTypeName)[]= {
  55. #define CLIP_VALID_EXTENSIONS_ENTRY(sExtension) sExtension,
  56. #define END_CLIP_VALID_EXTENSIONS_MAP() NULL };
  57. // Constant Attributes
  58. #define CLIP_CONST_ATTR(clipTypeName) g_##clipTypeName##Const
  59. #define DECLARE_CLIP_VTABLE(pfGetExtendedInfo, pfPlay, pfPause, pfGetStatus,
  60. pfAbort, pfRecordMarker, pfRefresh, pfGetTime,
  61. pfDigest, pfClipScan)
  62. {
  63.   pfGetExtendedInfo, pfPlay, pfPause, pfGetStatus, pfAbort,
  64.   pfRecordMarker, pfRefresh, pfGetTime, pfDigest, pfClipScan
  65. }
  66. #define DECLARE_CLIP_CONST_ATTR(clipTypeName, vtable, eType, audioSID, videoSID,
  67. eBitstreamType, uAttributes, pPresentationTime)
  68. static CONST ClipConstAttr CLIP_CONST_ATTR(clipTypeName)= {
  69. vtable,
  70. (enClipType)eType,
  71. (UINT8)audioSID, (UINT8)videoSID, (UINT8)eBitstreamType,
  72. (UINT8)uAttributes,
  73. pPresentationTime
  74. };
  75. /////////////////////////////////////////////////////////////////////////////
  76. // Common Structures
  77. typedef struct ClipConstAttr_TAG {
  78. // Virtual Table
  79. struct {
  80. BOOL (*m_pfGetExtendedInfo)(const struct Clip_TAG *i_pThis, WORD o_pExtInfoContainer);
  81. BOOL (*m_pfPlay)(struct Clip_TAG *i_pThis, const ClipMarker *i_pResumeMarker, BOOL bCacheOnly);
  82. void (*m_pfPause)(struct Clip_TAG *i_pThis, BOOL bEnable);
  83. enClipStatus (*m_pfGetStatus)(const struct Clip_TAG *i_pThis);
  84. void (*m_pfAbort)(struct Clip_TAG *i_pThis, BOOL bMaintainStandby);
  85. void (*m_pfRecordMarker)(const struct Clip_TAG *i_pThis, ClipMarker *o_pMarker);
  86. void (*m_pfRefresh)(struct Clip_TAG *i_pThis);
  87. UINT16 (*m_pfGetTime)(const struct Clip_TAG *i_pThis);
  88. void (*m_pfDigest)(struct Clip_TAG *i_pThis);
  89. void (*m_pfClipScan)(struct Clip_TAG *i_pThis, INT16 iSpeed);
  90. } m_vtable;
  91. // Constant Data members
  92. enClipType m_eType;
  93. UINT8 m_eAudioSID;
  94. UINT8 m_eVideoSID;
  95. UINT8 m_eBitstreamType;
  96. UINT8 m_eAttributes;
  97. UINT8 *m_pPresentationTime;
  98. } ClipConstAttr;
  99. typedef struct ClipFileInfo_TAG {
  100. // Path information
  101. WCHAR szDirectoryName[1+CLIPS_MAX_DIRNAME_LEN];
  102. // File-Name, Location, and Size (Bytes)
  103. WCHAR szFilename[1+CLIPS_MAX_FILENAME_LEN];
  104. DWORD dwFileLocation;
  105. ULONG cbFileSize;
  106. // Robin_0715_2004, merge changelist #24166
  107. #ifdef USE_AUX_SUBTITLES
  108. // <<< Robin_0903_2004
  109. #ifdef DIVX_SUPPORT_MULTI_SUBTITLE
  110. WORD wSubFileIndex;
  111. WORD wSubFileCnt;
  112. #else
  113. DWORD dwSubtitlesFileAddress;
  114. // Robin_1003_2004_E
  115. DWORD dwSubtitlesFileSize;
  116. #endif
  117. // >>> Robin_0903_2004
  118. #endif
  119. } ClipFileInfo;
  120. typedef struct Clip_TAG {
  121. // Implementation
  122. const ClipConstAttr *m_pConstAttr;
  123. // Non-Constant Data Members
  124. ClipFileInfo m_cfiInfo;
  125. struct {
  126. unsigned int eImageOrientation :2;
  127. unsigned int eTransitionEffect :3;
  128. unsigned int ucUserData :8;
  129. unsigned int reserved :2;
  130. unsigned int bModified :1;
  131. } m_presentationInfo;
  132. } Clip;
  133. #endif //__CLIP_IMPL_H_