wmaudio.h

来自「ESS3890+SL原代码(1*16内存)」· C头文件 代码 · 共 288 行

H
288
字号
/* Copyright 1997, ESS Technology, Inc.                                 *//* SCCSID @(#)wmaudio.h	1.1 01/23/02 *//* Based on DVD code version  	1.11 10/12/01 */ #ifndef _WMAUDIO_API_H_#define _WMAUDIO_API_H_#define PACKED/* ........................................................................... * * Types and Constants * =================== */#define CHECK_NONSDMI_LIC	1#define CHECK_SDMI_LIC		2#define CHECK_ALL_LICENSE	3#define WMA_MAX_DATA_REQUESTED  128#define W_TITLE		0#define W_AUTHOR	1#define W_COPYRIGHT	2#define W_DESCRIPTION	3#define W_RATING	4#define STRING_SIZE	255enum {    ECD_STRING = 0,    ECD_BINARY = 1,    ECD_BOOL = 2,    ECD_DWORD = 3,    ECD_QWORD = 4,    ECD_WORD = 5};/* 8-bit signed type  */#ifndef _WMAU8_DEFINED#define _WMAU8_DEFINEDtypedef unsigned char tWMA_U8;#endif /* _WMAU8_DEFINED *//* 16-bit signed type  */#ifndef _WMAI16_DEFINED#define _WMAI16_DEFINEDtypedef short tWMA_I16;#endif /* _WMAI16_DEFINED *//* 16-bit unsigned type  */#ifndef _WMAU16_DEFINED#define _WMAU16_DEFINEDtypedef short tWMA_U16;#endif /* _WMAU16_DEFINED *//* 32-bit unsigned type  */#ifndef _WMAU32_DEFINED#define _WMAU32_DEFINEDtypedef unsigned int tWMA_U32;#endif /* _WMAU32_DEFINED */#ifndef _QWORD_DEFINED#define _QWORD_DEFINEDtypedef PACKED struct tQWORD{    tWMA_U32   dwLo;    tWMA_U32   dwHi;}   QWORD;#endif /* _QWORD_DEFINED *//* Bool */#ifndef _WMABool_DEFINED#define _WMABool_DEFINEDtypedef int tWMA_Bool;#endif /* _WMABool_DEFINED */#define DESC_NAME_MAX_LENGTH   64typedef struct _MarkerEntry {    QWORD   m_qOffset;    QWORD   m_qtime;    tWMA_U16    m_wEntryLen;    tWMA_U32   m_dwSendTime;    tWMA_U32   m_dwFlags;    tWMA_U32   m_dwDescLen;    tWMA_U16   m_pwDescName[DESC_NAME_MAX_LENGTH];} MarkerEntry;#define ECD_DISCRIPTOR_MAX	3typedef struct _ECD_DESCRIPTOR {    tWMA_U16         cbName;    tWMA_U16     *pwszName;    tWMA_U16         data_type;    tWMA_U16         cbValue;    union {        tWMA_U8 *pbBinary;        tWMA_U16 *pwszString;        tWMA_Bool *pfBool;        tWMA_U32 *pdwDword;        tWMA_U16  *pwWord;    } uValue;} ECD_DESCRIPTOR;typedef struct tagWMAExtendedContentDescription{    tWMA_U16 cDescriptors;             /* number of descriptors */    ECD_DESCRIPTOR pDescriptors[ECD_DISCRIPTOR_MAX];  /* pointer to all the descriptors */} tWMAExtendedContentDesc;#define COMMAND_ENTRY_MAX	4typedef struct _CommandEntry {    tWMA_U32        time;    tWMA_U16        type;    tWMA_U8         *param;} CommandEntry;typedef struct tagWMFScriptCommand {    tWMA_U16 num_commands;      /* number of script commands*/    tWMA_U16 num_types;         /* number of types of commands*/    tWMA_U8 *type_names;     /* command names, URL, FILENAME, CAPTION, etc*/    int type_name_len;     /* length of the command name*/    int command_param_len; /* length of command parameters*/    CommandEntry commands[COMMAND_ENTRY_MAX]; /* pointer to all the commands*/} WMFScriptCommand;/* status */#ifndef _WMAFILESTATUS_DEFINED#define _WMAFILESTATUS_DEFINEDtypedef enum tagWMAFileStatus{    cWMA_NoErr,                 /* -> always first entry */                                /* remaining entry order is not guaranteed */    cWMA_Failed,    cWMA_BadArgument,    cWMA_BadAsfHeader,    cWMA_BadPacketHeader,    cWMA_BrokenFrame,    cWMA_NoMoreFrames,    cWMA_BadSamplingRate,    cWMA_BadNumberOfChannels,    cWMA_BadVersionNumber,    cWMA_BadWeightingMode,    cWMA_BadPacketization,    cWMA_BadDRMType,    cWMA_DRMFailed,    cWMA_DRMUnsupported,    cWMA_DemoExpired,    cWMA_BadState,    cWMA_Internal,               /* really bad */	cWMA_NoMoreDataThisTime} tWMAFileStatus;#endif /* _WMAFILESTATUS_DEFINED *//* versions */#ifndef _WMAFILEVERSION_DEFINED#define _WMAFILEVERSION_DEFINEDtypedef enum tagWMAFileVersion{    cWMA_V1 = 1,    cWMA_V2 = 2} tWMAFileVersion;#endif /* _WMAFILEVERSION_DEFINED *//* sample rates */#ifndef _WMAFILESAMPLERATE_DEFINED#define _WMAFILESAMPLERATE_DEFINEDtypedef enum tagWMAFileSampleRate{    cWMA_SR_48kHz,    cWMA_SR_44_1kHz,    cWMA_SR_32kHz,    cWMA_SR_22_05kHz,    cWMA_SR_16kHz,    cWMA_SR_11_025kHz,    cWMA_SR_08kHz} tWMAFileSampleRate;#endif /* _WMAFILESAMPLERATE_DEFINED *//* channels */#ifndef _WMAFILECHANNELS_DEFINED#define _WMAFILECHANNELS_DEFINEDtypedef enum tagWMAFileChannels{    cWMA_C_Mono = 1,    cWMA_C_Stereo = 2} tWMAFileChannels;#endif /* _WMAFILECHANNELS_DEFINED *//* ........................................................................... * * Structures * ========== *//* header */#ifndef _WMAFILEHEADER_DEFINED#define _WMAFILEHEADER_DEFINEDtypedef PACKED struct tagWMAFileHeader{    tWMAFileVersion version;         /* version of the codec */    tWMAFileSampleRate sample_rate;  /* sampling rate */    tWMAFileChannels num_channels;   /* number of audio channels */    tWMA_U32 duration;               /* of the file in milliseconds */    tWMA_U32 packet_size;            /* size of an ASF packet */    tWMA_U32 first_packet_offset;    /* byte offset to the first ASF packet */    tWMA_U32 last_packet_offset;     /* byte offset to the last ASF packet */    tWMA_U32 has_DRM;                /* does it have DRM encryption? */     tWMA_U32 LicenseLength;          /* License Length in the header */    tWMA_U32 bitrate;                /* bit-rate of the WMA bitstream */    /* HongCho: what else? */} tWMAFileHeader;#endif /* _WMAFILEHEADER_DEFINED *//* content description */#ifndef _WMAFILECONTDESC_DEFINED#define _WMAFILECONTDESC_DEFINED#define	CONTENT_STRING	128typedef PACKED struct tagWMAFileContDesc{    /* *_len: as [in], they specify how large the corresponding     *        buffers below are.     *        as [out], they specify how large the returned     *        buffers actually are.     */    tWMA_U16 title_len;    tWMA_U16 author_len;    tWMA_U16 copyright_len;    tWMA_U16 description_len;   /* rarely used */    tWMA_U16 rating_len;        /* rarely used */    /* these are two-byte strings     *   for ASCII-type character set, to convert these     *   into a single-byte characters, simply skip     *   over every other bytes.     */    unsigned char pTitle[CONTENT_STRING+1];    unsigned char pAuthor[CONTENT_STRING+1];    unsigned char pCopyright[CONTENT_STRING+1];    unsigned char pDescription[CONTENT_STRING+1];    unsigned char pRating[CONTENT_STRING+1];} tWMAFileContDesc;#endif /* _WMAFILECONTDESC_DEFINED *//* license params */#ifndef _WMAFILELICPARAMS_DEFINED#define _WMAFILELICPARAMS_DEFINEDtypedef PACKED struct tagWMAFileLicParams{    unsigned char *pPMID;       /* portable media id */    tWMA_U32 cbPMID;            /* length of the pPMID buffer */} tWMAFileLicParams;#endif /* _WMAFILELICPARAMS_DEFINED */typedef void * tHWMAFileState;/* another internal state */#ifndef _WMAFILEHDRSTATE_DEFINED#define _WMAFILEHDRSTATE_DEFINEDtypedef PACKED struct tagWMAFileHdrState{    unsigned char internal[192];} tWMAFileHdrState;#endif /* _WMAFILEHDRSTATE_DEFINED */#endif /* _WMAUDIO_API_H_ */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?