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

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.c $             
  6.  *
  7.  * Description: 
  8.  * ============
  9.  * 
  10.  * 
  11.  * Log:
  12.  * ====
  13.  * $Revision: 14 $
  14.  * Last Modified by $Author: Lotan $ at $Modtime: 3/04/04 9:57p $ 
  15.  ****************************************************************************************
  16.  * Updates:
  17.  ****************************************************************************************
  18.  * $Log: /I76/I76_Common/I76_Reference/Playcore/Nav_Clips/Clip.c $
  19.  * 
  20.  * 14    3/04/04 10:22p Lotan
  21.  * Second merge with Divx Certification DB,
  22.  * including 2x16 SDram
  23.  * 
  24.  * 13    3/01/04 6:29p Lotan
  25.  * merge with Divx certification DB
  26.  * 
  27.  * 12    1/13/04 12:11 Hamadk
  28.  * Merged with CES DB
  29.  * 
  30.  * 11    12/24/03 17:41 Hamadk
  31.  * Added handling for demux finished event
  32.  * 
  33.  * 10    12/23/03 13:33 Hamadk
  34.  * Removed printf
  35.  * 
  36.  * 9     12/23/03 11:11 Hamadk
  37.  * Changed Clip_setPresentationTime() to support AVI files
  38.  * 
  39.  * 7     03-08-12 10:48 Leonh
  40.  * addjust the printf message for debug array out range problem
  41.  * 
  42.  * 6     03-08-12 10:40 Leonh
  43.  * add the print message for debug array out range problem
  44.  * 
  45.  * 5     03-04-25 17:27 Jerryc
  46.  * folders are always list on the top.
  47.  * 
  48.  * 4     03-03-04 11:34 Jerryc
  49.  * jerry cai, merge new nav clips lib 
  50.  * 
  51.  * 3     03-02-08 0:32 Leslie
  52.  * Add MANUAL_DIRECTORY_EXPLORER
  53.  * 
  54.  * 2     03-01-09 12:30 Leslie
  55.  * 
  56.  * 1     10/30/02 18:05 Rond
  57.  * 
  58.  * 1     11/09/02 15:48 Atai
  59.  * 
  60.  * 6     26/08/02 16:05 Nirm
  61.  * - Added MPEG Clips support.
  62.  * 
  63.  * 5     18/08/02 17:25 Nirm
  64.  * - Added WMA support.
  65.  * 
  66.  * 4     13/08/02 13:47 Nirm
  67.  * - Clip_isFinished() replaced by Clip_getStatus().
  68.  * 
  69.  * 3     4/08/02 21:31 Nirm
  70.  * - Explicit castings of bit-field member to the appropriate enums, to
  71.  * prevent compiler-compatibility problems.
  72.  * 
  73.  * 2     2/08/02 19:47 Nirm
  74.  * - Added Caching capability.
  75.  * 
  76.  * 1     30/07/02 18:39 Nirm
  77.  ****************************************************************************************/
  78. #include "Config.h" // Global Configuration - do not remove!
  79. #ifdef _DEBUG
  80. #undef IFTRACE
  81. #define IFTRACE if (gTraceNavigator)
  82. #include "DebugDbgMain.h"
  83. #endif
  84. #include "IncludeSysDefs.h"
  85. #include "Includemath-macro.h"
  86. #include "PlaycoreDataStructuresArray.h"
  87. #include "PlaycoreFileSysFileSystem.h"
  88. #include "PlaycoreNav_ClipsClip.h"
  89. #include "PlaycoreNav_ClipsClip_Impl.h"
  90. #include "PlaycoreNav_ClipsGenericClip.h"
  91. #include "PlaycoreNav_ClipsMP3.h"
  92. #include "PlaycoreNav_ClipsWMA.h"
  93. #include "PlaycoreNav_ClipsJPEG.h"
  94. #include "PlaycoreNav_ClipsMPEG.h"
  95. //#include "PlaycoreNav_ClipsAVI.h"
  96. #ifdef IS_ASF_CAPABLE
  97. //#include "PlaycoreNav_ClipsASF.h"
  98. #endif
  99. #ifdef IS_MP4_CAPABLE
  100. //#include "PlaycoreNav_ClipsMP4.h"
  101. #endif
  102. #include "PlaycoreScPadScPadAlloc.h"
  103. #include "playcorefilesysiso9660ecma119.h"
  104. #include "PlaycoreCoremainCoreGDef.h"
  105. /////////////////////////////////////////////////////////////////////////////
  106. // Clips Repository
  107. /////////////////////////////////////////////////////////////////////////////
  108. /////////////////////////////////////////////////////////////////////////////
  109. // Globals and Singletons
  110. static struct ClipsRepository_TAG {
  111. UINT32 hArray;
  112. UINT16  uTypeFilter;
  113. } g_ClipsRepository= { NULL, 0xFFFF };
  114. static struct ClipInstance_TAG {
  115. UINT16 hInstance;
  116. Clip theClip;
  117. } g_theInstance= {NULL};
  118. void ClipsRepository_clear()
  119. {
  120. ArrayInitBound(g_ClipsRepository.hArray,0);
  121. }
  122. /////////////////////////////////////////////////////////////////////////////
  123. // Public Services
  124. BOOL ClipsRepository_construct(UINT16 uMaxClipsCnt)
  125. {
  126. UINT32 dwRepositoryAddress= (UINT32)SC_CLIPS_LIST_ADDRESS;
  127. g_ClipsRepository.hArray= Array_constructEx(uMaxClipsCnt, 
  128. sizeof(Clip), 
  129. &dwRepositoryAddress);
  130. if (NULL == g_ClipsRepository.hArray) {
  131. tr_printf(("FATAL: ClipsRepository_construct() Failed [1]: Low system resourcesn"));
  132. return FALSE;
  133. }
  134. return TRUE;
  135. }
  136. void ClipsRepository_destruct(void)
  137. {
  138. if (NULL != g_ClipsRepository.hArray)
  139. Array_destruct(g_ClipsRepository.hArray);
  140. g_ClipsRepository.hArray= NULL;
  141. }
  142. void ClipsRepository_empty(void)
  143. {
  144. Array_clear(g_ClipsRepository.hArray);
  145. }
  146. UINT16 ClipsRepository_getSize(void)
  147. {
  148. return Array_getSize(g_ClipsRepository.hArray);
  149. }
  150. void ClipsRepository_setTypeFilter(UINT16 uTypeFilter)
  151. {
  152. g_ClipsRepository.uTypeFilter= uTypeFilter;
  153. }
  154. UINT16 ClipsRepository_addClip(const FindData *i_pFileInfo)
  155. {
  156. UINT16 hInstance = NULL;
  157. Clip *pClip= &g_theInstance.theClip;
  158. enClipType uTypeFilter = g_ClipsRepository.uTypeFilter;
  159. // Invalidate the current Instance, if any, before using its space
  160. g_theInstance.hInstance= NULL;
  161. // Construct a new Clip
  162. Clip_construct(pClip, i_pFileInfo);
  163. // Robin_0715_2004, merge changelist #24166
  164. #ifdef USE_AUX_SUBTITLES
  165. findAuxSubtitlesFile(pClip, i_pFileInfo);
  166. #endif
  167. // Check if the Clip is of a desired Type, according to the Type filter
  168. if ((uTypeFilter & (enClipType)(pClip->m_pConstAttr)->m_eType))  
  169. {
  170. hInstance= 1 + Array_getSize(g_ClipsRepository.hArray);
  171. // tr_printf(("Current Clips hinstanc=%dn",hInstance));//for debug the problem array out of range
  172. if (!Array_setAt(g_ClipsRepository.hArray, (hInstance-1), (const BYTE*)pClip))
  173. hInstance= NULL;
  174. }
  175. return hInstance;
  176. }
  177. UINT16 ClipsRepository_getInstanceAt(UINT16 uPos)
  178. {
  179. if (uPos >= Array_getSize(g_ClipsRepository.hArray))
  180. return NULL;
  181. return (1+uPos);
  182. }
  183. #ifdef USE_AUX_SUBTITLES
  184. UINT16 getCurrentInstanceIndex(void)
  185. {
  186. return g_theInstance.hInstance;
  187. }
  188. #endif // USE_AUX_SUBTITLES
  189. /////////////////////////////////////////////////////////////////////////////
  190. // Protected Services
  191. static void _ClipsRepository_retrieve(UINT16 hInstance, Clip *o_pClip)
  192. {
  193. ASSERT((NULL != hInstance) && (hInstance <= Array_getSize(g_ClipsRepository.hArray)))
  194. Array_getAt(g_ClipsRepository.hArray, (hInstance-1), (BYTE*)o_pClip);
  195. }
  196. static void _ClipsRepository_commit(UINT16 hInstance, const Clip *i_pClip)
  197. {
  198. ASSERT((NULL != hInstance) && (hInstance <= Array_getSize(g_ClipsRepository.hArray)))
  199. Array_setAt(g_ClipsRepository.hArray, (hInstance-1), (const BYTE*)i_pClip);
  200. }
  201. /////////////////////////////////////////////////////////////////////////////
  202. // Clip
  203. /////////////////////////////////////////////////////////////////////////////
  204. /////////////////////////////////////////////////////////////////////////////
  205. // Macros
  206. #define CLIP_IS_KIND_OF(type, sFilename) type##Clip_isKindOf(sFilename)
  207. /////////////////////////////////////////////////////////////////////////////
  208. // Globals and Singletons
  209. /////////////////////////////////////////////////////////////////////////////
  210. // Private Services
  211. static Clip* _Clip_fromInstance(UINT16 hInstance)
  212. {
  213. ASSERT(NULL != hInstance)
  214. if (g_theInstance.hInstance != hInstance) {
  215. _ClipsRepository_retrieve(hInstance, &g_theInstance.theClip);
  216. g_theInstance.hInstance= hInstance;
  217. }
  218. return &g_theInstance.theClip;
  219. }
  220. /////////////////////////////////////////////////////////////////////////////
  221. // Public Services
  222. void Clip_continueScanning(void)
  223. {
  224. if (eClipType_AVI == (gns.clips.cieCurrClip).ciInfo.eType)
  225. {
  226. AVIClip_continueScanning();
  227. }
  228. #ifdef IS_ASF_CAPABLE
  229. else if (eClipType_ASF == (gns.clips.cieCurrClip).ciInfo.eType)
  230. {
  231. ASFClip_continueScanning();
  232. }
  233. #endif
  234. #ifdef IS_MP4_CAPABLE
  235. else if (eClipType_MP4 == (gns.clips.cieCurrClip).ciInfo.eType)
  236. {
  237. MP4Clip_continueScanning();
  238. }
  239. #endif
  240. }
  241. void Clip_performErrorHandling(UINT16 hInstance)
  242. {
  243. if (eClipType_AVI == (gns.clips.cieCurrClip).ciInfo.eType)
  244. {
  245. const Clip *i_pThis = _Clip_fromInstance(hInstance);
  246. ASSERT(NULL != i_pThis)
  247. AVIClip_performErrorHandling(i_pThis);
  248. }
  249. #ifdef IS_ASF_CAPABLE
  250. else if (eClipType_ASF == (gns.clips.cieCurrClip).ciInfo.eType)
  251. {
  252. const Clip *i_pThis = _Clip_fromInstance(hInstance);
  253. ASSERT(NULL != i_pThis)
  254. ASFClip_performErrorHandling(i_pThis);
  255. }
  256. #endif
  257. #ifdef IS_MP4_CAPABLE
  258. else if (eClipType_MP4 == (gns.clips.cieCurrClip).ciInfo.eType)
  259. {
  260. const Clip *i_pThis = _Clip_fromInstance(hInstance);
  261. ASSERT(NULL != i_pThis)
  262. MP4Clip_performErrorHandling(i_pThis);
  263. }
  264. #endif
  265. }
  266. void Clip_beforeStop(UINT16 hInstance)
  267. {
  268. if (eClipType_JPEG == (gns.clips.cieCurrClip).ciInfo.eType)
  269. {
  270. const Clip *i_pThis = _Clip_fromInstance(hInstance);
  271. ASSERT(NULL != i_pThis)
  272. JPEGClip_beforeStop(i_pThis);
  273. }
  274. }
  275. void Clip_setPresentationTime(enClipType eType, UINT8 uPresentationTime)
  276. {
  277. switch (eType)
  278. {
  279. case eClipType_MP2:
  280. case eClipType_MP3:
  281. MP3_setPresentationTime(uPresentationTime);
  282. break;
  283. case eClipType_WMA:
  284. WMA_setPresentationTime(uPresentationTime);
  285. break;
  286. #ifdef CLIPS_JPEG_SUPPORT
  287. case eClipType_JPEG:
  288. JPEG_setPresentationTime(uPresentationTime);
  289. break;
  290. #endif //CLIPS_JPEG_SUPPORT
  291. case eClipType_MPEG:
  292. MPEG_setPresentationTime(uPresentationTime);
  293. break;
  294. case eClipType_AVI:
  295. #ifdef IS_ASF_CAPABLE
  296. case eClipType_ASF:
  297. #endif
  298. #ifdef IS_MP4_CAPABLE
  299. case eClipType_MP4:
  300. #endif
  301. break;
  302. //Sean_1213_2004
  303. #ifdef IS_OGG_VORBIS_CAPABLE
  304. OGG_setPresentationTime(uPresentationTime);
  305. break;
  306. #endif
  307. //<<<Sean_1213_2004
  308. default:
  309. dbg_printf(("WARNING: Clip_setPresentationTime() Failed: Unknown Clip-Type.n"));
  310. break;
  311. }
  312. return;
  313. }
  314. void Clip_construct(Clip *o_pClip, const FindData *i_pFileInfo)
  315. {
  316. ASSERT(NULL != o_pClip)
  317. if (CLIP_IS_KIND_OF(AVI, i_pFileInfo->szFileID))
  318. {
  319. AVIClip_construct(o_pClip, i_pFileInfo);
  320. }
  321. #ifdef IS_ASF_CAPABLE
  322. else if (CLIP_IS_KIND_OF(ASF, i_pFileInfo->szFileID))
  323. {
  324. ASFClip_construct(o_pClip, i_pFileInfo);
  325. }
  326. #endif
  327. #ifdef IS_MP4_CAPABLE
  328. else if (CLIP_IS_KIND_OF(MP4, i_pFileInfo->szFileID))
  329. {
  330. MP4Clip_construct(o_pClip, i_pFileInfo);
  331. }
  332. #endif
  333. else if (CLIP_IS_KIND_OF(MP3, i_pFileInfo->szFileID))
  334. {
  335. MP3Clip_construct(o_pClip, i_pFileInfo);
  336. }
  337. else if (CLIP_IS_KIND_OF(WMA, i_pFileInfo->szFileID))
  338. {
  339. WMAClip_construct(o_pClip, i_pFileInfo);
  340. }
  341. #ifdef CLIPS_JPEG_SUPPORT
  342. else if (CLIP_IS_KIND_OF(JPEG, i_pFileInfo->szFileID))
  343. {
  344. JPEGClip_construct(o_pClip, i_pFileInfo);
  345. }
  346. #endif // CLIPS_JPEG_SUPPORT
  347. else if (CLIP_IS_KIND_OF(MPEG, i_pFileInfo->szFileID))
  348. {
  349. MPEGClip_construct(o_pClip, i_pFileInfo);
  350. }
  351. //Sean_1213_2004
  352. #ifdef IS_OGG_VORBIS_CAPABLE
  353. else if (CLIP_IS_KIND_OF(OGG, i_pFileInfo->szFileID))
  354. {
  355. OGGClip_construct(o_pClip, i_pFileInfo);
  356. }
  357. #endif //IS_OGG_VORBIS_CAPABLE
  358. //<<<Sean_1213_2004
  359. else 
  360. {
  361. // Construct a GenericClip using the Default constructor, to save
  362. // resoruces (this is not a real Clip).
  363. GenericClip_constructDefault(o_pClip);
  364. }
  365. return;
  366. }
  367. enClipType Clip_getType(UINT16 hInstance)
  368. {
  369. const Clip *pThis= _Clip_fromInstance(hInstance);
  370. ASSERT(NULL != pThis)
  371. return (enClipType)(pThis->m_pConstAttr)->m_eType;
  372. }
  373. BOOL Clip_hasAttribute(UINT16 hInstance, enClipAttribute eAttr)
  374. {
  375. const Clip *pThis= _Clip_fromInstance(hInstance);
  376. ASSERT(NULL != pThis)
  377. return ((UINT8)eAttr & (pThis->m_pConstAttr)->m_eAttributes);
  378. }
  379. void Clip_getFileInfo(UINT16 hInstance, ClipInfo *o_pInfo)
  380. {
  381. const Clip *pThis= _Clip_fromInstance(hInstance);
  382. ASSERT(NULL != pThis)
  383. o_pInfo->eType= (enClipType)(pThis->m_pConstAttr)->m_eType;
  384. // memcpy(&o_pInfo->szDirectoryName, &pThis->m_cfiInfo, sizeof(ClipFileInfo));
  385. wcscpy(o_pInfo->szDirectoryName, pThis->m_cfiInfo.szDirectoryName);
  386. wcscpy(o_pInfo->szFilename, pThis->m_cfiInfo.szFilename);
  387. o_pInfo->dwFileLocation = pThis->m_cfiInfo.dwFileLocation;
  388. o_pInfo->cbFileSize = pThis->m_cfiInfo.cbFileSize;
  389. #ifdef USE_AUX_SUBTITLES
  390. // <<< Robin_0903_2004
  391. #ifdef DIVX_SUPPORT_MULTI_SUBTITLE
  392.     o_pInfo->wSubFileIndex = pThis->m_cfiInfo.wSubFileIndex;
  393.     o_pInfo->wSubFileCnt = pThis->m_cfiInfo.wSubFileCnt;
  394. #else
  395.     o_pInfo->dwSubtitlesFileAddress = pThis->m_cfiInfo.dwSubtitlesFileAddress;
  396. // Robin_1003_2004_E
  397.     o_pInfo->dwSubtitlesFileSize= pThis->m_cfiInfo.dwSubtitlesFileSize;
  398. #endif
  399. // >>> Robin_0903_2004
  400. #endif
  401. return;
  402. }
  403. void Clip_getCurrFileInfo(UINT16 hInstance, CurrClipInfo *o_pInfo)
  404. {
  405. WCHAR  szTempDirectoryName[SC_CLIPS_CURRENT_DIRECTORY_SZ*2];
  406.    WCHAR szTempFilename[SC_CLIPS_CURRENT_FILENAME_SZ*2];
  407. const Clip *pThis= _Clip_fromInstance(hInstance);
  408. ASSERT(NULL != pThis)
  409. o_pInfo->eType= (enClipType)(pThis->m_pConstAttr)->m_eType;
  410. memset(szTempDirectoryName, 0, sizeof(szTempDirectoryName));
  411. wcscpy(szTempDirectoryName, pThis->m_cfiInfo.szDirectoryName);
  412. sc_SetBytes(SC_CLIPS_CURRENT_DIRECTORY_ADDR, (WORD)0, (WORD)(SC_CLIPS_CURRENT_DIRECTORY_SZ*4), (BYTE *)szTempDirectoryName);
  413.    memset(szTempFilename, 0, sizeof(szTempFilename));
  414.    wcscpy(szTempFilename, pThis->m_cfiInfo.szFilename);
  415.    sc_SetBytes(SC_CLIPS_CURRENT_FILENAME_ADDR, (WORD)0, (WORD)(SC_CLIPS_CURRENT_FILENAME_SZ*4), (BYTE*)szTempFilename);
  416.    o_pInfo->cbFileSize = pThis->m_cfiInfo.cbFileSize;
  417.    o_pInfo->dwFileLocation = pThis->m_cfiInfo.dwFileLocation;
  418. #ifdef USE_AUX_SUBTITLES
  419. // <<< Robin_0903_2004
  420. #ifdef DIVX_SUPPORT_MULTI_SUBTITLE
  421.     o_pInfo->wSubFileIndex = pThis->m_cfiInfo.wSubFileIndex;
  422.     o_pInfo->wSubFileCnt = pThis->m_cfiInfo.wSubFileCnt;
  423. #else
  424.    o_pInfo->dwSubtitlesFileAddress = pThis->m_cfiInfo.dwSubtitlesFileAddress;
  425. // Robin_1003_2004_E
  426.    o_pInfo->dwSubtitlesFileSize = pThis->m_cfiInfo.dwSubtitlesFileSize;
  427. #endif
  428. // >>> Robin_0903_2004
  429. #endif
  430. return;
  431. }
  432. UINT8 Clip_getPresentationTime(UINT16 hInstance)
  433. {
  434. const Clip *pThis= _Clip_fromInstance(hInstance);
  435. ASSERT(NULL != pThis)
  436. if (NULL != (pThis->m_pConstAttr)->m_pPresentationTime)
  437. return (*(pThis->m_pConstAttr)->m_pPresentationTime);
  438. return 0;
  439. }
  440. enClipImageOrientation Clip_getOrientation(UINT16 hInstance)
  441. {
  442. const Clip *pThis= _Clip_fromInstance(hInstance);
  443. ASSERT(NULL != pThis)
  444. return (enClipImageOrientation)(pThis->m_presentationInfo).eImageOrientation;
  445. }
  446. void Clip_setOrientation(UINT16 hInstance, enClipImageOrientation eOrientation)
  447. {
  448. Clip *pThis= _Clip_fromInstance(hInstance);
  449. ASSERT(NULL != pThis)
  450. (pThis->m_presentationInfo).eImageOrientation= eOrientation;
  451. _ClipsRepository_commit(hInstance, pThis);
  452. return;
  453. }
  454. enClipTransitionEffect Clip_getTransitionEffect(UINT16 hInstance)
  455. {
  456. const Clip *pThis= _Clip_fromInstance(hInstance);
  457. ASSERT(NULL != pThis)
  458. return (enClipTransitionEffect)(pThis->m_presentationInfo).eTransitionEffect;
  459. }
  460. void Clip_setTransitionEffect(UINT16 hInstance, enClipTransitionEffect eTransitionEffect)
  461. {
  462. Clip *pThis= _Clip_fromInstance(hInstance);
  463. ASSERT(NULL != pThis)
  464. (pThis->m_presentationInfo).eTransitionEffect= eTransitionEffect;
  465. _ClipsRepository_commit(hInstance, (const Clip*)pThis);
  466. return;
  467. }
  468. BOOL Clip_getExtendedInfo(UINT16 hInstance,  WORD i_pExtInfo_sc_handle)
  469. {
  470. const Clip *pThis= _Clip_fromInstance(hInstance);
  471. ASSERT(NULL != pThis)
  472. return (*(pThis->m_pConstAttr->m_vtable).m_pfGetExtendedInfo)(pThis, i_pExtInfo_sc_handle);
  473. }
  474. BOOL Clip_startPlayback(UINT16 hInstance, const ClipMarker *i_pResumeMarker,
  475. BOOL bCacheOnly)
  476. {
  477. BOOL bSuccess;
  478. Clip *pThis= _Clip_fromInstance(hInstance);
  479. ASSERT(NULL != pThis)
  480. bSuccess= (*(pThis->m_pConstAttr->m_vtable).m_pfPlay)(pThis, i_pResumeMarker, bCacheOnly);
  481. if ((pThis->m_presentationInfo).bModified) {
  482. (pThis->m_presentationInfo).bModified= FALSE;
  483. _ClipsRepository_commit(hInstance, pThis);
  484. }
  485. return bSuccess;
  486. }
  487. void Clip_pausePlayback(UINT16 hInstance, BOOL bEnable)
  488. {
  489. Clip *pThis= _Clip_fromInstance(hInstance);
  490. ASSERT(NULL != pThis)
  491. (*(pThis->m_pConstAttr->m_vtable).m_pfPause)(pThis, bEnable);
  492. if ((pThis->m_presentationInfo).bModified) {
  493. (pThis->m_presentationInfo).bModified= FALSE;
  494. _ClipsRepository_commit(hInstance, pThis);
  495. }
  496. return;
  497. }
  498. enClipStatus Clip_getStatus(UINT16 hInstance)
  499. {
  500. const Clip *pThis= _Clip_fromInstance(hInstance);
  501. ASSERT(NULL != pThis)
  502. return (*(pThis->m_pConstAttr->m_vtable).m_pfGetStatus)(pThis);
  503. }
  504. void Clip_abortPlayback(UINT16 hInstance, BOOL bMaintainStandby)
  505. {
  506. Clip *pThis= _Clip_fromInstance(hInstance);
  507. ASSERT(NULL != pThis)
  508. (*(pThis->m_pConstAttr->m_vtable).m_pfAbort)(pThis, bMaintainStandby);
  509. if ((pThis->m_presentationInfo).bModified) {
  510. (pThis->m_presentationInfo).bModified= FALSE;
  511. _ClipsRepository_commit(hInstance, pThis);
  512. }
  513. return;
  514. }
  515. void Clip_recordMarker(UINT16 hInstance, ClipMarker *o_pMarker)
  516. {
  517. const Clip *pThis= _Clip_fromInstance(hInstance);
  518. ASSERT(NULL != pThis)
  519. (*(pThis->m_pConstAttr->m_vtable).m_pfRecordMarker)(pThis, o_pMarker);
  520. return;
  521. }
  522. void Clip_refresh(UINT16 hInstance)
  523. {
  524. Clip *pThis= _Clip_fromInstance(hInstance);
  525. ASSERT(NULL != pThis)
  526. (*(pThis->m_pConstAttr->m_vtable).m_pfRefresh)(pThis);
  527. if ((pThis->m_presentationInfo).bModified) {
  528. (pThis->m_presentationInfo).bModified= FALSE;
  529. _ClipsRepository_commit(hInstance, pThis);
  530. }
  531. return;
  532. }
  533. UINT16 Clip_getTime(UINT16 hInstance)
  534. {
  535. const Clip *pThis= _Clip_fromInstance(hInstance);
  536. ASSERT(NULL != pThis)
  537. return (*(pThis->m_pConstAttr->m_vtable).m_pfGetTime)(pThis);
  538. }
  539. void Clip_digest(UINT16 hInstance)
  540. {
  541. Clip *pThis= _Clip_fromInstance(hInstance);
  542. ASSERT(NULL != pThis)
  543. (*(pThis->m_pConstAttr->m_vtable).m_pfDigest)(pThis);
  544. if ((pThis->m_presentationInfo).bModified) {
  545. (pThis->m_presentationInfo).bModified= FALSE;
  546. _ClipsRepository_commit(hInstance, pThis);
  547. }
  548. return;
  549. }
  550. void Clip_Scan(UINT16 hInstance, int iScanSpeed)
  551. {
  552. Clip *pThis = _Clip_fromInstance(hInstance);
  553. ASSERT(NULL != pThis )
  554. return (*(pThis->m_pConstAttr->m_vtable).m_pfClipScan)(pThis, iScanSpeed);
  555. }