⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xfile.h

📁 本程序为ST公司开发的源代码
💻 H
字号:
/************************************************** * * xfile.h * * CVS ID:   $Id: xfile.h,v 1.76 2007/08/29 07:20:18 belardi Exp $ * Author:   Ondrej Trubac [OT] - STM * Date:     $Date: 2007/08/29 07:20:18 $ * Revision: $Revision: 1.76 $ * * Description: * * *************************************************** * * COPYRIGHT (C) ST Microelectronics  2005 *            All Rights Reserved * * *************************************************** * STM CVS Log: * * $Log: xfile.h,v $ * Revision 1.76  2007/08/29 07:20:18  belardi * Changed absolute value to #define * * Revision 1.75  2007/08/02 13:35:36  sedmik * added func prototype XAR_PlayableFilesInDir * * Revision 1.74  2007/07/05 07:57:43  belardi * Modifications to support ID3 selection * - increased XSONG_INFO_TAGS to store both v1 and v2 with new TrackNo field * * Revision 1.73  2007/06/29 13:18:28  belardi * Added support for Track Number in ID3 v1.1 and v2.x * * Revision 1.72  2007/02/08 16:04:50  trubac * Optimization of song indexing * * Revision 1.71  2007/02/08 13:24:52  belardi * Changed wrong definition of t_NodeType for the HAVE_EXTERNAL_XARRAY=0 * * Revision 1.70  2007/01/24 16:47:53  trubac * Filesystem supports 15000 files * String reverse page offset is in nodetype.b[1] * * Revision 1.69  2007/01/18 15:01:31  trubac * Preparation for 15000 files * * Revision 1.68  2006/12/18 16:29:09  belardi * Added funciton prototype for Create_SongIndexes * * Revision 1.67  2006/12/12 19:17:22  trubac * change of uin16 to int32 of directory parsing offset * * Revision 1.66  2006/11/15 15:02:01  trubac * PreviousSong selects only playable files * * Revision 1.65  2006/11/10 15:10:50  belardi * Changes to compile for APM: STM code uses xfile.address field for quick song numbering. * APM does not need it, so it is removed to avoid some functions from possibly using it unitinialized * * Revision 1.64  2006/11/07 13:43:02  belardi * Added function prototype * * Revision 1.63  2006/10/31 14:14:19  chlapik * support for Layer I & II: * - Layer type, sample rate and channel number are determined by BitrateParser before playback * - mp3 decoder checks if these parameters found in valid header matches, if not scan bitstream per bytes * * Revision 1.62  2006/10/20 12:34:28  belardi * Added XAR_ReallocateROC() to remove compiler warning * * Revision 1.61  2006/10/18 09:54:56  trubac * bug fix for no external X_array * * Revision 1.60  2006/10/17 10:01:57  trubac * TOC info at top of X_array * * Revision 1.59  2006/10/09 12:51:36  trubac * Bitrate parser extensions, more info in song info * * Revision 1.58  2006/10/05 14:42:46  belardi * -Re-inserted CVS log in header * * Revision 1.57  2006/10/5 7:31:9  trubac * Implementing TOC info at the end of string pool, slight RB changes adaptations * * Revision 1.56  2006/09/26 09:32:47  belardi * Added include to remove compiler warning * * Revision 1.55  2006/09/20 16:09:56  belardi * Re-introduced t_XTrack removed by mistake for !HAVE_EXTERNAL_XARRAY * * Revision 1.54  2006/09/15 19:51:13  belardi * Merged the m8_cav2_cm80506_cs3563. * - renamed X_LAST_ITEM * - removed unused functions (already commented out) * - removed APM-specific navigation functions * * ***************************************************/#ifndef DEFINE_XFILE_H#define DEFINE_XFILE_H#include "accordoptypes.h"#include "apdevsys.h"//#include "filesys.h"#include "gendef.h" // [OK] for LBA_UNION#include "controller.h" // [OK] t_child_cmd_event#ifdef APM_PICKUP#include "ssong.h"#include "unicode.h"#else#include "audio_support.h"#endif#include "tag_defs.h"           //[LL] id3tag_defs.h moved#include "xdefines.h"#ifndef APM_PICKUP#define XARREM  1#endif#define X_SAFE_LIST_LENGTH 10#define XFILE_FLAG_EOF 1#define XFILE_FLAG_READ_ERROR 2#define XFILE_FLAG_EOF_NEXT 4#define XFILE_FLAG_FSEOF 8#define FLAG_VOLUME_VALID 1//#define FLAG_VOLUME_TOC_UNKNOWN 2#define FLAG_VOLUME_INACTIVE 2//M.Ch.#define UPDATE_LBA        0x02#define UPDATE_EXTEND     0x04#define UPDATE_SIZE       0x08#define UPDATE_UDF_FLAGS  0x10#define XTR_FLAG_PREEMPHASES    (1 << 0)#define XTR_FLAG_STARTSESSION   (1 << 1)#define XTR_FLAG_FSINVALID      (1 << 2)#if (1 == HAVE_EXTERNAL_XARRAY)typedef union{    uint16  i;    uint8   b[2];}t_ExNodeType;#elsetypedef union{    uint8   i;    uint8   b[1];}t_ExNodeType;#endiftypedef t_ExNodeType t_NodeType;typedef enum{  FILE_NAME,   /* file name */  DIR_NAME,    /* current directory name */  SONG_TITLE,  /* song title (ID3, WMA or CD-Text) */  ALBUM_TITLE, /* artist (ID3, WMA or CD-Text) */  ARTIST,      /* album title (ID3 or CD-Text) */  GENRE,       /* genre (ID3) */  BIT_RATE,    /* bit rate */  YEAR,  COMMENT,  TRACK_NO,    /* only for ID3 */  CONTENT} t_SongTagType;#if (1 == HAVE_EXTERNAL_XARRAY)typedef __packed struct{  uint32 size;      // same position as t_XTrack  uint32 lba;       // same position as t_XTrack  uint16 name;      // same position as t_XTrack#ifndef APM_PICKUP  uint16 address;	// [RB] this field is improperly used by STM player for quick song index calculation                    // [RB] and initialized in STM-only functions.                    // [RB] removed from APM code to make sure it is not unsed uninitialized#endif  uint16 next_extent;    //M.Ch.}t_XFile;typedef __packed struct{  uint32 size;      // same position as t_XFile  uint32 lba;       // same position as t_XFile  uint16 name;      // same position as t_XFile  uint8  trtype;  uint8  flags;}t_XTrack;typedef __packed struct{  uint32 lba;  uint16 name;  uint16 parent;  uint16 child;  uint16 first_file;  uint16 address;}t_XDir;typedef __packed struct{ // uint32 partitionLBA;  uint32 pool_top;  uint16 name;  uint16 nodes_num;  uint16 nextfree_item;  uint16 fs_type;  //uint16 pool_top;  //uint16 devtype;}t_XVolume;#elsetypedef __packed struct{  uint32 size;  uint16 address;  uint16 name;  uint16 lba_lsp;  uint16 next_extent;    //M.Ch.  uint8 lba_msp;}t_XFile;typedef __packed struct{  uint16 name;  uint16 parent;  uint16 child;  uint16 first_file;  uint16 address;  uint16 lba_lsp;  uint8 lba_msp;}t_XDir;typedef __packed struct{  //uint32 partitionLBA;  uint32 pool_top;  uint16 name;  uint16 nodes_num;  uint16 nextfree_item;  //uint16 pool_top;  uint8 fs_type;  //uint8 devtype;  device embedded in node type}t_XVolume;typedef __packed struct{  uint32 size;      // same position as t_XFile  uint32 lba;       // same position as t_XFile  uint16 name;      // same position as t_XFile, [OT] commented no use for name of track  uint8  trtype;  uint8  flags;  }t_XTrack;#endif      // HAVE_EXTERNAL_XARRAY// make shure that struct is always correctly alligned // in external memorytypedef struct	{  uint32 toc_cddb_discid;  uint32 toc_crc32_discid;  uint32 cddb_discid;  uint32 crc32_discid;  uint32 leadoutlba;  uint16 CDinfo;  uint16  min_track;  uint16  max_track;}t_XBTOC;typedef struct{  union  {    t_XFile xfile;    t_XDir xdir;    t_XVolume xvolume;    t_XTrack xtrack;  } data;  t_NodeType nodetype;}t_XNode;/* The TAG text encodings, keeps convention used in ID3v2 frames. *//* MR: should be part of id3tag.h.*/typedef enum{  TEXT_ENCODING_ISO_8859_1 = 0x00,  /* ISO-8859-1, terminated with 0x00. */  TEXT_ENCODING_UTF_16     = 0x01,  /* UTF-16 encoded Unicode with BOM, terminated with 0x00. */  TEXT_ENCODING_UTF_16BE   = 0x02,  /* UTF-16BE encoded Unicode without BOM, terminated with 0x00. */  TEXT_ENCODING_UTF_8      = 0x03,  /* UTF-8 encoded Unicode, terminated with 0x00. */  TEXT_ENCODING_UTF_16LE,			// this is not used in ID3  TEXT_ENCODING_SJIS				// this is not used in ID3} t_TextEncoding;typedef struct{  int16         string_offset;  /* offset to pascal string */  t_SongTagType info_type; /* type of song tag info */  t_TextEncoding   enc_of_src;     /* encoding of the original tag string, stored tag string is UTF-8. */  uint8         tag_version;} t_InfoTag;#define XSONG_INFO_TAGS  15 // [RB] worst case: 8 v2.4 tags + 7 v1.1 tagstypedef struct{  t_XItem xid;    /* x-file index */  uint16 song_number;  t_XNodeType type;   /* x-file type (MP3, WMA, 

⌨️ 快捷键说明

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