Clip.h
上传用户:super_houu
上传日期:2008-09-21
资源大小:4099k
文件大小:8k
- /****************************************************************************************
- * Copyright (c) 2002 ZORAN Corporation, All Rights Reserved
- * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF ZORAN CORPORATION
- *
- * File: $Workfile: Clip.h $
- *
- * Description:
- * ============
- *
- *
- * Log:
- * ====
- * $Revision: 11 $
- * Last Modified by $Author: Terencet $ at $Modtime: 4/02/04 9:59a $
- ****************************************************************************************
- * Updates:
- ****************************************************************************************
- * $Log: /I76/I76_Common/I76_Reference/Playcore/Nav_Clips/Clip.h $
- *
- * 11 4/02/04 10:02a Terencet
- * add one transition effect for JPEG: vertical blind up
- *
- * 9 03-03-04 11:34 Jerryc
- * jerry cai, merge new nav clips lib
- *
- * 8 03-02-19 17:35 Victorwu
- *
- * 7 03-02-08 0:34 Leslie
- * Add MANUAL_DIRECTORY_EXPLORER
- *
- * 6 03-02-06 14:22 Leslie
- * Add clip attribute eSlowable
- *
- * 5 03-01-30 0:11 Leslie
- * Add uClipNumer in ClipMarker type
- *
- * 4 03-01-28 18:43 Leslie
- *
- * 3 03-01-10 12:21 Leslie
- * Add wide-character strings support
- *
- * 2 03-01-09 12:30 Leslie
- *
- * 1 10/30/02 18:05 Rond
- *
- * 1 11/09/02 15:48 Atai
- *
- * 3 13/08/02 13:47 Nirm
- * - Clip_isFinished() replaced by Clip_getStatus().
- *
- * 2 2/08/02 19:47 Nirm
- * - Added Caching capability.
- *
- * 1 30/07/02 18:39 Nirm
- ****************************************************************************************/
- #include "Config.h" // Global Configuration - do not remove!
- #ifndef __CLIP_H_
- #define __CLIP_H_
- #include "IncludeSysDefs.h"
- #include "PlaycoreFileSysFileSystem.h"
- /////////////////////////////////////////////////////////////////////////////
- // Clips Repository
- /////////////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////////////
- // Public Services
- BOOL ClipsRepository_construct(UINT16 uMaxClipsCnt);
- void ClipsRepository_destruct(void);
- void ClipsRepository_empty(void);
- UINT16 ClipsRepository_getSize(void);
- void ClipsRepository_setTypeFilter(UINT16 uTypeFilter);
- UINT16 ClipsRepository_addClip(const FindData *i_pFileInfo);
- UINT16 ClipsRepository_getInstanceAt(UINT16 uPos);
- /////////////////////////////////////////////////////////////////////////////
- // Clip
- /////////////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////////////
- // Constants and Enumerations
- #define LOGICAL_BLOCK_SIZE 2048
- #ifndef CLIPS_USE_LONG_FILENAMES
- #undef CLIPS_MAX_DIRNAME_LEN
- #undef CLIPS_MAX_FILENAME_LEN
- #define CLIPS_MAX_DIRNAME_LEN 8
- #define CLIPS_MAX_FILENAME_LEN 8
- #endif //CLIPS_USE_LONG_FILENAMES
- #define INFINITE_PRESENTATION_TIME 0xFF
- typedef enum {
- eClipType_None = 0x00,
- eClipType_MP2 = 0x01, // MPEG-1, Layer-II Audio
- eClipType_MP3 = 0x02, // MPEG-1 or MPEG-2, Layer-III Audio
- eClipType_WMA = 0x04, // WindowsMedia(tm) Audio
- eClipType_JPEG = 0x08, // JPEG Image
- eClipType_MPEG = 0x10, // MPEG-1 or MPEG-2 Audio/Video clips
- eClipType_AVI = 0x20, // AVI format
- eClipType_DIR = 0x40, // Directory
- #ifdef IS_OGG_VORBIS_CAPABLE
- eClipType_OGG = 0x80, // OGG format
- #endif
- #ifdef IS_ASF_CAPABLE
- eClipType_ASF = 0x100, // ASF fileformat // Robin_0818_2004, first merge MPEG4 code
- #endif
- #ifdef IS_MP4_CAPABLE
- eClipType_MP4 = 0x200, // MP4 fileformat // Robin_0818_2004, first merge MPEG4 code
- #endif
- } enClipType;
- typedef enum {
- eCA_None = 0x00, // No special Attributes
- eCA_Cacheable = 0x01, // Supports Cached playback
- eCA_Zoomable = 0x02, // Zoom can be applied
- eCA_Markable = 0x04, // Markers can be recorded
- eCA_Digestable = 0x08, // May be Digested
- eCA_StillImage = 0x10, // Consists of a Still Image
- eCA_Scanable = 0x20, // Scan can be applied
- eCA_Slowable = 0x40, // Slow operation is avaliable
- } enClipAttribute;
- typedef enum {
- eCS_Idle,
- eCS_Busy,
- eCS_Finished,
- eCS_Error_UnsupportedFormat,
- eCS_Error_Decoding
- } enClipStatus;
- #ifndef D_ENABLE_JPEG_MIRROR_ROTATION
- typedef enum {
- eCIO_Original = 0,
- eCIO_Rotate90Deg,
- eCIO_Rotate180Deg,
- eCIO_Rotate270Deg,
- eCIO_OrientationCnt
- } enClipImageOrientation;
- #else
- typedef enum {
- eCIO_Original = 0,
- eCIO_HorizontalMirror,
- eCIO_HVMirror,
- eCIO_VerticalMirror,
- eCIO_OrientationCnt
- } enClipImageOrientation;
- #endif
- typedef enum {
- eCTE_None = 0,
- eCTE_TopToBottom,
- eCTE_BottomToTop,
- eCTE_TopBottomToCenter,
- eCTE_CenterToTopBottom,
- eCTE_VerticalBlindDown,
- eCTE_VerticalBlindUp,
- eCTE_Random,
- eCTE_TransitionEffectsCnt
- } enClipTransitionEffect;
- /////////////////////////////////////////////////////////////////////////////
- // Macros
- #define VIRTUAL
- /////////////////////////////////////////////////////////////////////////////
- // Forward Declarations of Structures
- struct Clip_TAG;
- /////////////////////////////////////////////////////////////////////////////
- // Common Structures
- typedef struct ClipInfo_TAG {
- // Clip-Type
-
- enClipType eType;
- // Path information
- WCHAR szDirectoryName[1+CLIPS_MAX_DIRNAME_LEN];
- // File-Name, Location, and Size (Bytes)
- WCHAR szFilename[1+CLIPS_MAX_FILENAME_LEN];
- DWORD dwFileLocation;
- ULONG cbFileSize;
- // Robin_0715_2004, merge changelist #24166
- #ifdef USE_AUX_SUBTITLES
- // <<< Robin_0903_2004
- #ifdef DIVX_SUPPORT_MULTI_SUBTITLE
- WORD wSubFileIndex;
- WORD wSubFileCnt;
- #else
- DWORD dwSubtitlesFileAddress;
- // Robin_1003_2004_E
- DWORD dwSubtitlesFileSize;
- #endif
- // >>> Robin_0903_2004
- #endif
- } ClipInfo;
- typedef struct CurrClipInfo_TAG {
- // Clip-Type
- enClipType eType;
- #if defined(MANUAL_DIRECTORY_EXPLORER) // JohnD_0606_2005_A:
- // Path information
- WCHAR szDirectoryName[1+CLIPS_MAX_DIRNAME_LEN];
- // File-Name, Location, and Size (Bytes)
- WCHAR szFilename[1+CLIPS_MAX_FILENAME_LEN];
- #endif
- DWORD dwFileLocation;
- ULONG cbFileSize;
- // Robin_0715_2004, merge changelist #24166
- #ifdef USE_AUX_SUBTITLES
- // <<< Robin_0903_2004
- #ifdef DIVX_SUPPORT_MULTI_SUBTITLE
- WORD wSubFileIndex;
- WORD wSubFileCnt;
- #else
- DWORD dwSubtitlesFileAddress;
- // Robin_1003_2004_E
- DWORD dwSubtitlesFileSize;
- #endif
- // >>> Robin_0903_2004
- #endif
- } CurrClipInfo;
- typedef struct ClipMarker_TAG {
- DWORD dwAddress;
- UINT16 uTime;
- UINT16 uClipNumer;
- } ClipMarker;
- /////////////////////////////////////////////////////////////////////////////
- // Public Services
- void Clip_setPresentationTime(enClipType eType, UINT8 uPresentationTime);
- void Clip_beforeStop(UINT16 hInstance);
- void Clip_performErrorHandling(UINT16 hInstance);
- void Clip_continueScanning(void);
- void Clip_construct(struct Clip_TAG *o_pClip, const FindData *i_pFileInfo);
- enClipType Clip_getType(UINT16 hInstance);
- BOOL Clip_hasAttribute(UINT16 hInstance, enClipAttribute eAttr);
- void Clip_getFileInfo(UINT16 hInstance, ClipInfo *o_pInfo);
- void Clip_getCurrFileInfo(UINT16 hInstance, CurrClipInfo *o_pInfo);
- UINT8 Clip_getPresentationTime(UINT16 hInstance);
- enClipImageOrientation Clip_getOrientation(UINT16 hInstance);
- void Clip_setOrientation(UINT16 hInstance, enClipImageOrientation eOrientation);
- enClipTransitionEffect Clip_getTransitionEffect(UINT16 hInstance);
- void Clip_setTransitionEffect(UINT16 hInstance, enClipTransitionEffect eTransitionEffect);
- VIRTUAL BOOL Clip_getExtendedInfo(UINT16 hInstance, WORD i_pExtInfo_sc_handle);
- VIRTUAL BOOL Clip_startPlayback(UINT16 hInstance, const ClipMarker *i_pResumeMarker,
- BOOL bCacheOnly);
- VIRTUAL void Clip_pausePlayback(UINT16 hInstance, BOOL bEnable);
- VIRTUAL enClipStatus Clip_getStatus(UINT16 hInstance);
- VIRTUAL void Clip_abortPlayback(UINT16 hInstance, BOOL bMaintainStandby);
- VIRTUAL void Clip_recordMarker(UINT16 hInstance, ClipMarker *o_pMarker);
- VIRTUAL void Clip_refresh(UINT16 hInstance);
- VIRTUAL UINT16 Clip_getTime(UINT16 hInstance);
- VIRTUAL void Clip_digest(UINT16 hInstance);
- VIRTUAL void Clip_Scan(UINT16 hInstance, int iScanSpeed);
- void ClipsRepository_clear();
- #ifdef SUPPORT_FLASH_CARD
- extern UINT32 Clips_GetPSNOnFlashCard(UINT32 lsn);
- #endif
- #endif //__CLIP_H_