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

📄 playlist.h

📁 本程序为ST公司开发的源代码
💻 H
字号:
/************************************************** * * playlist.h * * CVS ID:   $Id: playlist.h,v 1.21 2007/11/09 13:38:31 trubac Exp $ * Author:   Emanuela Zaccaria [EZ] - STM * Date:     $Date: 2007/11/09 13:38:31 $ * Revision: $Revision: 1.21 $ *  * Description: *  *   Main entry point for the playlist parsing. * *************************************************** *  * COPYRIGHT (C) ST Microelectronics  2005 *            All Rights Reserved * **************************************************** * * STM CVS Log: * * $Log: playlist.h,v $ * Revision 1.21  2007/11/09 13:38:31  trubac * Added checking of playlist item limit into PL_AddFile * * Revision 1.20  2007/10/26 11:56:52  belardi * removed debug option * * Revision 1.19  2007/09/27 12:26:00  belardi * Configure GestGuess from configuration option * * Revision 1.18  2007/09/21 05:25:54  hara * Initial implementation for WMDRM feature into A+. * * Revision 1.17  2007/02/21 10:13:14  trubac * Playlist compares file names stored without extension * * Revision 1.16  2007/02/16 13:44:58  belardi * Changed uint16 to t_duid to remove compiler warning * * Revision 1.15  2007/02/13 11:02:24  sedmik * new bitarray related to palylist shuffle * * Revision 1.14  2006/12/07 13:19:24  trubac * relative indexing of playlist items, pls processing improved "..\" * * Revision 1.13  2006/12/01 17:38:58  trubac * Improved parsing for various text encodings * * Revision 1.12  2006/12/01 16:04:53  trubac * Improved parsing for various text encodings * * Revision 1.11  2006/11/07 18:57:54  sedmik * func prototypes changes * * Revision 1.10  2006/09/28 11:50:20  zaccaria * Define value modified. * * Revision 1.9  2006/09/25 13:21:04  zaccaria * shrink4pls prototype modified * * Revision 1.8  2006/09/18 09:55:21  belardi * Corrected CVS keyword usage * * Revision 1.7  2006/09/18 09:22:36  belardi * Added Log CVS keyword into file header * * Revision 1.6  2006/09/15 20:17:25  belardi * Added Log CVS keyword into file header * * ***************************************************/#ifndef _PLAYLIST_H_#define _PLAYLIST_H_#define UPPER_CASE(c) ((c>96)&&(c<123)) ? (c-32) : c //#define PL_printf(a) printf(a);#define PL_printf(a) ;#define MAX_PLAYLIST_ITEMS  256//added 7/8 to be sure we still fit with less than 8#define PLAYLIST_TRACKS_MARKS_BUFFER_SIZE (MAX_PLAYLIST_ITEMS + 7) / (8 * sizeof(uint8))//playlist processing transitions#define PLR_STOP_PLAYBACK               0#define PLT_STOP_PLAYBACK_CHECK         1#define PLR_PLAYLIST_INIT               2#define PLR_PLAYLIST_READ_DATA			3#define PLR_PLAYLIST_WAIT_DATA_READY    4#define PLR_PLAYLIST_CHECK_ENCODING		5#define PLR_PLAYLIST_CHECK_FULL_LINE	6#define PLR_PLAYLIST_PARSE_M3U			7#define PLR_PLAYLIST_PARSE_PLS			8#define PLR_PLAYLIST_PARSE_PATH			9#define PLR_PLAYLIST_PARSE_FILENAME		10#if (0 != HAVE_WMDRM)#define PLR_PLAYLIST_CHECK_OBJECTHANDLE 11#endif//state DONE#define PLR_PLAYLIST_DONE               20#define PLR_PLAYLIST_ERROR              21typedef struct {  t_bool  enabled;  t_bool  set;      //singals when playlist enabled, current playlist was already parsed  uint32  fileNr;  t_XItem xfile;  t_bool  parsed;  uint16  array_index;  uint16  prepared_array_index;     //used as result of song selection (forward/backward)                                    //on unforced song selection, array index cannot be changed at this time                                    //array index set from prepared_array_index after BOS  t_duid  device;  uint16  first_volume_node;  uint16  array_items;  t_XItem array[MAX_PLAYLIST_ITEMS];  uint8   shuffle_marks[PLAYLIST_TRACKS_MARKS_BUFFER_SIZE];   } t_player_playlist;// encoding signatures#define SIG_BE  0xFEFF#define SIG_LE  0xFFFE#define SIG_UTF8 0xEFBBBF#define SIG_SINGB 0x01#define SIG_UNKNOWN 0// configuration options#define BEST_GUESS_DISABLE    0x1f#define BEST_GUESS_NO_LIMITS  0x00typedef struct {    uint8 *buffer;    int read_stop;  // how many valid bytes are in buffer from beginning    int read_offset;  // how many bytes were before data in buffer    int pos;            // distance of current byte from beginning of buffer    int device;    int xfile;    int state_continue;    int encoding;    int fsize;    int eol_pos;    int nonchar_pos;    int cur_dir;    t_XItem orig_dir;    uint16 volume;    }t_pl_parser;        extern t_player_playlist player_playlist;extern t_pl_parser PL_parser;    int PL_GetChar(int *pos, uint8* buffer, int read_stop, int encoding);int PL_CheckEncoding(uint8* buffer,int read_pos, uint8* read_stop);    int PL_FindString(uint8* nstr, t_pl_parser *ps,int* pos, int stop_after);int PL_CompareStrings(t_pl_parser *ps,int stop,t_XItem xitem, t_XNodeType item_type  );//int PL_CompareFileName(t_pl_parser *ps,t_XItem file);int PL_IsDigit(int wch);GRESULT PL_AddFile(int xfile);#endif

⌨️ 快捷键说明

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