- //<<<Sean_1213_2004
- /****************************************************************************************
- * Copyright (c) 2000 ZORAN Corporation, All Rights Reserved
- * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF ZORAN CORPORATION
- *
- * File: $Workfile: WMA.h $
- *
- * Description:
- * ============
- * Management of WMA Clips
- *
- * Log:
- * ====
- ****************************************************************************************
- * Updates:
- ****************************************************************************************
- * 2004/09/05 : created by SeanLiu to support Vorbis OGG bitstream.
- *
- ****************************************************************************************/
- #include "Config.h" // Global Configuration - do not remove!
- #ifdef IS_OGG_VORBIS_CAPABLE
- #ifndef __OGG_H_
- #define __OGG_H_
- #include "IncludeSysDefs.h"
- #include "PlaycoreFileSysFileSystem.h"
- #define OGG_HEADER_TAG_SIZE 6
- #define OGG_HEADER_TAG "vorbis"
- #define VORBIS_COMMENT_TITLE_TAG "TITLE="
- #define VORBIS_COMMENT_TITLE_LEN 6
- #define VORBIS_COMMENT_ALBUM_TAG "ALBUM="
- #define VORBIS_COMMENT_ALBUM_LEN 6
- #define VORBIS_COMMENT_TRACKNUMBER_TAG "TRACKNUMBER="
- #define VORBIS_COMMENT_TRACKNUMBER_LEN 12
- #define VORBIS_COMMENT_ARTIST_TAG "ARTIST="
- #define VORBIS_COMMENT_ARTIST_LEN 7
- #define VORBIS_COMMENT_COPYRIGHT_TAG "COPYRIGHT="
- #define VORBIS_COMMENT_COPYRIGHT_LEN 10
- #define VORBIS_COMMENT_DESCRIPTION_TAG "DESCRIPTION="
- #define VORBIS_COMMENT_DESCRIPTION_LEN 12
- #define VORBIS_COMMENT_GENRE_TAG "GENRE="
- #define VORBIS_COMMENT_GENRE_LEN 6
- #define VORBIS_COMMENT_MAX_LEN 12
- #define GET_MINIMUM(x,y) ((x > y) ? y : x)
- #define OGG_PACKET_TYPE_IDENTIFICATION 0x01
- #define OGG_PACKET_TYPE_COMMENT 0x03
- #define OGG_PACKET_TYPE_SETUP 0x05
- typedef BYTE OGG_PACKET_TYPE;
- typedef struct {
- UINT32 vorbis_version;
- UINT8 audio_channels;
- UINT32 audio_sample_rate;
- UINT32 bitrate_maximum;
- UINT32 bitrate_nominal;
- UINT32 bitrate_minimum;
- UINT16 blocksize_0:4;
- UINT16 blocksize_1:4;
- UINT16 framing_flag:1;
- } VORBIS_OGG_IDENTIFICATION_HEADER;
- #define OGG_TEXT_LENGTH 32
- typedef struct
- {
- WCHAR szTitle[OGG_TEXT_LENGTH+1];
- WCHAR szArtist[OGG_TEXT_LENGTH+1];
- WCHAR szAlbum[OGG_TEXT_LENGTH+1];
- WCHAR szCopyright[OGG_TEXT_LENGTH+1];
- WCHAR szDescription[OGG_TEXT_LENGTH+1];
- WCHAR szGenre[OGG_TEXT_LENGTH+1];
- } OGG_ExtendInfo;
- /////////////////////////////////////////////////////////////////////////////
- // Public Services
- void OGG_setPresentationTime(UINT8 uPresentationTime);
- BOOL OGG_GetOGGInfo(DWORD dwClipStartAddr, WORD i_pExtInfo_sc_handle);
- /////////////////////////////////////////////////////////////////////////////
- // OGG Clip
- /////////////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////////////
- // Public Services
- BOOL OGGClip_isKindOf(LPCWSTR i_pszFilename);
- void OGGClip_construct(struct Clip_TAG *o_pThis, const FindData *i_pFileInfo);
- #endif //__OGG_H_
- #endif //IS_OGG_VORBIS_CAPABLE
- //<<<Sean_1213_2004