You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
(2) |
Apr
(4) |
May
(6) |
Jun
(56) |
Jul
(101) |
Aug
(14) |
Sep
|
Oct
(1) |
Nov
|
Dec
(40) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(66) |
Feb
(106) |
Mar
(1) |
Apr
(2) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
(10) |
Oct
(7) |
Nov
|
Dec
|
2008 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <ny...@us...> - 2007-02-18 07:53:05
|
Revision: 375 http://svn.sourceforge.net/pmplib/?rev=375&view=rev Author: nyaochi Date: 2007-02-17 23:53:06 -0800 (Sat, 17 Feb 2007) Log Message: ----------- Fixed the bug of database dump for pmp_iriverplus3. Modified Paths: -------------- trunk/pmplib/lib/pmp_iriverplus3/pmp_iriverplus3.c Modified: trunk/pmplib/lib/pmp_iriverplus3/pmp_iriverplus3.c =================================================================== --- trunk/pmplib/lib/pmp_iriverplus3/pmp_iriverplus3.c 2007-02-18 07:34:57 UTC (rev 374) +++ trunk/pmplib/lib/pmp_iriverplus3/pmp_iriverplus3.c 2007-02-18 07:53:06 UTC (rev 375) @@ -90,7 +90,6 @@ } pmp_internal_t; typedef struct { - ip3db_t ip3db; pmp_music_record_t* records; int num_records; ip3db_playlist_t* playlists; @@ -475,12 +474,13 @@ static uint32_t pmpmusic_open(pmp_music_t* music) { + ip3db_t ip3db; result_t ret = 0; pmp_t* pmp = music->pmp; pmp_music_internal_t* pmpmi = (pmp_music_internal_t*)music->instance; // Initialize IP3DB. - ip3db_init(&pmpmi->ip3db); + ip3db_init(&ip3db); // Free the existing records. pmplib_records_finish(pmpmi->records, pmpmi->num_records); @@ -495,20 +495,20 @@ // Read the music database. set_filenames(dat, dic, idx, pmp); - ret = ip3db_read(&pmpmi->ip3db, dat, dic, idx); + ret = ip3db_read(&ip3db, dat, dic, idx); if (ret) { goto exit_this; } // The number of music records. - pmpmi->num_records = ip3db_num_records(&pmpmi->ip3db); + pmpmi->num_records = ip3db_num_records(&ip3db); // Allocate an array of the records. pmpmi->records = (pmp_music_record_t*)malloc(sizeof(pmp_music_record_t) * pmpmi->num_records); // Convert IP3DB records to a pmp_music_record_t array. for (i = 0;i < pmpmi->num_records;++i) { - const ip3db_variant_t* src = (const ip3db_variant_t*)ip3db_get_record(&pmpmi->ip3db, i); + const ip3db_variant_t* src = (const ip3db_variant_t*)ip3db_get_record(&ip3db, i); pmp_music_record_t* dst = &pmpmi->records[i]; size_t length = 0; @@ -548,18 +548,19 @@ } exit_this: - ip3db_finish(&pmpmi->ip3db); + ip3db_finish(&ip3db); return ret; } static uint32_t pmpmusic_close(pmp_music_t* music) { + ip3db_t ip3db; result_t ret = 0; pmp_t* pmp = music->pmp; pmp_music_internal_t* pmpmi = (pmp_music_internal_t*)music->instance; // Initialize IP3DB. - ip3db_init(&pmpmi->ip3db); + ip3db_init(&ip3db); if (pmp->flag & PMPOF_MUSIC_DB_WRITE) { int i; @@ -574,7 +575,7 @@ const pmp_music_record_t* src = &pmpmi->records[i]; ip3db_variant_t* dst = records[i]; - ip3db_record_init(&pmpmi->ip3db, &records[i]); + ip3db_record_init(&ip3db, &records[i]); ip3db_variant_set_str(&dst[IP3DBF_MUSIC_FILEPATH], filepath_changeroot(src->filename, pmp->info.path_to_root)); filepath_remove_filespec(dst[IP3DBF_MUSIC_FILEPATH].value.str); filepath_addslash(dst[IP3DBF_MUSIC_FILEPATH].value.str); @@ -606,7 +607,7 @@ // Register records (and playlists) to the database. if (pmp->flag & PMPOF_MUSIC_PL_WRITE) { ip3db_set( - &pmpmi->ip3db, + &ip3db, (const ip3db_music_record_t*)records, pmpmi->num_records, pmpmi->playlists, @@ -614,7 +615,7 @@ ); } else { ip3db_set( - &pmpmi->ip3db, + &ip3db, (const ip3db_music_record_t*)records, pmpmi->num_records, NULL, @@ -624,16 +625,16 @@ // Write out the music database. set_filenames(dat, dic, idx, pmp); - ret = ip3db_write(&pmpmi->ip3db, dat, dic, idx); + ret = ip3db_write(&ip3db, dat, dic, idx); // Free IP3DB records. for (i = 0;i < pmpmi->num_records;++i) { - ip3db_record_finish(&pmpmi->ip3db, &records[i]); + ip3db_record_finish(&ip3db, &records[i]); } free(records); } - ip3db_finish(&pmpmi->ip3db); + ip3db_finish(&ip3db); return ret; } @@ -681,13 +682,28 @@ static result_t pmpmusic_dump(pmp_music_t* music, FILE *fp, int level) { - pmp_music_internal_t* pmpmi = (pmp_music_internal_t*)music->instance; - if (level > 0) { - return PMPERR_NOTIMPLIMENTED; - //return ip2db_repr(&pmpdbi->ip2db, fp); - } else { - return ip3db_dump(&pmpmi->ip3db, fp); + ip3db_t ip3db; + result_t ret = 0; + ucs2char_t dat[MAX_PATH], dic[MAX_PATH], idx[MAX_PATH]; + + // Initialize IP3DB. + ip3db_init(&ip3db); + + // Read the music database. + set_filenames(dat, dic, idx, music->pmp); + ret = ip3db_read(&ip3db, dat, dic, idx); + if (ret) { + goto exit_this; } + + ret = ip3db_dump(&ip3db, fp); + if (ret) { + goto exit_this; + } + +exit_this: + ip3db_finish(&ip3db); + return ret; } static result_t pmpmusic_set_playlists(pmp_music_t* music, const pmp_playlist_t* playlists, uint32_t num_playlists) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ny...@us...> - 2007-02-18 07:34:58
|
Revision: 374 http://svn.sourceforge.net/pmplib/?rev=374&view=rev Author: nyaochi Date: 2007-02-17 23:34:57 -0800 (Sat, 17 Feb 2007) Log Message: ----------- Fixed the bug of database dump in pmp_iriverplus2. Modified Paths: -------------- trunk/pmplib/lib/pmp_iriverplus2/pmp_iriverplus2.c Modified: trunk/pmplib/lib/pmp_iriverplus2/pmp_iriverplus2.c =================================================================== --- trunk/pmplib/lib/pmp_iriverplus2/pmp_iriverplus2.c 2007-02-18 07:06:16 UTC (rev 373) +++ trunk/pmplib/lib/pmp_iriverplus2/pmp_iriverplus2.c 2007-02-18 07:34:57 UTC (rev 374) @@ -97,7 +97,6 @@ } pmp_internal_t; typedef struct { - ip2db_t ip2db; pmp_music_record_t* records; int num_records; pmp_playlist_t* playlists; @@ -480,12 +479,13 @@ static uint32_t pmpmusic_open(pmp_music_t* music) { + ip2db_t ip2db; result_t ret = 0; pmp_t* pmp = music->pmp; pmp_music_internal_t* pmpmi = (pmp_music_internal_t*)music->instance; // Initialize IP2DB. - ip2db_init(&pmpmi->ip2db); + ip2db_init(&ip2db); // Free the existing records. pmplib_records_finish(pmpmi->records, pmpmi->num_records); @@ -499,13 +499,13 @@ // Read the music database. set_filenames(sys, dat, idx, pmp); - ret = ip2db_read(&pmpmi->ip2db, dat, idx); + ret = ip2db_read(&ip2db, dat, idx); if (ret) { goto exit_this; } // Obtain the number of records. - ret = ip2db_get(&pmpmi->ip2db, NULL, &pmpmi->num_records, pmp->info.path_to_root); + ret = ip2db_get(&ip2db, NULL, &pmpmi->num_records, pmp->info.path_to_root); if (ret) { goto exit_this; } @@ -517,7 +517,7 @@ goto exit_this; } - ret = ip2db_get(&pmpmi->ip2db, pmpmi->records, &pmpmi->num_records, pmp->info.path_to_root); + ret = ip2db_get(&ip2db, pmpmi->records, &pmpmi->num_records, pmp->info.path_to_root); if (ret) { goto exit_this; } @@ -525,27 +525,28 @@ exit_this: // Finish the IP2DB. - ip2db_finish(&pmpmi->ip2db); + ip2db_finish(&ip2db); return ret; } static uint32_t pmpmusic_close(pmp_music_t* music) { + ip2db_t ip2db; result_t ret = 0; pmp_t* pmp = music->pmp; pmp_music_internal_t* pmpmi = (pmp_music_internal_t*)music->instance; static const ucs2char_t plp_ext[] = {'.','p','l','p',0}; // Initialize IP2DB. - ip2db_init(&pmpmi->ip2db); + ip2db_init(&ip2db); if (pmp->flag & PMPOF_MUSIC_DB_WRITE) { ucs2char_t sys[MAX_PATH], dat[MAX_PATH], idx[MAX_PATH]; - ip2db_set(&pmpmi->ip2db, pmpmi->records, pmpmi->num_records, pmp->info.path_to_root); + ip2db_set(&ip2db, pmpmi->records, pmpmi->num_records, pmp->info.path_to_root); set_filenames(sys, dat, idx, pmp); - ret = ip2db_write(&pmpmi->ip2db, dat, idx); + ret = ip2db_write(&ip2db, dat, idx); if (ret) { goto exit_this; } @@ -557,7 +558,7 @@ for (i = 0;i < pmpmi->num_playlists;++i) { const pmp_playlist_t* pl = &pmpmi->playlists[i]; if (ip2db_playlist_write( - &pmpmi->ip2db, + &ip2db, pl->name, pl->entries, pl->num_entries, @@ -573,7 +574,7 @@ exit_this: // Finish the IP2DB. - ip2db_finish(&pmpmi->ip2db); + ip2db_finish(&ip2db); return ret; } @@ -611,12 +612,33 @@ static result_t pmpmusic_dump(pmp_music_t* music, FILE *fp, int level) { - pmp_music_internal_t* pmpmi = (pmp_music_internal_t*)music->instance; + ip2db_t ip2db; + result_t ret = 0; + ucs2char_t sys[MAX_PATH], dat[MAX_PATH], idx[MAX_PATH]; + + // Initialize IP2DB. + ip2db_init(&ip2db); + + // Read the music database. + set_filenames(sys, dat, idx, music->pmp); + ret = ip2db_read(&ip2db, dat, idx); + if (ret) { + goto exit_this; + } + if (level > 0) { - return ip2db_repr(&pmpmi->ip2db, fp); + ret = ip2db_repr(&ip2db, fp); } else { - return ip2db_dump(&pmpmi->ip2db, fp); + ret = ip2db_dump(&ip2db, fp); } + if (ret) { + goto exit_this; + } + +exit_this: + // Finish the IP2DB. + ip2db_finish(&ip2db); + return ret; } static result_t pmpmusic_set_playlists(pmp_music_t* music, const pmp_playlist_t* playlists, uint32_t num_playlists) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ny...@us...> - 2007-02-18 07:06:18
|
Revision: 373 http://svn.sourceforge.net/pmplib/?rev=373&view=rev Author: nyaochi Date: 2007-02-17 23:06:16 -0800 (Sat, 17 Feb 2007) Log Message: ----------- Fixed a serious bug (buffer overrun) in reading PortalPlayer1 database. We should have ignored inactive records in *.dat. Modified Paths: -------------- trunk/pmplib/lib/pmp_portalplayer1/pp1db.c Modified: trunk/pmplib/lib/pmp_portalplayer1/pp1db.c =================================================================== --- trunk/pmplib/lib/pmp_portalplayer1/pp1db.c 2007-02-17 15:37:59 UTC (rev 372) +++ trunk/pmplib/lib/pmp_portalplayer1/pp1db.c 2007-02-18 07:06:16 UTC (rev 373) @@ -579,12 +579,13 @@ const dat_t* src = &db->dat[i]; pmp_music_record_t* dst = &records[j]; - pmplib_record_init(dst); - db->hdr->param.proc_dat_get(dst, src, path_to_root); - ++j; + if (src->status == 0) { + pmplib_record_init(dst); + db->hdr->param.proc_dat_get(dst, src, path_to_root); + ++j; + } } *num_records = n; - return 0; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ny...@us...> - 2007-02-17 15:38:00
|
Revision: 372 http://svn.sourceforge.net/pmplib/?rev=372&view=rev Author: nyaochi Date: 2007-02-17 07:37:59 -0800 (Sat, 17 Feb 2007) Log Message: ----------- Initial attempt to support MSI MEGA PLAYER 536. I will check the compatibility later. Modified Paths: -------------- trunk/pmplib/lib/pmp_portalplayer1/hdr_template.h trunk/pmplib/lib/pmp_portalplayer1/model_msi_megaplayer.c trunk/pmplib/lib/pmp_portalplayer1/pmp_portalplayer1.c trunk/pmplib/lib/pmp_portalplayer1/pp1db.c trunk/pmplib/lib/ucs2/ucs2char.c Modified: trunk/pmplib/lib/pmp_portalplayer1/hdr_template.h =================================================================== --- trunk/pmplib/lib/pmp_portalplayer1/hdr_template.h 2007-02-17 15:35:46 UTC (rev 371) +++ trunk/pmplib/lib/pmp_portalplayer1/hdr_template.h 2007-02-17 15:37:59 UTC (rev 372) @@ -76,6 +76,7 @@ int medion_mdjuke220_parse_model(const ucs2char_t* firmware, pp1model_t* model); int samsung_parse_model(const ucs2char_t* firmware, pp1model_t* model); int philips_hdd6320_parse_model(const ucs2char_t* firmware, pp1model_t* model); -int megaplayer_parse_model(const ucs2char_t* firmware, pp1model_t* model); +int megaplayer_parse_model_536(const ucs2char_t* firmware, pp1model_t* model); +int megaplayer_parse_model_540(const ucs2char_t* firmware, pp1model_t* model); #endif/*__HDR_TEMPLATE_H__*/ Modified: trunk/pmplib/lib/pmp_portalplayer1/model_msi_megaplayer.c =================================================================== --- trunk/pmplib/lib/pmp_portalplayer1/model_msi_megaplayer.c 2007-02-17 15:35:46 UTC (rev 371) +++ trunk/pmplib/lib/pmp_portalplayer1/model_msi_megaplayer.c 2007-02-17 15:37:59 UTC (rev 372) @@ -153,7 +153,7 @@ return 0; } -int megaplayer_parse_model(const ucs2char_t* firmware, pp1model_t* model) +static int megaplayer_parse_model(const ucs2char_t* firmware, pp1model_t* model, const char *identifier) { /* MSI MEGA PLAYER 540 01.00.16 @@ -176,6 +176,27 @@ 000002D0 68 74 73 20 72 65 73 65 72 76 65 64 2E 00 00 00 hts reserved.... 000002E0 00 01 00 00 EC 00 00 00 20 7F 39 00 00 10 A0 E1 ........ .9..... 000002F0 40 25 A0 E3 00 20 81 E5 01 00 A0 E3 0E F0 A0 E1 @%... .......... + + MSI MEGA PLAYER 536 01.00.16 + + ADDRESS 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 0123456789ABCDEF + ------------------------------------------------------------------------------ + 00000200 27 04 00 EA 14 04 00 EA 0E F0 B0 E1 18 04 00 EA '............... + 00000210 1D 04 00 EA FE FF FF EA 05 04 00 EA FB 03 00 EA ................ + 00000220 70 6F 72 74 61 6C 70 6C 61 79 65 72 00 30 2E 30 portalplayer.0.0 + 00000230 C0 00 39 7B FC 00 F1 ED 00 00 00 00 00 00 00 00 ..9{............ + 00000240 50 50 35 30 32 30 41 46 2D 30 35 2E 32 32 2D 50 PP5020AF-05.22-P + 00000250 50 30 37 2D 30 35 2E 32 32 2D 4D 4E 30 33 2D 30 P07-05.22-MN03-0 + 00000260 31 2E 30 30 2E 31 36 2D 44 54 00 00 32 30 30 35 1.00.16-DT..2005 + 00000270 2E 30 33 2E 31 36 00 00 28 42 75 69 6C 64 20 31 .03.16..(Build 1 + 00000280 32 39 29 00 44 69 67 69 74 61 6C 20 4D 65 64 69 29).Digital Medi + 00000290 61 20 50 6C 61 74 66 6F 72 6D 00 00 43 6F 70 79 a Platform..Copy + 000002A0 72 69 67 68 74 28 63 29 20 31 39 39 39 20 2D 20 right(c) 1999 - + 000002B0 32 30 30 33 20 50 6F 72 74 61 6C 50 6C 61 79 65 2003 PortalPlaye + 000002C0 72 2C 20 49 6E 63 2E 20 20 41 6C 6C 20 72 69 67 r, Inc. All rig + 000002D0 68 74 73 20 72 65 73 65 72 76 65 64 2E 00 00 00 hts reserved.... + 000002E0 00 01 00 00 EC 00 00 00 FC 7B 39 00 00 10 A0 E1 .........{9..... + 000002F0 40 25 A0 E3 00 20 81 E5 01 00 A0 E3 0E F0 A0 E1 @%... .......... */ FILE *fp = ucs2fopen(firmware, "rb"); if (fp) { @@ -198,12 +219,11 @@ fclose(fp); // Match the identifier string. - if (strncmp(buff, "PP5020AF-05.22-PP07-05.22-MN05-", 31) != 0) { + if (strncmp(buff, identifier, strlen(identifier)) != 0) { return 0; } // Obtain the model name. - strcpy(model->name, "MEGA PLAYER 540"); memset(model->version, 0, sizeof(model->version)); strncpy(model->version, buff+0x1F, 8); strcpy(model->language, ""); @@ -215,9 +235,27 @@ } } +int megaplayer_parse_model_536(const ucs2char_t* firmware, pp1model_t* model) +{ + int ret = megaplayer_parse_model(firmware, model, "PP5020AF-05.22-PP07-05.22-MN03-"); + if (ret) { + strcpy(model->name, "MEGA PLAYER 536"); + } + return ret; +} +int megaplayer_parse_model_540(const ucs2char_t* firmware, pp1model_t* model) +{ + int ret = megaplayer_parse_model(firmware, model, "PP5020AF-05.22-PP07-05.22-MN05-"); + if (ret) { + strcpy(model->name, "MEGA PLAYER 540"); + } + return ret; +} + + static fd_template_t hdrtmpl_fd_megaplayer540[] = { {0x0000F001, 2, 4, 0, 0, 1, 0, 0, "System\\DATA\\PP...@DE...x"}, {0x0000F002, 1, 128, 0, 0, 1, 0, 0, "System\\DATA\\PP5000_FPTH.idx"}, Modified: trunk/pmplib/lib/pmp_portalplayer1/pmp_portalplayer1.c =================================================================== --- trunk/pmplib/lib/pmp_portalplayer1/pmp_portalplayer1.c 2007-02-17 15:35:46 UTC (rev 371) +++ trunk/pmplib/lib/pmp_portalplayer1/pmp_portalplayer1.c 2007-02-17 15:37:59 UTC (rev 372) @@ -221,6 +221,17 @@ hdr_init_philips_hdd6320, philips_hdd6320_parse_model }, { + "msi_megaplayer536", "MSI", "MEGA PLAYER 536", + 8, "UM", + "01.00.16", "01.00.16", + "SYSTEM\\PP5020.mi4", "System\\DATA\\PP5000.HDR", + ".mp3\0.wma\0", + {PMPCODEC_MPEGLAYER3, PMPCODEC_WMA, 0, 0, 0, 0}, + "SYSTEM", "MUSIC", "Playlists", + ".pla", + hdr_init_msi_megaplayer540, megaplayer_parse_model_536 + }, + { "msi_megaplayer540", "MSI", "MEGA PLAYER 540", 8, "UM", "01.00.16", "01.00.16", @@ -229,7 +240,7 @@ {PMPCODEC_MPEGLAYER3, PMPCODEC_WMA, 0, 0, 0, 0}, "SYSTEM", "MUSIC", "Playlists", ".pla", - hdr_init_msi_megaplayer540, megaplayer_parse_model + hdr_init_msi_megaplayer540, megaplayer_parse_model_540 }, #if 0 { Modified: trunk/pmplib/lib/pmp_portalplayer1/pp1db.c =================================================================== --- trunk/pmplib/lib/pmp_portalplayer1/pp1db.c 2007-02-17 15:35:46 UTC (rev 371) +++ trunk/pmplib/lib/pmp_portalplayer1/pp1db.c 2007-02-17 15:37:59 UTC (rev 372) @@ -581,7 +581,6 @@ pmplib_record_init(dst); db->hdr->param.proc_dat_get(dst, src, path_to_root); - ++j; } Modified: trunk/pmplib/lib/ucs2/ucs2char.c =================================================================== --- trunk/pmplib/lib/ucs2/ucs2char.c 2007-02-17 15:35:46 UTC (rev 371) +++ trunk/pmplib/lib/ucs2/ucs2char.c 2007-02-17 15:37:59 UTC (rev 372) @@ -271,7 +271,7 @@ ucs2char_t* ucs2dup(const ucs2char_t* src) { - ucs2char_t* dst = (ucs2char_t*)malloc((ucs2len(src)+1) * sizeof(ucs2char_t)); + ucs2char_t* dst = (ucs2char_t*)ucs2malloc((ucs2len(src)+1) * sizeof(ucs2char_t)); ucs2cpy(dst, src); return dst; } @@ -283,7 +283,7 @@ if (length < src_length) { src_length = length; } - dst = (ucs2char_t*)malloc((src_length+1) * sizeof(ucs2char_t)); + dst = (ucs2char_t*)ucs2malloc((src_length+1) * sizeof(ucs2char_t)); if (dst) { size_t i; for (i = 0;i < src_length;i++) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ny...@us...> - 2007-02-17 15:35:46
|
Revision: 371 http://svn.sourceforge.net/pmplib/?rev=371&view=rev Author: nyaochi Date: 2007-02-17 07:35:46 -0800 (Sat, 17 Feb 2007) Log Message: ----------- Do not specify PMPOF_MUSIC_DB_READ flag for database dump. Modified Paths: -------------- trunk/pmplib/frontend/easypmp/cui/main.c Modified: trunk/pmplib/frontend/easypmp/cui/main.c =================================================================== --- trunk/pmplib/frontend/easypmp/cui/main.c 2007-02-17 14:52:17 UTC (rev 370) +++ trunk/pmplib/frontend/easypmp/cui/main.c 2007-02-17 15:35:46 UTC (rev 371) @@ -343,9 +343,6 @@ openflag |= PMPOF_MUSIC_DB_READ; } } - if (opt.verb & MODE_DATABASE_REPR) { - openflag |= PMPOF_MUSIC_DB_READ; - } if (opt.verb & MODE_PLAYLIST) { openflag |= PMPOF_MUSIC_PL_WRITE; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ny...@us...> - 2007-02-17 14:52:18
|
Revision: 370 http://svn.sourceforge.net/pmplib/?rev=370&view=rev Author: nyaochi Date: 2007-02-17 06:52:17 -0800 (Sat, 17 Feb 2007) Log Message: ----------- - Removed pp1db member from pmp_music_internal_t because it is no longer shared among functions in pmp_portalplayer1.c - Fixed the bug: the database dump has been broken. Modified Paths: -------------- trunk/pmplib/lib/pmp_portalplayer1/pmp_portalplayer1.c Modified: trunk/pmplib/lib/pmp_portalplayer1/pmp_portalplayer1.c =================================================================== --- trunk/pmplib/lib/pmp_portalplayer1/pmp_portalplayer1.c 2007-02-14 23:10:22 UTC (rev 369) +++ trunk/pmplib/lib/pmp_portalplayer1/pmp_portalplayer1.c 2007-02-17 14:52:17 UTC (rev 370) @@ -262,7 +262,6 @@ } pmp_internal_t; typedef struct { - pp1db_t pp1db; pmp_music_record_t* records; int num_records; pmp_playlist_t* playlists; @@ -619,13 +618,14 @@ static uint32_t pmpmusic_open(pmp_music_t* music) { + pp1db_t pp1db; result_t ret = 0; pmp_t* pmp = music->pmp; pmp_internal_t* pmpi = (pmp_internal_t*)pmp->instance; pmp_music_internal_t* pmpmi = (pmp_music_internal_t*)music->instance; // Initialize PP1DB. - pp1db_init(&pmpmi->pp1db, pmpi->decl->hdr_initproc); + pp1db_init(&pp1db, pmpi->decl->hdr_initproc); // Free the existing records. pmplib_records_finish(pmpmi->records, pmpmi->num_records); @@ -639,13 +639,13 @@ // Read the music database. set_filenames(hdr, pmp); - ret = pp1db_read(&pmpmi->pp1db, hdr); + ret = pp1db_read(&pp1db, hdr); if (ret) { goto exit_this; } // Obtain the number of records. - ret = pp1db_get(&pmpmi->pp1db, NULL, &pmpmi->num_records, pmp->info.path_to_root); + ret = pp1db_get(&pp1db, NULL, &pmpmi->num_records, pmp->info.path_to_root); if (ret) { goto exit_this; } @@ -657,7 +657,7 @@ goto exit_this; } - ret = pp1db_get(&pmpmi->pp1db, pmpmi->records, &pmpmi->num_records, pmp->info.path_to_root); + ret = pp1db_get(&pp1db, pmpmi->records, &pmpmi->num_records, pmp->info.path_to_root); if (ret) { goto exit_this; } @@ -665,12 +665,13 @@ } exit_this: - pp1db_finish(&pmpmi->pp1db); + pp1db_finish(&pp1db); return ret; } static uint32_t pmpmusic_close(pmp_music_t* music) { + pp1db_t pp1db; result_t ret = 0; pmp_t* pmp = music->pmp; pmp_internal_t* pmpi = (pmp_internal_t*)pmp->instance; @@ -678,15 +679,15 @@ static const ucs2char_t plp_ext[] = {'.','p','l','p',0}; // Initialize PP1DB. - pp1db_init(&pmpmi->pp1db, pmpi->decl->hdr_initproc); + pp1db_init(&pp1db, pmpi->decl->hdr_initproc); if (pmp->flag & PMPOF_MUSIC_DB_WRITE) { ucs2char_t hdr[MAX_PATH]; - pp1db_set(&pmpmi->pp1db, pmpmi->records, pmpmi->num_records, pmp->info.path_to_root); + pp1db_set(&pp1db, pmpmi->records, pmpmi->num_records, pmp->info.path_to_root); set_filenames(hdr, pmp); - ret = pp1db_write(&pmpmi->pp1db, hdr); + ret = pp1db_write(&pp1db, hdr); if (ret) { goto exit_this; } @@ -698,7 +699,7 @@ for (i = 0;i < pmpmi->num_playlists;++i) { const pmp_playlist_t* pl = &pmpmi->playlists[i]; if (pp1db_playlist_write( - &pmpmi->pp1db, + &pp1db, pl->name, pl->entries, pl->num_entries, @@ -706,7 +707,7 @@ pmp->info.path_to_playlist, plp_ext ) != 0) { - pp1db_finish(&pmpmi->pp1db); + pp1db_finish(&pp1db); ret = PMPERR_WRITE; goto exit_this; } @@ -714,7 +715,7 @@ } exit_this: - pp1db_finish(&pmpmi->pp1db); + pp1db_finish(&pp1db); return ret; } @@ -752,8 +753,30 @@ static result_t pmpmusic_dump(pmp_music_t* music, FILE *fp, int level) { - pmp_music_internal_t* pmpmi = (pmp_music_internal_t*)music->instance; - return pp1db_repr(&pmpmi->pp1db, fp, level); + pp1db_t pp1db; + result_t ret = 0; + pmp_t* pmp = music->pmp; + pmp_internal_t* pmpi = (pmp_internal_t*)pmp->instance; + ucs2char_t hdr[MAX_PATH]; + + // Initialize PP1DB. + pp1db_init(&pp1db, pmpi->decl->hdr_initproc); + + // Read the music database. + set_filenames(hdr, pmp); + ret = pp1db_read(&pp1db, hdr); + if (ret) { + goto exit_this; + } + + ret = pp1db_repr(&pp1db, fp, level); + if (ret) { + goto exit_this; + } + +exit_this: + pp1db_finish(&pp1db); + return ret; } static result_t pmpmusic_set_playlists(pmp_music_t* music, const pmp_playlist_t* playlists, uint32_t num_playlists) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <suc...@us...> - 2007-02-14 23:10:22
|
Revision: 369 http://svn.sourceforge.net/pmplib/?rev=369&view=rev Author: sucknblow Date: 2007-02-14 15:10:22 -0800 (Wed, 14 Feb 2007) Log Message: ----------- Update snapshot script for better results using libtool -release option. Modified Paths: -------------- trunk/pmplib/doc/snapshot Modified: trunk/pmplib/doc/snapshot =================================================================== --- trunk/pmplib/doc/snapshot 2007-02-14 23:09:34 UTC (rev 368) +++ trunk/pmplib/doc/snapshot 2007-02-14 23:10:22 UTC (rev 369) @@ -46,7 +46,7 @@ svn export $(BRANCH) $(SNAPSHOTS)/pmplib-snapshot snapshot-version: - sed -i "s/\(AM_INIT_AUTOMAKE[^0-9.]*\)[0-9.]\+\(.*\)/\1$(SNAPVER)\2/" \ + sed -i "s/\(AM_INIT_AUTOMAKE[^0-9.]*\)[0-9.]\+\(.*\)/\1$(LASTVER)\2/" \ $(SNAPSHOTS)/pmplib-snapshot/configure.in && \ sed -i "s/\(#define[ \t]*VERSION_S[ \t]*\).*/\1\"$(SNAPVER) snapshot\"/" \ $(SNAPSHOTS)/pmplib-snapshot/frontend/easypmp/cui/main.c && \ @@ -62,6 +62,10 @@ snapshot: snapshot-export snapshot-version snapshot-dist mkdir -p $(SNAPSHOTS)/$(SNAPVER){,/debian} + cd $(SNAPSHOTS)/pmplib-snapshot && \ + tar zxf pmplib-$(LASTVER).tar.gz && \ + mv pmplib-$(LASTVER) pmplib-$(SNAPVER) && \ + tar cf - pmplib-$(SNAPVER) | gzip -9 > pmplib-$(SNAPVER).tar.gz cp $(SNAPSHOTS)/pmplib-snapshot/pmplib-$(SNAPVER).tar.gz \ $(SNAPSHOTS)/$(SNAPVER) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <suc...@us...> - 2007-02-14 23:09:33
|
Revision: 368 http://svn.sourceforge.net/pmplib/?rev=368&view=rev Author: sucknblow Date: 2007-02-14 15:09:34 -0800 (Wed, 14 Feb 2007) Log Message: ----------- Fix lintian error. Modified Paths: -------------- trunk/pmplib/debian/control Modified: trunk/pmplib/debian/control =================================================================== --- trunk/pmplib/debian/control 2007-02-14 21:47:02 UTC (rev 367) +++ trunk/pmplib/debian/control 2007-02-14 23:09:34 UTC (rev 368) @@ -78,7 +78,7 @@ Package: libpmp-dev Architecture: any Section: libdevel -Depends: libpmp-0.14 (= ${source:Version}) +Depends: libpmp-0.14 (= ${binary:Version}) Description: library for creating databases for portable media players (development files) PMPlib is a library for creating and maintaining the music database and playlists for a variety of portable music players. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <suc...@us...> - 2007-02-14 21:47:03
|
Revision: 367 http://svn.sourceforge.net/pmplib/?rev=367&view=rev Author: sucknblow Date: 2007-02-14 13:47:02 -0800 (Wed, 14 Feb 2007) Log Message: ----------- Lazy approach didn't work for snapshot tarballs :( Modified Paths: -------------- trunk/pmplib/debian/control Modified: trunk/pmplib/debian/control =================================================================== --- trunk/pmplib/debian/control 2007-02-14 21:23:45 UTC (rev 366) +++ trunk/pmplib/debian/control 2007-02-14 21:47:02 UTC (rev 367) @@ -78,7 +78,7 @@ Package: libpmp-dev Architecture: any Section: libdevel -Depends: libpmp-${source:Upstream-Version} (= ${source:Version}) +Depends: libpmp-0.14 (= ${source:Version}) Description: library for creating databases for portable media players (development files) PMPlib is a library for creating and maintaining the music database and playlists for a variety of portable music players. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <suc...@us...> - 2007-02-14 21:23:45
|
Revision: 366 http://svn.sourceforge.net/pmplib/?rev=366&view=rev Author: sucknblow Date: 2007-02-14 13:23:45 -0800 (Wed, 14 Feb 2007) Log Message: ----------- Small style improvements to packaging scripts Modified Paths: -------------- trunk/pmplib/debian/changelog trunk/pmplib/debian/control trunk/pmplib/debian/copyright Modified: trunk/pmplib/debian/changelog =================================================================== --- trunk/pmplib/debian/changelog 2007-02-14 21:17:52 UTC (rev 365) +++ trunk/pmplib/debian/changelog 2007-02-14 21:23:45 UTC (rev 366) @@ -3,4 +3,3 @@ * Initial release Closes: #369975 -- Martin Ellis <mar...@kd...> Sat, 29 Jul 2006 23:05:36 +0100 - Modified: trunk/pmplib/debian/control =================================================================== --- trunk/pmplib/debian/control 2007-02-14 21:17:52 UTC (rev 365) +++ trunk/pmplib/debian/control 2007-02-14 21:23:45 UTC (rev 366) @@ -40,6 +40,8 @@ Easypmp can also convert playlist files into a format suitable for media player. Playlist files typically have a .m3u or .pls file extension, and can be created by many desktop media players. + . + Homepage: http://pmplib.sourceforge.net/ Package: libpmp-0.14 Architecture: any @@ -70,6 +72,8 @@ * Samsung YH-820, YH-920 and YH-925 * MSI MEGA PLAYER 540 * Philips HDD6320 + . + Homepage: http://pmplib.sourceforge.net/ Package: libpmp-dev Architecture: any @@ -82,3 +86,5 @@ This package contains the header files and static library for PMPlib. Install it if you want to develop or compile programs that use PMPlib. The PMPlib library itself is included in the libpmp0 package. + . + Homepage: http://pmplib.sourceforge.net/ Modified: trunk/pmplib/debian/copyright =================================================================== --- trunk/pmplib/debian/copyright 2007-02-14 21:17:52 UTC (rev 365) +++ trunk/pmplib/debian/copyright 2007-02-14 21:23:45 UTC (rev 366) @@ -99,4 +99,3 @@ The Debian packaging is Copyright (c) 2006-2007 Martin Ellis <mar...@kd...> and is licensed under the GPL, see above. - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <suc...@us...> - 2007-02-14 21:17:51
|
Revision: 365 http://svn.sourceforge.net/pmplib/?rev=365&view=rev Author: sucknblow Date: 2007-02-14 13:17:52 -0800 (Wed, 14 Feb 2007) Log Message: ----------- Use libtool -release option. Modified Paths: -------------- trunk/pmplib/debian/control trunk/pmplib/debian/libpmp-dev.install trunk/pmplib/debian/rules trunk/pmplib/lib/pmp/Makefile.am Added Paths: ----------- trunk/pmplib/debian/libpmp-0.14.install Removed Paths: ------------- trunk/pmplib/debian/libpmp0.install Modified: trunk/pmplib/debian/control =================================================================== --- trunk/pmplib/debian/control 2007-02-14 21:16:16 UTC (rev 364) +++ trunk/pmplib/debian/control 2007-02-14 21:17:52 UTC (rev 365) @@ -8,7 +8,7 @@ Package: easypmp Architecture: any Section: sound -Depends: ${shlibs:Depends}, ${misc:Depends} +Depends: ${shlibs:Depends} Description: create music databases used by portable media players Easypmp is a command line utility used to create and maintain the music database and playlists on a variety of portable music players. @@ -41,7 +41,7 @@ player. Playlist files typically have a .m3u or .pls file extension, and can be created by many desktop media players. -Package: libpmp0 +Package: libpmp-0.14 Architecture: any Section: libs Depends: ${shlibs:Depends} @@ -74,7 +74,7 @@ Package: libpmp-dev Architecture: any Section: libdevel -Depends: libpmp0 (= ${Source-Version}) +Depends: libpmp-${source:Upstream-Version} (= ${source:Version}) Description: library for creating databases for portable media players (development files) PMPlib is a library for creating and maintaining the music database and playlists for a variety of portable music players. Copied: trunk/pmplib/debian/libpmp-0.14.install (from rev 361, trunk/pmplib/debian/libpmp0.install) =================================================================== --- trunk/pmplib/debian/libpmp-0.14.install (rev 0) +++ trunk/pmplib/debian/libpmp-0.14.install 2007-02-14 21:17:52 UTC (rev 365) @@ -0,0 +1,4 @@ +debian/tmp/usr/lib/libpmp*-*.so +debian/tmp/usr/lib/pmplib*/*.so +debian/tmp/usr/lib/pmplib*/*.la +debian/tmp/usr/share/pmplib*/* Modified: trunk/pmplib/debian/libpmp-dev.install =================================================================== --- trunk/pmplib/debian/libpmp-dev.install 2007-02-14 21:16:16 UTC (rev 364) +++ trunk/pmplib/debian/libpmp-dev.install 2007-02-14 21:17:52 UTC (rev 365) @@ -1,3 +1,3 @@ debian/tmp/usr/include/pmplib/* -debian/tmp/usr/lib/*.so +debian/tmp/usr/lib/libpmp.so debian/tmp/usr/lib/*.la Deleted: trunk/pmplib/debian/libpmp0.install =================================================================== --- trunk/pmplib/debian/libpmp0.install 2007-02-14 21:16:16 UTC (rev 364) +++ trunk/pmplib/debian/libpmp0.install 2007-02-14 21:17:52 UTC (rev 365) @@ -1,4 +0,0 @@ -debian/tmp/usr/lib/libpmp*.so.* -debian/tmp/usr/lib/pmplib*/*.so -debian/tmp/usr/lib/pmplib*/*.la -debian/tmp/usr/share/pmplib/* Modified: trunk/pmplib/debian/rules =================================================================== --- trunk/pmplib/debian/rules 2007-02-14 21:16:16 UTC (rev 364) +++ trunk/pmplib/debian/rules 2007-02-14 21:17:52 UTC (rev 365) @@ -23,6 +23,7 @@ CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs" \ ./configure \ --enable-versioned-libdir \ + --enable-versioned-jspldir \ --host=$(DEB_HOST_GNU_TYPE) \ --build=$(DEB_BUILD_GNU_TYPE) \ --prefix=/usr \ @@ -77,9 +78,9 @@ dh_strip dh_compress dh_fixperms - dh_makeshlibs + dh_makeshlibs -V dh_installdeb - dh_shlibdeps -Llibpmp0 -ldebian/libpmp0/usr/lib + dh_shlibdeps -Llibpmp-0.14 -ldebian/libpmp-0.14/usr/lib dh_gencontrol dh_md5sums dh_builddeb Modified: trunk/pmplib/lib/pmp/Makefile.am =================================================================== --- trunk/pmplib/lib/pmp/Makefile.am 2007-02-14 21:16:16 UTC (rev 364) +++ trunk/pmplib/lib/pmp/Makefile.am 2007-02-14 21:17:52 UTC (rev 365) @@ -11,7 +11,8 @@ libpmp_la_CPPFLAGS = -DPMP_MODULES_DIR="\"$(libdir)/$(PLUGIN_DIR)\"" $(LTDLINCL) libpmp_la_LDFLAGS = \ - -no-undefined + -no-undefined \ + -release @VERSION@ libpmp_la_LIBADD = \ $(top_builddir)/lib/ucs2/libucs2.la \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <suc...@us...> - 2007-02-14 21:16:22
|
Revision: 364 http://svn.sourceforge.net/pmplib/?rev=364&view=rev Author: sucknblow Date: 2007-02-14 13:16:16 -0800 (Wed, 14 Feb 2007) Log Message: ----------- --enable-versioned-jspldir configure option for installing JSPLs to $prefix/share/pmplib-x.yz/jspl Modified Paths: -------------- trunk/pmplib/configure.in trunk/pmplib/frontend/easypmp/cui/Makefile.am trunk/pmplib/lib/playlist/Makefile.am Modified: trunk/pmplib/configure.in =================================================================== --- trunk/pmplib/configure.in 2007-02-14 16:47:53 UTC (rev 363) +++ trunk/pmplib/configure.in 2007-02-14 21:16:16 UTC (rev 364) @@ -240,6 +240,20 @@ AC_SUBST(PLUGIN_DIR) dnl ------------------------------------------------------------------ +dnl Check whether to install JSPLs in share/pmplib/jspl or share/pmplib-x.yz/jspl +dnl ------------------------------------------------------------------ +AC_ARG_ENABLE( + versioned-jspldir, + [AC_HELP_STRING(--enable-versioned-jspldir, [Include version number in JSPL path])] +) +if test "$enable_versioned_jspldir" = "yes" ; then + JSPL_DIR=$PACKAGE-$VERSION +else + JSPL_DIR=$PACKAGE +fi +AC_SUBST(JSPL_DIR) + +dnl ------------------------------------------------------------------ dnl Output the configure results. dnl ------------------------------------------------------------------ AC_CONFIG_FILES(Makefile m4/Makefile include/Makefile include/pmplib/Makefile lib/ucs2/Makefile lib/filepath/Makefile lib/pmp/Makefile lib/gmi/Makefile lib/pmp_irivnavi/Makefile lib/pmp_portalplayer1/Makefile lib/pmp_iriverplus2/Makefile lib/pmp_iriverplus3/Makefile lib/playlist/Makefile frontend/easypmp/cui/Makefile pmplib.spec) Modified: trunk/pmplib/frontend/easypmp/cui/Makefile.am =================================================================== --- trunk/pmplib/frontend/easypmp/cui/Makefile.am 2007-02-14 16:47:53 UTC (rev 363) +++ trunk/pmplib/frontend/easypmp/cui/Makefile.am 2007-02-14 21:16:16 UTC (rev 364) @@ -30,7 +30,7 @@ INCLUDES = @INCLUDES@ AM_LDFLAGS = @LDFLAGS@ -easypmp_CFLAGS = -DPMP_JSPL_DIR="\"$(prefix)/share/@PACKAGE@/jspl\"" +easypmp_CFLAGS = -DPMP_JSPL_DIR="\"$(prefix)/share/$(JSPL_DIR)/jspl\"" easypmp_LDADD = \ $(top_builddir)/lib/pmp/libpmp.la \ Modified: trunk/pmplib/lib/playlist/Makefile.am =================================================================== --- trunk/pmplib/lib/playlist/Makefile.am 2007-02-14 16:47:53 UTC (rev 363) +++ trunk/pmplib/lib/playlist/Makefile.am 2007-02-14 21:16:16 UTC (rev 364) @@ -8,7 +8,7 @@ jspl/top_ranking.jspl jspl_c = jspl.c - jspldir = $(prefix)/share/@PACKAGE@/jspl + jspldir = $(prefix)/share/$(JSPL_DIR)/jspl jspl_DATA = $(jspl_files) endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ny...@us...> - 2007-02-14 16:47:54
|
Revision: 363 http://svn.sourceforge.net/pmplib/?rev=363&view=rev Author: nyaochi Date: 2007-02-14 08:47:53 -0800 (Wed, 14 Feb 2007) Log Message: ----------- Include *.la files to pmplib package. Modified Paths: -------------- trunk/pmplib/pmplib.spec.in Modified: trunk/pmplib/pmplib.spec.in =================================================================== --- trunk/pmplib/pmplib.spec.in 2007-02-14 16:42:57 UTC (rev 362) +++ trunk/pmplib/pmplib.spec.in 2007-02-14 16:47:53 UTC (rev 363) @@ -69,24 +69,24 @@ %doc %{pmplibdocdir}/ChangeLog %doc %{pmplibdocdir}/INSTALL %doc %{pmplibdocdir}/README +%{_libdir}/pmplib/irivnavi.la %{_libdir}/pmplib/irivnavi.so +%{_libdir}/pmplib/portalplayer1.la %{_libdir}/pmplib/portalplayer1.so +%{_libdir}/pmplib/iriverplus2.la %{_libdir}/pmplib/iriverplus2.so +%{_libdir}/pmplib/iriverplus3.la %{_libdir}/pmplib/iriverplus3.so +%{_libdir}/libpmp.la %{_libdir}/libpmp.so* %files devel %defattr(-,root,root) %{_libdir}/pmplib/irivnavi.a -%{_libdir}/pmplib/irivnavi.la %{_libdir}/pmplib/portalplayer1.a -%{_libdir}/pmplib/portalplayer1.la %{_libdir}/pmplib/iriverplus2.a -%{_libdir}/pmplib/iriverplus2.la %{_libdir}/pmplib/iriverplus3.a -%{_libdir}/pmplib/iriverplus3.la %{_libdir}/libpmp.a -%{_libdir}/libpmp.la %{_includedir}/* %files tools @@ -95,5 +95,8 @@ %{_mandir}/man1/easypmp.1* %changelog +* Thu Feb 15 2007 Naoaki Okazaki <ny...@us...> +- Include %{_libdir}/pmplib/*.la files to pmplib package. + * Fri Feb 9 2007 Naoaki Okazaki <ny...@us...> 0.14 -- Initial build +- Initial build. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ny...@us...> - 2007-02-14 16:42:58
|
Revision: 362 http://svn.sourceforge.net/pmplib/?rev=362&view=rev Author: nyaochi Date: 2007-02-14 08:42:57 -0800 (Wed, 14 Feb 2007) Log Message: ----------- Updated the screenshot with Windows Vista. Modified Paths: -------------- trunk/webpage/images/easypmp_win32gui_screenshot.png Modified: trunk/webpage/images/easypmp_win32gui_screenshot.png =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <suc...@us...> - 2007-02-13 23:31:21
|
Revision: 361 http://svn.sourceforge.net/pmplib/?rev=361&view=rev Author: sucknblow Date: 2007-02-13 15:31:21 -0800 (Tue, 13 Feb 2007) Log Message: ----------- Install modules to /usr/lib/pmplib-x.yz on Debian Modified Paths: -------------- trunk/pmplib/configure.in trunk/pmplib/debian/libpmp0.install trunk/pmplib/debian/rules trunk/pmplib/lib/pmp/Makefile.am trunk/pmplib/lib/pmp_iriverplus2/Makefile.am trunk/pmplib/lib/pmp_iriverplus3/Makefile.am trunk/pmplib/lib/pmp_irivnavi/Makefile.am trunk/pmplib/lib/pmp_portalplayer1/Makefile.am Modified: trunk/pmplib/configure.in =================================================================== --- trunk/pmplib/configure.in 2007-02-13 21:25:28 UTC (rev 360) +++ trunk/pmplib/configure.in 2007-02-13 23:31:21 UTC (rev 361) @@ -226,6 +226,20 @@ AM_CONDITIONAL(have_getopt, test "$ac_cv_header_getopt_h" = "yes") dnl ------------------------------------------------------------------ +dnl Check whether to install plugins in lib/pmplib or lib/pmplib-x.yz +dnl ------------------------------------------------------------------ +AC_ARG_ENABLE( + versioned-libdir, + [AC_HELP_STRING(--enable-versioned-libdir, [Include version number in plugins path])] +) +if test "$enable_versioned_libdir" = "yes" ; then + PLUGIN_DIR=$PACKAGE-$VERSION +else + PLUGIN_DIR=$PACKAGE +fi +AC_SUBST(PLUGIN_DIR) + +dnl ------------------------------------------------------------------ dnl Output the configure results. dnl ------------------------------------------------------------------ AC_CONFIG_FILES(Makefile m4/Makefile include/Makefile include/pmplib/Makefile lib/ucs2/Makefile lib/filepath/Makefile lib/pmp/Makefile lib/gmi/Makefile lib/pmp_irivnavi/Makefile lib/pmp_portalplayer1/Makefile lib/pmp_iriverplus2/Makefile lib/pmp_iriverplus3/Makefile lib/playlist/Makefile frontend/easypmp/cui/Makefile pmplib.spec) Modified: trunk/pmplib/debian/libpmp0.install =================================================================== --- trunk/pmplib/debian/libpmp0.install 2007-02-13 21:25:28 UTC (rev 360) +++ trunk/pmplib/debian/libpmp0.install 2007-02-13 23:31:21 UTC (rev 361) @@ -1,4 +1,4 @@ debian/tmp/usr/lib/libpmp*.so.* -debian/tmp/usr/lib/pmplib/*.so -debian/tmp/usr/lib/pmplib/*.la +debian/tmp/usr/lib/pmplib*/*.so +debian/tmp/usr/lib/pmplib*/*.la debian/tmp/usr/share/pmplib/* Modified: trunk/pmplib/debian/rules =================================================================== --- trunk/pmplib/debian/rules 2007-02-13 21:25:28 UTC (rev 360) +++ trunk/pmplib/debian/rules 2007-02-13 23:31:21 UTC (rev 361) @@ -22,6 +22,7 @@ dh_testdir CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs" \ ./configure \ + --enable-versioned-libdir \ --host=$(DEB_HOST_GNU_TYPE) \ --build=$(DEB_BUILD_GNU_TYPE) \ --prefix=/usr \ Modified: trunk/pmplib/lib/pmp/Makefile.am =================================================================== --- trunk/pmplib/lib/pmp/Makefile.am 2007-02-13 21:25:28 UTC (rev 360) +++ trunk/pmplib/lib/pmp/Makefile.am 2007-02-13 23:31:21 UTC (rev 361) @@ -8,7 +8,7 @@ pmp.c \ pmp_posix.c -libpmp_la_CPPFLAGS = -DPMP_MODULES_DIR="\"$(libdir)/@PACKAGE@\"" $(LTDLINCL) +libpmp_la_CPPFLAGS = -DPMP_MODULES_DIR="\"$(libdir)/$(PLUGIN_DIR)\"" $(LTDLINCL) libpmp_la_LDFLAGS = \ -no-undefined Modified: trunk/pmplib/lib/pmp_iriverplus2/Makefile.am =================================================================== --- trunk/pmplib/lib/pmp_iriverplus2/Makefile.am 2007-02-13 21:25:28 UTC (rev 360) +++ trunk/pmplib/lib/pmp_iriverplus2/Makefile.am 2007-02-13 23:31:21 UTC (rev 361) @@ -1,6 +1,6 @@ # $Id$ -pmpdir=$(libdir)/@PACKAGE@ +pmpdir=$(libdir)/$(PLUGIN_DIR) pmp_LTLIBRARIES = iriverplus2.la iriverplus2_la_SOURCES = \ Modified: trunk/pmplib/lib/pmp_iriverplus3/Makefile.am =================================================================== --- trunk/pmplib/lib/pmp_iriverplus3/Makefile.am 2007-02-13 21:25:28 UTC (rev 360) +++ trunk/pmplib/lib/pmp_iriverplus3/Makefile.am 2007-02-13 23:31:21 UTC (rev 361) @@ -1,6 +1,6 @@ # $Id$ -pmpdir=$(libdir)/@PACKAGE@ +pmpdir=$(libdir)/$(PLUGIN_DIR) pmp_LTLIBRARIES = iriverplus3.la iriverplus3_la_SOURCES = \ Modified: trunk/pmplib/lib/pmp_irivnavi/Makefile.am =================================================================== --- trunk/pmplib/lib/pmp_irivnavi/Makefile.am 2007-02-13 21:25:28 UTC (rev 360) +++ trunk/pmplib/lib/pmp_irivnavi/Makefile.am 2007-02-13 23:31:21 UTC (rev 361) @@ -1,6 +1,6 @@ # $Id$ -pmpdir=$(libdir)/@PACKAGE@ +pmpdir=$(libdir)/$(PLUGIN_DIR) pmp_LTLIBRARIES = irivnavi.la irivnavi_la_SOURCES = \ Modified: trunk/pmplib/lib/pmp_portalplayer1/Makefile.am =================================================================== --- trunk/pmplib/lib/pmp_portalplayer1/Makefile.am 2007-02-13 21:25:28 UTC (rev 360) +++ trunk/pmplib/lib/pmp_portalplayer1/Makefile.am 2007-02-13 23:31:21 UTC (rev 361) @@ -1,6 +1,6 @@ # $Id$ -pmpdir=$(libdir)/@PACKAGE@ +pmpdir=$(libdir)/$(PLUGIN_DIR) pmp_LTLIBRARIES = portalplayer1.la portalplayer1_la_SOURCES = \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <suc...@us...> - 2007-02-13 21:25:33
|
Revision: 360 http://svn.sourceforge.net/pmplib/?rev=360&view=rev Author: sucknblow Date: 2007-02-13 13:25:28 -0800 (Tue, 13 Feb 2007) Log Message: ----------- Avoid implicit declaration of string.h functions Modified Paths: -------------- trunk/pmplib/lib/pmp_iriverplus3/ip3db.c trunk/pmplib/lib/pmp_iriverplus3/util.c Modified: trunk/pmplib/lib/pmp_iriverplus3/ip3db.c =================================================================== --- trunk/pmplib/lib/pmp_iriverplus3/ip3db.c 2007-02-13 21:22:10 UTC (rev 359) +++ trunk/pmplib/lib/pmp_iriverplus3/ip3db.c 2007-02-13 21:25:28 UTC (rev 360) @@ -24,6 +24,9 @@ #ifdef HAVE_CONFIG_H #include <config.h> #endif/*HAVE_CONFIG_H*/ +#ifdef HAVE_STRING_H +#include <string.h> +#endif/*HAVE_STRING_H*/ #include <os.h> #include <stdio.h> Modified: trunk/pmplib/lib/pmp_iriverplus3/util.c =================================================================== --- trunk/pmplib/lib/pmp_iriverplus3/util.c 2007-02-13 21:22:10 UTC (rev 359) +++ trunk/pmplib/lib/pmp_iriverplus3/util.c 2007-02-13 21:25:28 UTC (rev 360) @@ -24,6 +24,9 @@ #ifdef HAVE_CONFIG_H #include <config.h> #endif/*HAVE_CONFIG_H*/ +#ifdef HAVE_STRING_H +#include <string.h> +#endif/*HAVE_STRING_H*/ #include <os.h> #include <stdio.h> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <suc...@us...> - 2007-02-13 21:22:22
|
Revision: 359 http://svn.sourceforge.net/pmplib/?rev=359&view=rev Author: sucknblow Date: 2007-02-13 13:22:10 -0800 (Tue, 13 Feb 2007) Log Message: ----------- svn:ignore some generated build system files. svn:eol-style native the pmp_iriverplus3 files, (except the .vcproj file) which seem to have ^M characters. Modified Paths: -------------- trunk/pmplib/lib/pmp_iriverplus3/dat.c trunk/pmplib/lib/pmp_iriverplus3/dat.h trunk/pmplib/lib/pmp_iriverplus3/dic.c trunk/pmplib/lib/pmp_iriverplus3/dic.h trunk/pmplib/lib/pmp_iriverplus3/idx.c trunk/pmplib/lib/pmp_iriverplus3/idx.h trunk/pmplib/lib/pmp_iriverplus3/ip3db.c trunk/pmplib/lib/pmp_iriverplus3/ip3db.h trunk/pmplib/lib/pmp_iriverplus3/pmp_iriverplus3.c trunk/pmplib/lib/pmp_iriverplus3/serialize.c trunk/pmplib/lib/pmp_iriverplus3/serialize.h trunk/pmplib/lib/pmp_iriverplus3/util.c trunk/pmplib/lib/pmp_iriverplus3/util.h Property Changed: ---------------- trunk/pmplib/ trunk/pmplib/include/ trunk/pmplib/include/pmplib/ trunk/pmplib/lib/pmp_iriverplus3/ trunk/pmplib/lib/pmp_iriverplus3/Makefile.am trunk/pmplib/lib/pmp_iriverplus3/dat.c trunk/pmplib/lib/pmp_iriverplus3/dat.h trunk/pmplib/lib/pmp_iriverplus3/dic.c trunk/pmplib/lib/pmp_iriverplus3/dic.h trunk/pmplib/lib/pmp_iriverplus3/idx.c trunk/pmplib/lib/pmp_iriverplus3/idx.h trunk/pmplib/lib/pmp_iriverplus3/ip3db.c trunk/pmplib/lib/pmp_iriverplus3/ip3db.h trunk/pmplib/lib/pmp_iriverplus3/pmp_iriverplus3.c trunk/pmplib/lib/pmp_iriverplus3/serialize.c trunk/pmplib/lib/pmp_iriverplus3/serialize.h trunk/pmplib/lib/pmp_iriverplus3/util.c trunk/pmplib/lib/pmp_iriverplus3/util.h trunk/pmplib/m4/ Property changes on: trunk/pmplib ___________________________________________________________________ Name: svn:ignore + Makefile.in Makefile Property changes on: trunk/pmplib/include ___________________________________________________________________ Name: svn:ignore + Makefile.in Makefile Property changes on: trunk/pmplib/include/pmplib ___________________________________________________________________ Name: svn:ignore + Makefile.in Makefile Property changes on: trunk/pmplib/lib/pmp_iriverplus3 ___________________________________________________________________ Name: svn:ignore + Makefile.in Makefile .libs .deps Property changes on: trunk/pmplib/lib/pmp_iriverplus3/Makefile.am ___________________________________________________________________ Name: svn:eol-style + native Modified: trunk/pmplib/lib/pmp_iriverplus3/dat.c =================================================================== --- trunk/pmplib/lib/pmp_iriverplus3/dat.c 2007-02-12 21:14:08 UTC (rev 358) +++ trunk/pmplib/lib/pmp_iriverplus3/dat.c 2007-02-13 21:22:10 UTC (rev 359) @@ -1,866 +1,866 @@ -/* - * Low-level library for db.dat. - * - * Copyright (c) 2005-2007 Naoaki Okazaki - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -/* $Id$ */ - -/* -Brief summary of db.dat structure: -- 0x00000000-0x0001FFFF: object (path name) chunk -- 0x00020000-0x0003FFFF: music (media information) chunk -- Each chunk has a 16-bytes header at the beginning -- Each chunk has an array of offsets to actual entries at the end (backward) -- Field names in db.dat are defined in db.dic (Music and Objects) -*/ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif/*HAVE_CONFIG_H*/ - -#include <os.h> -#include <stdio.h> -#include <stdlib.h> -#include <memory.h> -#include <pmplib/ucs2char.h> - -#include "serialize.h" -#include "util.h" -#include "ip3db.h" -#include "dic.h" -#include "dat.h" - -#define PAGESIZE 0x00020000 -#define COMP(a, b) ((a)>(b))-((a)<(b)) - -typedef struct { - uint32_t size; - uint32_t num_entries; - uint32_t unknown1; - uint32_t next_page; -} page_header_t; - -struct tag_sort_index_t { - const void* base; - int index; -}; - -static void dat_entry_init(dat_entry_t* entry, const dic_table_t* dic_list) -{ - memset(entry, 0, sizeof(*entry)); - entry->fields = (ip3db_variant_t*)malloc(sizeof(ip3db_variant_t) * dic_list->num_fields); - if (entry->fields) { - int i; - entry->num_fields = dic_list->num_fields; - for (i = 0;i < entry->num_fields;++i) { - ip3db_variant_init(&entry->fields[i], dic_list->fields[i].type); - } - } -} - -static void dat_entry_finish(dat_entry_t* entry) -{ - if (entry) { - int i; - for (i = 0;i < entry->num_fields;++i) { - ip3db_variant_finish(&entry->fields[i]); - } - free(entry->fields); - memset(entry, 0, sizeof(*entry)); - } -} - -static size_t dat_entry_size(dat_entry_t* entry) -{ - int i; - size_t size = 0; - for (i = 0;i < entry->num_fields;++i) { - ip3db_variant_t* var = &entry->fields[i]; - switch (var->type) { - case IP3DBVT_STRING: - size += var->value.str ? sizeof(ucs2char_t) * (ucs2len(var->value.str) + 1) : sizeof(ucs2char_t); - break; - case IP3DBVT_BYTE: - size += sizeof(uint8_t); - break; - case IP3DBVT_WORD: - size += sizeof(uint16_t); - break; - case IP3DBVT_DWORD: - size += sizeof(uint32_t); - break; - } - } - return size; -} - -static size_t dat_entry_serialize(dat_entry_t* entry, uint8_t* block, int is_storing) -{ - int i; - uint8_t *p = block; - - /* Serialize all fields in this entry. */ - for (i = 0;i < entry->num_fields;++i) { - ip3db_variant_t* var = &entry->fields[i]; - switch (var->type) { - case IP3DBVT_STRING: - if (is_storing) { - if (var->value.str) { - p += (serialize_ucs2be_string_var(p, var->value.str, is_storing) + 1) * sizeof(ucs2char_t); - } else { - ucs2char_t v = 0; - p += serialize_ucs2be(p, &v, is_storing); - } - } else { - p += (serialize_ucs2be_string_var_alloc(p, &var->value.str) + 1) * sizeof(ucs2char_t); - } - break; - case IP3DBVT_BYTE: - p += serialize_uint8(p, &var->value.byte, is_storing); - break; - case IP3DBVT_WORD: - p += serialize_uint16be(p, &var->value.word, is_storing); - break; - case IP3DBVT_DWORD: - p += serialize_uint32be(p, &var->value.dword, is_storing); - break; - } - } - - return (size_t)(p - block); -} - -static void dat_entry_dump(dat_entry_t* entry, const dic_table_t* dic_list, FILE *fp) -{ - int i; - - /* Loop for all fields in this entry. */ - for (i = 0;i < entry->num_fields;++i) { - ip3db_variant_t* var = &entry->fields[i]; - - /* Output the field name. */ - fprints(fp, " %s: ", dic_list->fields[i].name); - - /* Output its value. */ - switch (var->type) { - case IP3DBVT_STRING: - fprints(fp, "%s\n", var->value.str); - break; - case IP3DBVT_BYTE: - fprintf(fp, "0x%02X\n", var->value.byte); - break; - case IP3DBVT_WORD: - fprintf(fp, "%d\n", var->value.word); - break; - case IP3DBVT_DWORD: - fprintf(fp, "%d\n", var->value.dword); - break; - } - } -} - - - -static void dat_list_init(dat_list_t* list) -{ - memset(list, 0, sizeof(*list)); -} - -static void dat_list_finish(dat_list_t* list) -{ - if (list) { - if (list->entries) { - uint32_t i; - for (i = 0;i < list->num_entries;++i) { - dat_entry_finish(&list->entries[i]); - } - free(list->entries); - } - memset(list, 0, sizeof(*list)); - } -} - -static dat_entry_t *dat_list_expand(dat_list_t* list) -{ - list->entries = (dat_entry_t*)realloc(list->entries, sizeof(dat_entry_t) * (list->num_entries+1)); - return &list->entries[list->num_entries++]; -} - -static size_t dat_list_read(dat_list_t* list, page_header_t* header, const dic_table_t* dic_list, uint8_t* buffer, uint32_t start) -{ - uint32_t i; - uint8_t *p = buffer + start; - uint8_t *q = buffer + start + PAGESIZE - sizeof(uint32_t); - - /* Read the header. */ - p += serialize_uint32be(p, &header->size, 0); - p += serialize_uint32be(p, &header->num_entries, 0); - p += serialize_uint32be(p, &header->unknown1, 0); - p += serialize_uint32be(p, &header->next_page, 0); - - /* Expand the array of records. */ - list->entries = (dat_entry_t*)realloc(list->entries, sizeof(dat_entry_t) * (list->num_entries + header->num_entries)); - for (i = 0;i < header->num_entries;++i) { - dat_entry_init(&list->entries[list->num_entries+i], dic_list); - } - - /* Read the new records. */ - for (i = 0;i < header->num_entries;++i) { - uint32_t offset = 0; - dat_entry_t* entry = &list->entries[list->num_entries+i]; - - /* Read the offset table. */ - q -= serialize_uint32be(q, &offset, 0); - entry->offset = offset + start; - - p += dat_entry_serialize(entry, buffer + entry->offset, 0); - } - - list->num_entries += header->num_entries; - return (size_t)(header->size); -} - -static size_t dat_list_write(dat_list_t* list, uint32_t i, page_header_t* header, uint8_t* buffer, uint32_t start) -{ - uint8_t *p = buffer + start; - uint8_t *q = buffer + start + PAGESIZE - sizeof(uint32_t); - - header->size = 0; - header->num_entries = 0; - - /* Skip the header for now when writing. */ - p += sizeof(uint32_t) * 4; - - /* Write records. */ - while (i < list->num_entries) { - uint32_t offset = 0; - size_t free_space = (size_t)(q-p); - dat_entry_t* entry = &list->entries[i]; - if (free_space < dat_entry_size(entry)) { - break; - } - entry->offset = (uint32_t)(p - buffer); /* compute the current offset address */ - - offset = entry->offset - start; - q -= serialize_uint32be(q, &offset, 1); - - p += dat_entry_serialize(entry, p, 1); - header->num_entries++; - i++; - } - - /* Compute the block size and write the header. */ - header->size = (uint32_t)(p - (buffer + start)); - if (list->num_entries <= i) { - header->next_page = 0; - } - - p = buffer + start; - p += serialize_uint32be(p, &header->size, 1); - p += serialize_uint32be(p, &header->num_entries, 1); - p += serialize_uint32be(p, &header->unknown1, 1); - p += serialize_uint32be(p, &header->next_page, 1); - return header->size; -} - -static void dat_list_dump(dat_list_t* list, const dic_table_t* dic_list, FILE *fp) -{ - uint32_t i; - for (i = 0;i < list->num_entries;++i) { - dat_entry_t* entry = &list->entries[i]; - fprintf(fp, " ENTRY %d (0x%08X) = {\n", i, entry->offset); - dat_entry_dump(entry, dic_list, fp); - fprintf(fp, " }\n"); - } -} - - - -static int comp_object_uid(const void *__x, const void *__y) -{ - const sort_index_t* _x = (const sort_index_t*)__x; - const sort_index_t* _y = (const sort_index_t*)__y; - const dat_list_t* _xb = (const dat_list_t*)_x->base; - const dat_list_t* _yb = (const dat_list_t*)_y->base; - const ip3db_variant_t* x = _xb->entries[_x->index].fields; - const ip3db_variant_t* y = _yb->entries[_y->index].fields; - return COMP(x[IP3DBF_OBJECTS_UID].value.dword, y[IP3DBF_OBJECTS_UID].value.dword); -} - -static sort_index_t* dat_uidmap_create(dat_list_t* list) -{ - int i; - sort_index_t* si = (sort_index_t*)malloc(sizeof(sort_index_t) * list->num_entries); - - if (si) { - /* Sort UIDs. */ - for (i = 0;i < list->num_entries;++i) { - si[i].base = list; - si[i].index = i; - } - qsort(si, list->num_entries, sizeof(si[0]), comp_object_uid); - } - return si; -} - -static void dat_uidmap_finish(sort_index_t* si) -{ - free(si); -} - -static int dat_uidmap_get(sort_index_t* si, dat_list_t* list, uint32_t uid) -{ - int low = 0, high = list->num_entries-1; - - /* Binary search. */ - while (low <= high) { - int middle = (low + high) / 2; - int comp = COMP(uid, list->entries[si[middle].index].fields[IP3DBF_OBJECTS_UID].value.dword); - if (comp == 0) { - /* Found */ - return si[middle].index; - } else if (comp < 0) { - high = middle - 1; - } else { - low = middle + 1; - } - } - return -1; -} - -static ucs2char_t* ucs2append(const ucs2char_t* x, const ucs2char_t* y) -{ - ucs2char_t* ret = NULL; - size_t length = 0; - length += x ? ucs2len(x) : 0; - length += y ? ucs2len(y) : 0; - ret = ucs2calloc(sizeof(ucs2char_t) * (length+1)); - if (x) ucs2cat(ret, x); - if (y) ucs2cat(ret, y); - return ret; -} - - - -dat_t* dat_new() -{ - dat_t* dat = (dat_t*)calloc(1, sizeof(dat_t)); - if (dat) { - dat_list_init(&dat->objects); - dat_list_init(&dat->musics); - dat_list_init(&dat->references); - } - return dat; -} - -void dat_finish(dat_t* dat) -{ - dat_list_finish(&dat->objects); - dat_list_finish(&dat->musics); - dat_list_finish(&dat->references); - free(dat); -} - -int dat_read(dat_t* dat, const dic_t* dic, FILE *fpi) -{ - uint32_t i = 0, page = 0; - page_header_t ph; - long buffer_size = 0; - uint8_t* buffer = NULL; - - /* Read the whole image. */ - fread_all(fpi, &buffer, &buffer_size); - if (!buffer) { - return 1; - } - - /* Clear Object records. */ - dat_list_finish(&dat->objects); - - /* Read Objects page(s) */ - page = dic->objects.dat_page; - while (page) { - dat_list_read(&dat->objects, &ph, &dic->objects, buffer, PAGESIZE * (page - 1)); - page = ph.next_page; - } - - /* Construct Object UID -> dat->objects[i] mapping table. */ - dat_uidmap_finish(dat->objects_uidmap); - dat->objects_uidmap = dat_uidmap_create(&dat->objects); - - /* Clear Music records. */ - dat_list_finish(&dat->musics); - - /* Read Music page(s) */ - page = dic->music.dat_page; - while (page) { - dat_list_read(&dat->musics, &ph, &dic->music, buffer, PAGESIZE * (page - 1)); - page = ph.next_page; - } - - /* Set filename and pathname fields. */ - for (i = 0;i < dat->musics.num_entries;++i) { - dat_entry_t* entry = &dat->musics.entries[i]; - int index = dat_uidmap_get(dat->objects_uidmap, &dat->objects, entry->fields[IP3DBF_MUSIC_UID].value.dword); - if (0 <= index) { - static const ucs2char_t ucs2cs_root[] = {'/',0}; - ucs2char_t* pathname = NULL; - ucs2char_t* tmp = NULL; - size_t length = 0; - - /* Set the filename. */ - ip3db_variant_set_str( - &entry->fields[IP3DBF_MUSIC_FILENAME], - dat->objects.entries[index].fields[IP3DBF_OBJECTS_OBJECTNAME].value.str - ); - - /* Obtain the pathname by tracing parent UIDs. */ - for (;;) { - uint32_t parent_uid = dat->objects.entries[index].fields[IP3DBF_OBJECTS_PARENTUID].value.dword; - if (parent_uid == 0xFFFFFFFF) { - break; - } - index = dat_uidmap_get(dat->objects_uidmap, &dat->objects, parent_uid); - if (index < 0) { - break; - } - tmp = ucs2append( - dat->objects.entries[index].fields[IP3DBF_OBJECTS_OBJECTNAME].value.str, - pathname - ); - ucs2free(pathname); - pathname = tmp; - } - - tmp = ucs2append(ucs2cs_root, pathname); - ucs2free(pathname); - pathname = tmp; - ip3db_variant_set_str(&entry->fields[IP3DBF_MUSIC_FILEPATH], pathname); - ucs2free(pathname); - } - } - - /* Read References page(s) */ - page = dic->references.dat_page; - while (page) { - dat_list_read(&dat->references, &ph, &dic->references, buffer, PAGESIZE * (page - 1)); - page = ph.next_page; - } - - free(buffer); - return 0; -} - -int dat_write(dat_t* dat, dic_t* dic, FILE *fpo) -{ - uint32_t i = 0, page = 0; - page_header_t ph; - long buffer_size = 0; - uint8_t* buffer = NULL; - - /* Initialize the number of pages as zero. */ - dic->header.num_dat_pages = 0; - dic->objects.dat_page = 0; - dic->music.dat_page = 0; - dic->references.dat_page = 0; - - memset(&ph, 0, sizeof(ph)); - - /* Write Objects page(s) */ - if (0 < dat->objects.num_entries) { - i = 0; - dic->objects.dat_page = page = (dic->header.num_dat_pages + 1); - while (page) { - buffer_size = PAGESIZE * page; - buffer = (uint8_t*)realloc(buffer, sizeof(uint8_t) * buffer_size); - memset(buffer + PAGESIZE * (page - 1), 0, PAGESIZE); - - ph.next_page = page + 1; - dat_list_write(&dat->objects, i, &ph, buffer, PAGESIZE * (page - 1)); - - i += ph.num_entries; - dic->header.num_dat_pages += 1; - page = ph.next_page; - } - } - - /* Clear filepath and filename */ - for (i = 0;i < dat->musics.num_entries;++i) { - static const ucs2char_t empty[] = {0}; - dat_entry_t* entry = &dat->musics.entries[i]; - ip3db_variant_set_str(&entry->fields[IP3DBF_MUSIC_FILEPATH], empty); - ip3db_variant_set_str(&entry->fields[IP3DBF_MUSIC_FILENAME], empty); - } - - /* Write Music page(s) */ - if (0 < dat->musics.num_entries) { - i = 0; - dic->music.dat_page = page = (dic->header.num_dat_pages+1); - while (page) { - buffer_size = PAGESIZE * page; - buffer = (uint8_t*)realloc(buffer, sizeof(uint8_t) * buffer_size); - memset(buffer + PAGESIZE * (page - 1), 0, PAGESIZE); - - ph.next_page = page + 1; - dat_list_write(&dat->musics, i, &ph, buffer, PAGESIZE * (page - 1)); - - i += ph.num_entries; - dic->header.num_dat_pages += 1; - page = ph.next_page; - } - } - - /* Write References page(s) */ - if (0 < dat->references.num_entries) { - i = 0; - dic->references.dat_page = page = (dic->header.num_dat_pages+1); - while (page) { - buffer_size = PAGESIZE * page; - buffer = (uint8_t*)realloc(buffer, sizeof(uint8_t) * buffer_size); - memset(buffer + PAGESIZE * (page - 1), 0, PAGESIZE); - - ph.next_page = page + 1; - dat_list_write(&dat->references, i, &ph, buffer, PAGESIZE * (page - 1)); - - i += ph.num_entries; - dic->header.num_dat_pages += 1; - page = ph.next_page; - } - } - - /* Write out the pages to the file. */ - if (buffer && buffer_size > 0) { - if (fwrite(buffer, 1, buffer_size, fpo) != buffer_size) { - free(buffer); - return 1; - } - } - - free(buffer); - return 0; -} - -void dat_dump(dat_t* dat, const dic_t* dic, FILE *fp) -{ - fprintf(fp, "===== db.dat =====\n"); - fprintf(fp, "OBJECTS = {\n"); - dat_list_dump(&dat->objects, &dic->objects, fp); - fprintf(fp, "}\n"); - fprintf(fp, "MUSIC = {\n"); - dat_list_dump(&dat->musics, &dic->music, fp); - fprintf(fp, "}\n"); - fprintf(fp, "REFERENCES = {\n"); - dat_list_dump(&dat->references, &dic->references, fp); - fprintf(fp, "}\n"); -} - - - -static uint32_t findfile(dat_t* dat, const ucs2char_t *filename) -{ - int i; - const ucs2char_t *filepart = NULL; - ucs2char_t *pathname = alloca(sizeof(ucs2char_t) * (ucs2len(filename) + 1)); - - filepart = ucs2rchr(filename, '/'); - if (!filepart) { - filepart = filename; - } else { - filepart++; - } - - ucs2ncpy(pathname, filename, (filepart-filename)); - pathname[filepart-filename] = 0; - - for (i = 0;i < dat->musics.num_entries;++i) { - dat_entry_t* entry = &dat->musics.entries[i]; - if (ucs2icmp(entry->fields[IP3DBF_MUSIC_FILENAME].value.str, filepart) == 0 && - ucs2icmp(entry->fields[IP3DBF_MUSIC_FILEPATH].value.str, pathname) == 0) { - return entry->fields[IP3DBF_MUSIC_UID].value.dword; - } - } - return 0; -} - -typedef struct { - ucs2char_t* path; - uint32_t uid; -} dircache_element_t; - -typedef struct { - int max_elems; - int num_elems; - dircache_element_t* elems; -} dircache_t; - -static void dircache_init(dircache_t* dc) -{ - memset(dc, 0, sizeof(*dc)); -} - -static void dircache_finish(dircache_t* dc) -{ - int i; - for (i = 0;i < dc->max_elems;++i) { - ucs2free(dc->elems[i].path); - } - free(dc->elems); -} - -static void dircache_push(dircache_t* dc, const ucs2char_t* path, uint32_t uid) -{ - dircache_element_t* elem = NULL; - - if (dc->max_elems < dc->num_elems + 1) { - dc->elems = (dircache_element_t*)realloc(dc->elems, sizeof(dircache_element_t) * (dc->max_elems+1)); - memset(&dc->elems[dc->max_elems], 0, sizeof(dircache_element_t)); - ++dc->max_elems; - } - - elem = &dc->elems[dc->num_elems++]; - ucs2free(elem->path); - elem->path = ucs2dup(path); - elem->uid = uid; -} - -static void dircache_pop(dircache_t* dc, int i) -{ - int n = ++i; - for (;i < dc->num_elems;++i) { - ucs2free(dc->elems[i].path); - memset(&dc->elems[i], 0, sizeof(dc->elems[0])); - } - dc->num_elems = n; -} - -static int dircache_findprefix(dircache_t* dc, const ucs2char_t* path) -{ - int i = dc->num_elems; - while (--i >= 0) { - if (ucs2ncmp(path, dc->elems[i].path, ucs2len(dc->elems[i].path)) == 0) { - break; - } - } - return i; -} - -static dircache_element_t *dircache_get(dircache_t* dc, int i) -{ - return &dc->elems[i]; -} - - -typedef struct { - const ucs2char_t* filepath; - const ucs2char_t* filename; - uint8_t filetype; - int index; -} object_record_t; - - -static int comp_pathname(const void *_x, const void *_y) -{ - const object_record_t* x = (const object_record_t*)_x; - const object_record_t* y = (const object_record_t*)_y; - int ret = ucs2cmp(x->filepath, y->filepath); - if (ret == 0) { - return ucs2cmp(x->filename, y->filename); - } else { - return ret; - } -} - - - -static const ucs2char_t* skip_one_directory(const ucs2char_t* path) -{ - ucs2char_t* p = ucs2chr(path, '/'); - return p ? p+1 : NULL; -} - -void dat_set(dat_t* dat, dic_t* dic, const ip3db_music_record_t* records, int num_records, ip3db_playlist_t* playlists, int num_playlists) -{ - /* Procedure: - * 1) Construct the object chunk and attach music records with Object UIDs. - * Because the object chunk stores a tree structure of path names, we need to - * split a path name to elements and allocate an Object UID to each element. - * For example, the path name "/Music/Beatles/Love/01_love.ogg" will generate - * five objects each of which links to the object of the parent directory: - * - UID=0xFFFFFFFF: "/a/" (root directory; FileType = 0) - * - UID=1 : "Music/" (FileType = 1) - * - UID=2 : "Beatles/" (FileType = 1) - * - UID=3 : "Love/" (FileType = 1) - * - UID=4 : "01_love.ogg" (FileType = 2) - * In order to convert a list of path names to the tree structure, this - * implementation sorts the path names in alphabetical order and finds new - * path elements by using a directory queue (dircache_t). - * - * 3) Attach Object UIDs for file names (FileType = 2) to music records. - * These UIDs are stored in records in the music chunk so that the player - * can refer to the path/file name of a music track quickly. - * - * 4) Construct the music chunk by basically duplicating the records. - * - * Now the content of db.dat is ready. Note that the path character in db.dat - * is not '\\' but '/'. - */ - - int i, j; - dat_entry_t* entry; - uint32_t uid = 0; - static const uint32_t uid_root = 0xFFFFFFFF; - static const ucs2char_t ucs2cs_object_root[] = {'/','a','/',0}; - static const ucs2char_t ucs2cs_root[] = {'/', 0}; - dat_list_t* dato = &dat->objects; - dat_list_t* datm = &dat->musics; - dat_list_t* datr = &dat->references; - uint32_t num_objects = num_records + num_playlists; - object_record_t *objects = (object_record_t*)malloc(sizeof(object_record_t) * num_objects); - dircache_t dc; - - dircache_init(&dc); - - /* Clear all entries. */ - dat_list_finish(dato); - dat_list_finish(datm); - dat_list_finish(datr); - dat_uidmap_finish(dat->objects_uidmap); - - /* Append an entry for the root directory. */ - entry = dat_list_expand(dato); - dat_entry_init(entry, &dic->objects); - ip3db_variant_set_str(&entry->fields[IP3DBF_OBJECTS_OBJECTNAME], ucs2cs_object_root); - ip3db_variant_set_dword(&entry->fields[IP3DBF_OBJECTS_UID], uid_root); - - /* Register the root node to the directory cache. */ - dircache_push(&dc, ucs2cs_root, uid_root); - - /* Sort the records in alphabetical order of their path names. */ - for (i = 0;i < num_records;++i) { - objects[i].filepath = records[i][IP3DBF_MUSIC_FILEPATH].value.str; - objects[i].filename = records[i][IP3DBF_MUSIC_FILENAME].value.str; - objects[i].filetype = 2; - objects[i].index = i; - } - for (i = 0;i < num_playlists;++i) { - objects[i+num_records].filepath = playlists[i].filepath; - objects[i+num_records].filename = playlists[i].filename; - objects[i+num_records].filetype = 4; - objects[i+num_records].index = i; - } - qsort(objects, num_objects, sizeof(objects[0]), comp_pathname); - - /* Loop for the records. */ - for (i = 0;i < num_objects;++i) { - /* - * Split a path name into two parts: a prefix that have already been - * registered in the Object table: and a postfix that is being registered - * as Object records. - */ - const ucs2char_t* path = objects[i].filepath; - const ucs2char_t* file = objects[i].filename; - int k = dircache_findprefix(&dc, path); - const dircache_element_t* com = dircache_get(&dc, k); - const ucs2char_t* p = path + ucs2len(com->path); /* the prefix */ - uint32_t puid = com->uid; /* the UID of the parent directory of the postfix */ - - /* Discard directory portions that do not share a prefix with the target. */ - dircache_pop(&dc, k); - - /* Create objects one by one for the directory portions in the postfix. */ - while (p && *p) { - ucs2char_t tmp[MAX_PATH]; - const ucs2char_t* q = skip_one_directory(p); - uid = dato->num_entries; - - /* A directory element (e.g., "Beatles/") */ - ucs2ncpy(tmp, p, q-p); - tmp[q-p] = 0; - - /* Create a new object. */ - entry = dat_list_expand(dato); - dat_entry_init(entry, &dic->objects); - ip3db_variant_set_dword(&entry->fields[IP3DBF_OBJECTS_UID], uid); - ip3db_variant_set_dword(&entry->fields[IP3DBF_OBJECTS_PARENTUID], puid); - ip3db_variant_set_word(&entry->fields[IP3DBF_OBJECTS_FILETYPE], 1); - ip3db_variant_set_str(&entry->fields[IP3DBF_OBJECTS_OBJECTNAME], tmp); - - /* Register the fullpath (e.g., "/Music/eatles/" in the dircache. */ - ucs2ncpy(tmp, path, q-path); - tmp[q-path] = 0; - dircache_push(&dc, tmp, uid); - - /* Store the current UID for children. */ - puid = uid; - - /* Move to the next portion. */ - p = q; - } - - /* Create a new object for the file name (FileType = 2). */ - if (objects[i].filetype == 2) { - /* Music file. */ - const ip3db_variant_t* record = records[objects[i].index]; - - uid = dato->num_entries; - entry = dat_list_expand(dato); - dat_entry_init(entry, &dic->objects); - ip3db_variant_set_dword(&entry->fields[IP3DBF_OBJECTS_UID], uid); - ip3db_variant_set_dword(&entry->fields[IP3DBF_OBJECTS_PARENTUID], puid); - ip3db_variant_set_word(&entry->fields[IP3DBF_OBJECTS_FILETYPE], 2); - ip3db_variant_set_str(&entry->fields[IP3DBF_OBJECTS_OBJECTNAME], file); - - /* Create a music record with UID referring to the file name. */ - entry = dat_list_expand(datm); - dat_entry_init(entry, &dic->music); - for (j = 0;j < entry->num_fields;++j) { - ip3db_variant_clone(&entry->fields[j], &record[j]); - } - ip3db_variant_set_dword(&entry->fields[IP3DBF_MUSIC_UID], uid); - } else if (objects[i].filetype == 4) { - /* Playlist file. */ - ip3db_playlist_t* pl = &playlists[objects[i].index]; - - pl->uid = dato->num_entries; - entry = dat_list_expand(dato); - dat_entry_init(entry, &dic->objects); - ip3db_variant_set_dword(&entry->fields[IP3DBF_OBJECTS_UID], pl->uid); - ip3db_variant_set_dword(&entry->fields[IP3DBF_OBJECTS_PARENTUID], puid); - ip3db_variant_set_word(&entry->fields[IP3DBF_OBJECTS_FILETYPE], 4); - ip3db_variant_set_str(&entry->fields[IP3DBF_OBJECTS_OBJECTNAME], file); - } - } - - /* Loop for playlists. */ - for (i = 0;i < num_playlists;++i) { - const ip3db_playlist_t* pl = &playlists[i]; - for (j = 0;j < pl->num_entries;++j) { - entry = dat_list_expand(datr); - dat_entry_init(entry, &dic->references); - - ip3db_variant_set_dword(&entry->fields[IP3DBF_REFERENCES_PARENTCLUSTER], pl->uid); - ip3db_variant_set_dword(&entry->fields[IP3DBF_REFERENCES_CHILDCLUSTER], findfile(dat, pl->entries[j])); - ip3db_variant_set_word(&entry->fields[IP3DBF_REFERENCES_FILEFORMAT], 0x3009); - } - } - - dircache_finish(&dc); - - dat->objects_uidmap = dat_uidmap_create(&dat->objects); -} +/* + * Low-level library for db.dat. + * + * Copyright (c) 2005-2007 Naoaki Okazaki + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +/* $Id$ */ + +/* +Brief summary of db.dat structure: +- 0x00000000-0x0001FFFF: object (path name) chunk +- 0x00020000-0x0003FFFF: music (media information) chunk +- Each chunk has a 16-bytes header at the beginning +- Each chunk has an array of offsets to actual entries at the end (backward) +- Field names in db.dat are defined in db.dic (Music and Objects) +*/ + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif/*HAVE_CONFIG_H*/ + +#include <os.h> +#include <stdio.h> +#include <stdlib.h> +#include <memory.h> +#include <pmplib/ucs2char.h> + +#include "serialize.h" +#include "util.h" +#include "ip3db.h" +#include "dic.h" +#include "dat.h" + +#define PAGESIZE 0x00020000 +#define COMP(a, b) ((a)>(b))-((a)<(b)) + +typedef struct { + uint32_t size; + uint32_t num_entries; + uint32_t unknown1; + uint32_t next_page; +} page_header_t; + +struct tag_sort_index_t { + const void* base; + int index; +}; + +static void dat_entry_init(dat_entry_t* entry, const dic_table_t* dic_list) +{ + memset(entry, 0, sizeof(*entry)); + entry->fields = (ip3db_variant_t*)malloc(sizeof(ip3db_variant_t) * dic_list->num_fields); + if (entry->fields) { + int i; + entry->num_fields = dic_list->num_fields; + for (i = 0;i < entry->num_fields;++i) { + ip3db_variant_init(&entry->fields[i], dic_list->fields[i].type); + } + } +} + +static void dat_entry_finish(dat_entry_t* entry) +{ + if (entry) { + int i; + for (i = 0;i < entry->num_fields;++i) { + ip3db_variant_finish(&entry->fields[i]); + } + free(entry->fields); + memset(entry, 0, sizeof(*entry)); + } +} + +static size_t dat_entry_size(dat_entry_t* entry) +{ + int i; + size_t size = 0; + for (i = 0;i < entry->num_fields;++i) { + ip3db_variant_t* var = &entry->fields[i]; + switch (var->type) { + case IP3DBVT_STRING: + size += var->value.str ? sizeof(ucs2char_t) * (ucs2len(var->value.str) + 1) : sizeof(ucs2char_t); + break; + case IP3DBVT_BYTE: + size += sizeof(uint8_t); + break; + case IP3DBVT_WORD: + size += sizeof(uint16_t); + break; + case IP3DBVT_DWORD: + size += sizeof(uint32_t); + break; + } + } + return size; +} + +static size_t dat_entry_serialize(dat_entry_t* entry, uint8_t* block, int is_storing) +{ + int i; + uint8_t *p = block; + + /* Serialize all fields in this entry. */ + for (i = 0;i < entry->num_fields;++i) { + ip3db_variant_t* var = &entry->fields[i]; + switch (var->type) { + case IP3DBVT_STRING: + if (is_storing) { + if (var->value.str) { + p += (serialize_ucs2be_string_var(p, var->value.str, is_storing) + 1) * sizeof(ucs2char_t); + } else { + ucs2char_t v = 0; + p += serialize_ucs2be(p, &v, is_storing); + } + } else { + p += (serialize_ucs2be_string_var_alloc(p, &var->value.str) + 1) * sizeof(ucs2char_t); + } + break; + case IP3DBVT_BYTE: + p += serialize_uint8(p, &var->value.byte, is_storing); + break; + case IP3DBVT_WORD: + p += serialize_uint16be(p, &var->value.word, is_storing); + break; + case IP3DBVT_DWORD: + p += serialize_uint32be(p, &var->value.dword, is_storing); + break; + } + } + + return (size_t)(p - block); +} + +static void dat_entry_dump(dat_entry_t* entry, const dic_table_t* dic_list, FILE *fp) +{ + int i; + + /* Loop for all fields in this entry. */ + for (i = 0;i < entry->num_fields;++i) { + ip3db_variant_t* var = &entry->fields[i]; + + /* Output the field name. */ + fprints(fp, " %s: ", dic_list->fields[i].name); + + /* Output its value. */ + switch (var->type) { + case IP3DBVT_STRING: + fprints(fp, "%s\n", var->value.str); + break; + case IP3DBVT_BYTE: + fprintf(fp, "0x%02X\n", var->value.byte); + break; + case IP3DBVT_WORD: + fprintf(fp, "%d\n", var->value.word); + break; + case IP3DBVT_DWORD: + fprintf(fp, "%d\n", var->value.dword); + break; + } + } +} + + + +static void dat_list_init(dat_list_t* list) +{ + memset(list, 0, sizeof(*list)); +} + +static void dat_list_finish(dat_list_t* list) +{ + if (list) { + if (list->entries) { + uint32_t i; + for (i = 0;i < list->num_entries;++i) { + dat_entry_finish(&list->entries[i]); + } + free(list->entries); + } + memset(list, 0, sizeof(*list)); + } +} + +static dat_entry_t *dat_list_expand(dat_list_t* list) +{ + list->entries = (dat_entry_t*)realloc(list->entries, sizeof(dat_entry_t) * (list->num_entries+1)); + return &list->entries[list->num_entries++]; +} + +static size_t dat_list_read(dat_list_t* list, page_header_t* header, const dic_table_t* dic_list, uint8_t* buffer, uint32_t start) +{ + uint32_t i; + uint8_t *p = buffer + start; + uint8_t *q = buffer + start + PAGESIZE - sizeof(uint32_t); + + /* Read the header. */ + p += serialize_uint32be(p, &header->size, 0); + p += serialize_uint32be(p, &header->num_entries, 0); + p += serialize_uint32be(p, &header->unknown1, 0); + p += serialize_uint32be(p, &header->next_page, 0); + + /* Expand the array of records. */ + list->entries = (dat_entry_t*)realloc(list->entries, sizeof(dat_entry_t) * (list->num_entries + header->num_entries)); + for (i = 0;i < header->num_entries;++i) { + dat_entry_init(&list->entries[list->num_entries+i], dic_list); + } + + /* Read the new records. */ + for (i = 0;i < header->num_entries;++i) { + uint32_t offset = 0; + dat_entry_t* entry = &list->entries[list->num_entries+i]; + + /* Read the offset table. */ + q -= serialize_uint32be(q, &offset, 0); + entry->offset = offset + start; + + p += dat_entry_serialize(entry, buffer + entry->offset, 0); + } + + list->num_entries += header->num_entries; + return (size_t)(header->size); +} + +static size_t dat_list_write(dat_list_t* list, uint32_t i, page_header_t* header, uint8_t* buffer, uint32_t start) +{ + uint8_t *p = buffer + start; + uint8_t *q = buffer + start + PAGESIZE - sizeof(uint32_t); + + header->size = 0; + header->num_entries = 0; + + /* Skip the header for now when writing. */ + p += sizeof(uint32_t) * 4; + + /* Write records. */ + while (i < list->num_entries) { + uint32_t offset = 0; + size_t free_space = (size_t)(q-p); + dat_entry_t* entry = &list->entries[i]; + if (free_space < dat_entry_size(entry)) { + break; + } + entry->offset = (uint32_t)(p - buffer); /* compute the current offset address */ + + offset = entry->offset - start; + q -= serialize_uint32be(q, &offset, 1); + + p += dat_entry_serialize(entry, p, 1); + header->num_entries++; + i++; + } + + /* Compute the block size and write the header. */ + header->size = (uint32_t)(p - (buffer + start)); + if (list->num_entries <= i) { + header->next_page = 0; + } + + p = buffer + start; + p += serialize_uint32be(p, &header->size, 1); + p += serialize_uint32be(p, &header->num_entries, 1); + p += serialize_uint32be(p, &header->unknown1, 1); + p += serialize_uint32be(p, &header->next_page, 1); + return header->size; +} + +static void dat_list_dump(dat_list_t* list, const dic_table_t* dic_list, FILE *fp) +{ + uint32_t i; + for (i = 0;i < list->num_entries;++i) { + dat_entry_t* entry = &list->entries[i]; + fprintf(fp, " ENTRY %d (0x%08X) = {\n", i, entry->offset); + dat_entry_dump(entry, dic_list, fp); + fprintf(fp, " }\n"); + } +} + + + +static int comp_object_uid(const void *__x, const void *__y) +{ + const sort_index_t* _x = (const sort_index_t*)__x; + const sort_index_t* _y = (const sort_index_t*)__y; + const dat_list_t* _xb = (const dat_list_t*)_x->base; + const dat_list_t* _yb = (const dat_list_t*)_y->base; + const ip3db_variant_t* x = _xb->entries[_x->index].fields; + const ip3db_variant_t* y = _yb->entries[_y->index].fields; + return COMP(x[IP3DBF_OBJECTS_UID].value.dword, y[IP3DBF_OBJECTS_UID].value.dword); +} + +static sort_index_t* dat_uidmap_create(dat_list_t* list) +{ + int i; + sort_index_t* si = (sort_index_t*)malloc(sizeof(sort_index_t) * list->num_entries); + + if (si) { + /* Sort UIDs. */ + for (i = 0;i < list->num_entries;++i) { + si[i].base = list; + si[i].index = i; + } + qsort(si, list->num_entries, sizeof(si[0]), comp_object_uid); + } + return si; +} + +static void dat_uidmap_finish(sort_index_t* si) +{ + free(si); +} + +static int dat_uidmap_get(sort_index_t* si, dat_list_t* list, uint32_t uid) +{ + int low = 0, high = list->num_entries-1; + + /* Binary search. */ + while (low <= high) { + int middle = (low + high) / 2; + int comp = COMP(uid, list->entries[si[middle].index].fields[IP3DBF_OBJECTS_UID].value.dword); + if (comp == 0) { + /* Found */ + return si[middle].index; + } else if (comp < 0) { + high = middle - 1; + } else { + low = middle + 1; + } + } + return -1; +} + +static ucs2char_t* ucs2append(const ucs2char_t* x, const ucs2char_t* y) +{ + ucs2char_t* ret = NULL; + size_t length = 0; + length += x ? ucs2len(x) : 0; + length += y ? ucs2len(y) : 0; + ret = ucs2calloc(sizeof(ucs2char_t) * (length+1)); + if (x) ucs2cat(ret, x); + if (y) ucs2cat(ret, y); + return ret; +} + + + +dat_t* dat_new() +{ + dat_t* dat = (dat_t*)calloc(1, sizeof(dat_t)); + if (dat) { + dat_list_init(&dat->objects); + dat_list_init(&dat->musics); + dat_list_init(&dat->references); + } + return dat; +} + +void dat_finish(dat_t* dat) +{ + dat_list_finish(&dat->objects); + dat_list_finish(&dat->musics); + dat_list_finish(&dat->references); + free(dat); +} + +int dat_read(dat_t* dat, const dic_t* dic, FILE *fpi) +{ + uint32_t i = 0, page = 0; + page_header_t ph; + long buffer_size = 0; + uint8_t* buffer = NULL; + + /* Read the whole image. */ + fread_all(fpi, &buffer, &buffer_size); + if (!buffer) { + return 1; + } + + /* Clear Object records. */ + dat_list_finish(&dat->objects); + + /* Read Objects page(s) */ + page = dic->objects.dat_page; + while (page) { + dat_list_read(&dat->objects, &ph, &dic->objects, buffer, PAGESIZE * (page - 1)); + page = ph.next_page; + } + + /* Construct Object UID -> dat->objects[i] mapping table. */ + dat_uidmap_finish(dat->objects_uidmap); + dat->objects_uidmap = dat_uidmap_create(&dat->objects); + + /* Clear Music records. */ + dat_list_finish(&dat->musics); + + /* Read Music page(s) */ + page = dic->music.dat_page; + while (page) { + dat_list_read(&dat->musics, &ph, &dic->music, buffer, PAGESIZE * (page - 1)); + page = ph.next_page; + } + + /* Set filename and pathname fields. */ + for (i = 0;i < dat->musics.num_entries;++i) { + dat_entry_t* entry = &dat->musics.entries[i]; + int index = dat_uidmap_get(dat->objects_uidmap, &dat->objects, entry->fields[IP3DBF_MUSIC_UID].value.dword); + if (0 <= index) { + static const ucs2char_t ucs2cs_root[] = {'/',0}; + ucs2char_t* pathname = NULL; + ucs2char_t* tmp = NULL; + size_t length = 0; + + /* Set the filename. */ + ip3db_variant_set_str( + &entry->fields[IP3DBF_MUSIC_FILENAME], + dat->objects.entries[index].fields[IP3DBF_OBJECTS_OBJECTNAME].value.str + ); + + /* Obtain the pathname by tracing parent UIDs. */ + for (;;) { + uint32_t parent_uid = dat->objects.entries[index].fields[IP3DBF_OBJECTS_PARENTUID].value.dword; + if (parent_uid == 0xFFFFFFFF) { + break; + } + index = dat_uidmap_get(dat->objects_uidmap, &dat->objects, parent_uid); + if (index < 0) { + break; + } + tmp = ucs2append( + dat->objects.entries[index].fields[IP3DBF_OBJECTS_OBJECTNAME].value.str, + pathname + ); + ucs2free(pathname); + pathname = tmp; + } + + tmp = ucs2append(ucs2cs_root, pathname); + ucs2free(pathname); + pathname = tmp; + ip3db_variant_set_str(&entry->fields[IP3DBF_MUSIC_FILEPATH], pathname); + ucs2free(pathname); + } + } + + /* Read References page(s) */ + page = dic->references.dat_page; + while (page) { + dat_list_read(&dat->references, &ph, &dic->references, buffer, PAGESIZE * (page - 1)); + page = ph.next_page; + } + + free(buffer); + return 0; +} + +int dat_write(dat_t* dat, dic_t* dic, FILE *fpo) +{ + uint32_t i = 0, page = 0; + page_header_t ph; + long buffer_size = 0; + uint8_t* buffer = NULL; + + /* Initialize the number of pages as zero. */ + dic->header.num_dat_pages = 0; + dic->objects.dat_page = 0; + dic->music.dat_page = 0; + dic->references.dat_page = 0; + + memset(&ph, 0, sizeof(ph)); + + /* Write Objects page(s) */ + if (0 < dat->objects.num_entries) { + i = 0; + dic->objects.dat_page = page = (dic->header.num_dat_pages + 1); + while (page) { + buffer_size = PAGESIZE * page; + buffer = (uint8_t*)realloc(buffer, sizeof(uint8_t) * buffer_size); + memset(buffer + PAGESIZE * (page - 1), 0, PAGESIZE); + + ph.next_page = page + 1; + dat_list_write(&dat->objects, i, &ph, buffer, PAGESIZE * (page - 1)); + + i += ph.num_entries; + dic->header.num_dat_pages += 1; + page = ph.next_page; + } + } + + /* Clear filepath and filename */ + for (i = 0;i < dat->musics.num_entries;++i) { + static const ucs2char_t empty[] = {0}; + dat_entry_t* entry = &dat->musics.entries[i]; + ip3db_variant_set_str(&entry->fields[IP3DBF_MUSIC_FILEPATH], empty); + ip3db_variant_set_str(&entry->fields[IP3DBF_MUSIC_FILENAME], empty); + } + + /* Write Music page(s) */ + if (0 < dat->musics.num_entries) { + i = 0; + dic->music.dat_page = page = (dic->header.num_dat_pages+1); + while (page) { + buffer_size = PAGESIZE * page; + buffer = (uint8_t*)realloc(buffer, sizeof(uint8_t) * buffer_size); + memset(buffer + PAGESIZE * (page - 1), 0, PAGESIZE); + + ph.next_page = page + 1; + dat_list_write(&dat->musics, i, &ph, buffer, PAGESIZE * (page - 1)); + + i += ph.num_entries; + dic->header.num_dat_pages += 1; + page = ph.next_page; + } + } + + /* Write References page(s) */ + if (0 < dat->references.num_entries) { + i = 0; + dic->references.dat_page = page = (dic->header.num_dat_pages+1); + while (page) { + buffer_size = PAGESIZE * page; + buffer = (uint8_t*)realloc(buffer, sizeof(uint8_t) * buffer_size); + memset(buffer + PAGESIZE * (page - 1), 0, PAGESIZE); + + ph.next_page = page + 1; + dat_list_write(&dat->references, i, &ph, buffer, PAGESIZE * (page - 1)); + + i += ph.num_entries; + dic->header.num_dat_pages += 1; + page = ph.next_page; + } + } + + /* Write out the pages to the file. */ + if (buffer && buffer_size > 0) { + if (fwrite(buffer, 1, buffer_size, fpo) != buffer_size) { + free(buffer); + return 1; + } + } + + free(buffer); + return 0; +} + +void dat_dump(dat_t* dat, const dic_t* dic, FILE *fp) +{ + fprintf(fp, "===== db.dat =====\n"); + fprintf(fp, "OBJECTS = {\n"); + dat_list_dump(&dat->objects, &dic->objects, fp); + fprintf(fp, "}\n"); + fprintf(fp, "MUSIC = {\n"); + dat_list_dump(&dat->musics, &dic->music, fp); + fprintf(fp, "}\n"); + fprintf(fp, "REFERENCES = {\n"); + dat_list_dump(&dat->references, &dic->references, fp); + fprintf(fp, "}\n"); +} + + + +static uint32_t findfile(dat_t* dat, const ucs2char_t *filename) +{ + int i; + const ucs2char_t *filepart = NULL; + ucs2char_t *pathname = alloca(sizeof(ucs2char_t) * (ucs2len(filename) + 1)); + + filepart = ucs2rchr(filename, '/'); + if (!filepart) { + filepart = filename; + } else { + filepart++; + } + + ucs2ncpy(pathname, filename, (filepart-filename)); + pathname[filepart-filename] = 0; + + for (i = 0;i < dat->musics.num_entries;++i) { + dat_entry_t* entry = &dat->musics.entries[i]; + if (ucs2icmp(entry->fields[IP3DBF_MUSIC_FILENAME].value.str, filepart) == 0 && + ucs2icmp(entry->fields[IP3DBF_MUSIC_FILEPATH].value.str, pathname) == 0) { + return entry->fields[IP3DBF_MUSIC_UID].value.dword; + } + } + return 0; +} + +typedef struct { + ucs2char_t* path; + uint32_t uid; +} dircache_element_t; + +typedef struct { + int max_elems; + int num_elems; + dircache_element_t* elems; +} dircache_t; + +static void dircache_init(dircache_t* dc) +{ + memset(dc, 0, sizeof(*dc)); +} + +static void dircache_finish(dircache_t* dc) +{ + int i; + for (i = 0;i < dc->max_elems;++i) { + ucs2free(dc->elems[i].path); + } + free(dc->elems); +} + +static void dircache_push(dircache_t* dc, const ucs2char_t* path, uint32_t uid) +{ + dircache_element_t* elem = NULL; + + if (dc->max_elems < dc->num_elems + 1) { + dc->elems = (dircache_element_t*)realloc(dc->elems, sizeof(dircache_element_t) * (dc->max_elems+1)); + memset(&dc->elems[dc->max_elems], 0, sizeof(dircache_element_t)); + ++dc->max_elems; + } + + elem = &dc->elems[dc->num_elems++]; + ucs2free(elem->path); + elem->path = ucs2dup(path); + elem->uid = uid; +} + +static void dircache_pop(dircache_t* dc, int i) +{ + int n = ++i; + for (;i < dc->num_elems;++i) { + ucs2free(dc->elems[i].path); + memset(&dc->elems[i], 0, sizeof(dc->elems[0])); + } + dc->num_elems = n; +} + +static int dircache_findprefix(dircache_t* dc, const ucs2char_t* path) +{ + int i = dc->num_elems; + while (--i >= 0) { + if (ucs2ncmp(path, dc->elems[i].path, ucs2len(dc->elems[i].path)) == 0) { + break; + } + } + return i; +} + +static dircache_element_t *dircache_get(dircache_t* dc, int i) +{ + return &dc->elems[i]; +} + + +typedef struct { + const ucs2char_t* filepath; + const ucs2char_t* filename; + uint8_t filetype; + int index; +} object_record_t; + + +static int comp_pathname(const void *_x, const void *_y) +{ + const object_record_t* x = (const object_record_t*)_x; + const object_record_t* y = (const object_record_t*)_y; + int ret = ucs2cmp(x->filepath, y->filepath); + if (ret == 0) { + return ucs2cmp(x->filename, y->filename); + } else { + return ret; + } +} + + + +static const ucs2char_t* skip_one_directory(const ucs2char_t* path) +{ + ucs2char_t* p = ucs2chr(path, '/'); + return p ? p+1 : NULL; +} + +void dat_set(dat_t* dat, dic_t* dic, const ip3db_music_record_t* records, int num_records, ip3db_playlist_t* playlists, int num_playlists) +{ + /* Procedure: + * 1) Construct the object chunk and attach music records with Object UIDs. + * Because the object chunk stores a tree structure of path names, we need to + * split a path name to elements and allocate an Object UID to each element. + * For example, the path name "/Music/Beatles/Love/01_love.ogg" will generate + * five objects each of which links to the object of the parent directory: + * - UID=0xFFFFFFFF: "/a/" (root directory; FileType = 0) + * - UID=1 : "Music/" (FileType = 1) + * - UID=2 : "Beatles/" (FileType = 1) + * - UID=3 : "Love/" (FileType = 1) + * - UID=4 : "01_love.ogg" (FileType = 2) + * In order to convert a list of path names to the tree structure, this + * implementation sorts the path names in alphabetical order and finds new + * path elements by using a directory queue (dircache_t). + * + * 3) Attach Object UIDs for file names (FileType = 2) to music records. + * These UIDs are stored in records in the music chunk so that the player + * can refer to the path/file name of a music track quickly. + * + * 4) Construct the music chunk by basically duplicating the records. + * + * Now the content of db.dat is ready. Note that the path character in db.dat + * is not '\\' but '/'. + */ + + int i, j; + dat_entry_t* entry; + uint32_t uid = 0; + static const uint32_t uid_root = 0xFFFFFFFF; + static const ucs2char_t ucs2cs_object_root[] = {'/','a','/',0}; + static const ucs2char_t ucs2cs_root[] = {'/', 0}; + dat_list_t* dato = &dat->objects; + dat_list_t* datm = &dat->musics; + dat_list_t* datr = &dat->references; + uint32_t num_objects = num_records + num_playlists; + object_record_t *objects = (object_record_t*)malloc(sizeof(object_record_t) * num_objects); + dircache_t dc; + + dircache_init(&dc); + + /* Clear all entries. */ + dat_list_finish(dato); + dat_list_finish(datm); + dat_list_finish(datr); + dat_uidmap_finish(dat->objects_uidmap); + + /* Append an entry for the root directory. */ + entry = dat_list_expand(dato); + dat_entry_init(entry, &dic->objects); + ip3db_variant_set_str(&entry->fields[IP3DBF_OBJECTS_OBJECTNAME], ucs2cs_object_root); + ip3db_variant_set_dword(&entry->fields[IP3DBF_OBJECTS_UID], uid_root); + + /* Register the root node to the directory cache. */ + dircache_push(&dc, ucs2cs_root, uid_root); + + /* Sort the records in alphabetical order of their path names. */ + for (i = 0;i < num_records;++i) { + objects[i].filepath = records[i][IP3DBF_MUSIC_FILEPATH].value.str; + objects[i].filename = records[i][IP3DBF_MUSIC_FILENAME].value.str; + objects[i].filetype = 2; + objects[i].index = i; + } + for (i = 0;i < num_playlists;++i) { + objects[i+num_records].filepath = playlists[i].filepath; + objects[i+num_records].filename = playlists[i].filename; + objects[i+num_records].filetype = 4; + objects[i+num_records].index = i; + } + qsort(objects, num_objects, sizeof(objects[0]), comp_pathname); + + /* Loop for the records. */ + for (i = 0;i < num_objects;++i) { + /* + * Split a path name into two parts: a prefix that have already been + * registered in the Object table: and a postfix that is being registered + * as Object records. + */ + const ucs2char_t* path = objects[i].filepath; + const ucs2char_t* file = objects[i].filename; + int k = dircache_findprefix(&dc, path); + const dircache_element_t* com = dircache_get(&dc, k); + const ucs2char_t* p = path + ucs2len(com->path); /* the prefix */ + uint32_t puid = com->uid; /* the UID of the parent directory of the postfix */ + + /* Discard directory portions that do not share a prefix with the target. */ + dircache_pop(&dc, k); + + /* Create objects one by one for the directory portions in the postfix. */ + while (p && *p) { + ucs2char_t tmp[MAX_PATH]; + const ucs2char_t* q = skip_one_directory(p); + uid = dato->num_entries; + + /* A directory element (e.g., "Beatles/") */ + ucs2ncpy(tmp, p, q-p); + tmp[q-p] = 0; + + /* Create a new object. */ + entry = dat_list_expand(dato); + dat_entry_init(entry, &dic->objects); + ip3db_variant_set_dword(&entry->fields[IP3DBF_OBJECTS_UID], uid); + ip3db_variant_set_dword(&entry->fields[IP3DBF_OBJECTS_PARENTUID], puid); + ip3db_variant_set_word(&entry->fields[IP3DBF_OBJECTS_FILETYPE], 1); + ip3db_variant_set_str(&entry->fields[IP3DBF_OBJECTS_OBJECTNAME], tmp); + + /* Register the fullpath (e.g., "/Music/eatles/" in the dircache. */ + ucs2ncpy(tmp, path, q-path); + tmp[q-path] = 0; + dircache_push(&dc, tmp, uid); + + /* Store the current UID for children. */ + puid = uid; + + /* Move to the next portion. */ + p = q; + } + + /* Create a new object for the file name (FileType = 2). */ + if (objects[i].filetype == 2) { + /* Music file. */ + const ip3db_variant_t* record = records[objects[i].index]; + + uid = dato->num_entries; + entry = dat_list_expand(dato); + dat_entry_init(entry, &dic->objects); + ip3db_variant_set_dword(&entry->fields[IP3DBF_OBJECTS_UID], uid); + ip3db_variant_set_dword(&entry->fields[IP3DBF_OBJECTS_PARENTUID], puid); + ip3db_variant_set_word(&entry->fields[IP3DBF_OBJECTS_FILETYPE], 2); + ip3db_variant_set_str(&entry->fields[IP3DBF_OBJECTS_OBJECTNAME], file); + + /* Create a music record with UID referring to the file name. */ + entry = dat_list_expand(datm); + dat_entry_init(entry, &dic->music); + for (j = 0;j < entry->num_fields;++j) { + ip3db_variant_clone(&entry->fields[j], &record[j]); + } + ip3db_variant_set_dword(&entry->fields[IP3DBF_MUSIC_UID], uid); + } else if (objects[i].filetype == 4) { + /* Playlist file. */ + ip3db_playlist_t* pl = &playlists[objects[i].index]; + + pl->uid = dato->num_entries; + entry = dat_list_expand(dato); + dat_entry_init(entry, &dic->objects); + ip3db_variant_set_dword(&entry->fields[IP3DBF_OBJECTS_UID], pl->uid); + ip3db_variant_set_dword(&entry->fields[IP3DBF_OBJECTS_PARENTUID], puid); + ip3db_variant_set_word(&entry->fields[IP3DBF_OBJECTS_FILETYPE], 4); + ip3db_variant_set_str(&entry->fields[IP3DBF_OBJECTS_OBJECTNAME], file); + } + } + + /* Loop for playlists. */ + for (i = 0;i < num_playlists;++i) { + const ip3db_playlist_t* pl = &playlists[i]; + for (j = 0;j < pl->num_entries;++j) { + entry = dat_list_expand(datr); + dat_entry_init(entry, &dic->references); + + ip3db_variant_set_dword(&entry->fields[IP3DBF_REFERENCES_PARENTCLUSTER], pl->uid); + ip3db_variant_set_dword(&entry->fields[IP3DBF_REFERENCES_CHILDCLUSTER], findfile(dat, pl->entries[j])); + ip3db_variant_set_word(&entry->fields[IP3DBF_REFERENCES_FILEFORMAT], 0x3009); + } + } + + dircache_finish(&dc); + + dat->objects_uidmap = dat_uidmap_create(&dat->objects); +} Property changes on: trunk/pmplib/lib/pmp_iriverplus3/dat.c ___________________________________________________________________ Name: svn:eol-style + native Modified: trunk/pmplib/lib/pmp_iriverplus3/dat.h =================================================================== --- trunk/pmplib/lib/pmp_iriverplus3/dat.h 2007-02-12 21:14:08 UTC (rev 358) +++ trunk/pmplib/lib/pmp_iriverplus3/dat.h 2007-02-13 21:22:10 UTC (rev 359) @@ -1,54 +1,54 @@ -/* - * Low-level library for db.dat. - * - * Copyright (c) 2005-2007 Naoaki Okazaki - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -/* $Id$ */ - -#ifndef __IP3DB_DAT_H__ -#define __IP3DB_DAT_H__ - -typedef struct { - int num_fields; - ip3db_variant_t *fields; - uint32_t offset; -} dat_entry_t; - -typedef struct { - uint32_t num_entries; - dat_entry_t* entries; -} dat_list_t; - -struct tag_sort_index_t; typedef struct tag_sort_index_t sort_index_t; - -struct tag_dat_t { - dat_list_t objects; - dat_list_t musics; - dat_list_t references; - sort_index_t* objects_uidmap; -}; - -dat_t* dat_new(); -void dat_finish(dat_t* dat); -int dat_read(dat_t* dat, const dic_t* dic, FILE *fpi); -int dat_write(dat_t* dat, dic_t* dic, FILE *fpo); -void dat_dump(dat_t* dat, const dic_t* dic, FILE *fp); -void dat_set(dat_t* dat, dic_t* dic, const ip3db_music_record_t* records, int num_records, ip3db_playlist_t* playlists, int num_playlists); - -#endif/*__IP3DB_DAT_H__*/ +/* + * Low-level library for db.dat. + * + * Copyright (c) 2005-2007 Naoaki Okazaki + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +/* $Id$ */ + +#ifndef __IP3DB_DAT_H__ +#define __IP3DB_DAT_H__ + +typedef struct { + int num_fields; + ip3db_variant_t *fields; + uint32_t offset; +} dat_entry_t; + +typedef struct { + uint32_t num_entries; + dat_entry_t* entries; +} dat_list_t; + +struct tag_sort_index_t; typedef struct tag_sort_index_t sort_index_t; + +struct tag_dat_t { + dat_list_t objects; + dat_list_t musics; + dat_list_t references; + sort_index_t* objects_uidmap; +}; + +dat_t* dat_new(); +void dat_finish(dat_t* dat); +int dat_read(dat_t* dat, const dic_t* dic, FILE *fpi); +int dat_write(dat_t* dat, dic_t* dic, FILE *fpo); +void dat_dump(dat_t* dat, const dic_t* dic, FILE *fp); +void dat_set(dat_t* dat, dic_t* dic, const ip3db_music_record_t* records, int num_records, ip3db_playlist_t* playlists, int num_playlists); + +#endif/*__IP3DB_DAT_H__*/ Property changes on: trunk/pmplib/lib/pmp_iriverplus3/dat.h ___________________________________________________________________ Name: svn:eol-style + native Modified: trunk/pmplib/lib/pmp_iriverplus3/dic.c =================================================================== --- trunk/pmplib/lib/pmp_iriverplus3/dic.c 2007-02-12 21:14:08 UTC (rev 358) +++ trunk/pmplib/lib/pmp_iriverplus3/dic.c 2007-02-13 21:22:10 UTC (rev 359) @@ -1,530 +1,530 @@ -/* - * Low-level library for db.dic. - * - * Copyright (c) 2005-2007 Naoaki Okazaki - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -/* $Id$ */ - -/* -Some important findings from db.dic: -- This file defines field names/types in a database. -- This file stores offset addresses of root nodes in db.idx. -*/ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif/*HAVE_CONFIG_H*/ - -#include <os.h> -#include <stdio.h> -#include <stdlib.h> -#include <memory.h> -#include <pmplib/ucs2char.h> - -#include "serialize.h" -#include "util.h" -#include "ip3db.h" -#include "dic.h" - -static dic_index_t music_indices[] = { - {0, 0x0086, {IP3DBF_MUSIC_TITLE, IP3DBF_MUSIC_NONE, IP3DBF_MUSIC_NONE}}, - {0, 0x00F8, {IP3DBF_MUSIC_RATING, IP3DBF_MUSIC_NONE, IP3DBF_MUSIC_NONE}}, - {0, 0x0152, {IP3DBF_MUSIC_TRACKNUMBER, IP3DBF_MUSIC_NONE, IP3DBF_MUSIC_NONE}}, - {0, 0x022C, {IP3DBF_MUSIC_CHANGEDFLAG, IP3DBF_MUSIC_NONE, IP3DBF_MUSIC_NONE}}, - {0, 0x027A, {IP3DBF_MUSIC_CLUSM, IP3DBF_MUSIC_NONE, IP3DBF_MUSIC_NONE}}, - {0, 0x031C, {IP3DBF_MUSIC_UID, IP3DBF_MUSIC_NONE, IP3DBF_MUSIC_NONE}}, - {0, 0x0352, {IP3DBF_MUSIC_GENRE, IP3DBF_MUSIC_ARTIST, IP3DBF_MUSIC_TITLE}}, - {0, 0x0384, {IP3DBF_MUSIC_ARTIST, IP3DBF_MUSIC_ALBUM, IP3DBF_MUSIC_TRACKNUMBER}}, - {0, 0x03C2, {IP3DBF_MUSIC_ARTIST, IP3DBF_MUSIC_TRACKNUMBER, IP3DBF_MUSIC_NONE}}, - {0, 0x03F4, {IP3DBF_MUSIC_ARTIST, IP3DBF_MUSIC_TITLE, IP3DBF_MUSIC_NONE}}, - {0, 0x041A, {IP3DBF_MUSIC_GENRE, IP3DBF_MUSIC_TITLE, IP3DBF_MUSIC_NONE}}, - {0, 0x043E, {IP3DBF_MUSIC_ALBUM, IP3DBF_MUSIC_TRACKNUMBER, IP3DBF_MUSIC_NONE}}, -}; - -static dic_index_t references_indices[] = { - {0, 0x0764, {IP3DBF_REFERENCES_PARENTCLUSTER, IP3DBF_REFERENCES_NONE, IP3DBF_REFERENCES_NONE}}, - {0, 0x078C, {IP3DBF_REFERENCES_CHILDCLUSTER, IP3DBF_REFERENCES_NONE, IP3DBF_REFERENCES_NONE}}, -}; - -static dic_index_t objects_indices[] = { - {0, 0x099A, {IP3DBF_OBJECTS_UID, IP3DBF_MUSIC_NONE, IP3DBF_MUSIC_NONE}}, - {0, 0x09F0, {IP3DBF_OBJECTS_FILETYPE, IP3DBF_MUSIC_NONE, IP3DBF_MUSIC_NONE}}, - {0, 0x0A0E, {IP3DBF_OBJECTS_OBJECTNAME, IP3DBF_MUSIC_NONE, IP3DBF_MUSIC_NONE}}, - {0, 0x0ACE, {IP3DBF_OBJECTS_FILETYPE, IP3DBF_OBJECTS_PARENTUID, IP3DBF_OBJECTS_PROPERTIES}}, -}; - -static int dic_serialize(dic_t* dic, uint8_t* buffer, int is_storing); - -static void dic_field_init(dic_field_t* entry) -{ - memset(entry, 0, sizeof(*entry)); -} - -static void dic_field_finish(dic_field_t* entry) -{ - ucs2free(entry->name); - dic_field_init(entry); -} - -static size_t dic_field_serialize(uint8_t* block, dic_field_t* entry, int is_storing) -{ - uint8_t *p = block; - p += s... [truncated message content] |
From: <suc...@us...> - 2007-02-12 21:14:22
|
Revision: 358 http://svn.sourceforge.net/pmplib/?rev=358&view=rev Author: sucknblow Date: 2007-02-12 13:14:08 -0800 (Mon, 12 Feb 2007) Log Message: ----------- Revert --as-needed linker option - it can cause bother Modified Paths: -------------- trunk/pmplib/debian/rules Modified: trunk/pmplib/debian/rules =================================================================== --- trunk/pmplib/debian/rules 2007-02-12 19:40:57 UTC (rev 357) +++ trunk/pmplib/debian/rules 2007-02-12 21:14:08 UTC (rev 358) @@ -20,7 +20,7 @@ config.status: configure dh_testdir - CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs -Wl,--as-needed" \ + CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs" \ ./configure \ --host=$(DEB_HOST_GNU_TYPE) \ --build=$(DEB_BUILD_GNU_TYPE) \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <suc...@us...> - 2007-02-12 19:41:06
|
Revision: 357 http://svn.sourceforge.net/pmplib/?rev=357&view=rev Author: sucknblow Date: 2007-02-12 11:40:57 -0800 (Mon, 12 Feb 2007) Log Message: ----------- * Update Doxyfile for doxygen 1.5.1. * Copy css file from web site, to allow building apidox from the tarball. * Remove broken links from the navigation menu for apidox- now that only ../include is used, some pages aren't generated. Modified Paths: -------------- trunk/pmplib/doc/Doxyfile trunk/pmplib/doc/pmplib-head.html Added Paths: ----------- trunk/pmplib/doc/common.css Modified: trunk/pmplib/doc/Doxyfile =================================================================== --- trunk/pmplib/doc/Doxyfile 2007-02-12 14:46:58 UTC (rev 356) +++ trunk/pmplib/doc/Doxyfile 2007-02-12 19:40:57 UTC (rev 357) @@ -25,7 +25,7 @@ ALWAYS_DETAILED_SEC = NO INLINE_INHERITED_MEMB = NO FULL_PATH_NAMES = NO -STRIP_FROM_PATH = +STRIP_FROM_PATH = STRIP_FROM_INC_PATH = SHORT_NAMES = NO JAVADOC_AUTOBRIEF = YES @@ -108,6 +108,7 @@ STRIP_CODE_COMMENTS = YES REFERENCED_BY_RELATION = NO REFERENCES_RELATION = YES +REFERENCES_LINK_SOURCE = YES USE_HTAGS = NO VERBATIM_HEADERS = YES #--------------------------------------------------------------------------- @@ -220,6 +221,7 @@ INCLUDE_GRAPH = YES INCLUDED_BY_GRAPH = YES CALL_GRAPH = NO +CALLER_GRAPH = NO GRAPHICAL_HIERARCHY = YES DIRECTORY_GRAPH = YES DOT_IMAGE_FORMAT = png Copied: trunk/pmplib/doc/common.css (from rev 342, trunk/webpage/common.css) =================================================================== --- trunk/pmplib/doc/common.css (rev 0) +++ trunk/pmplib/doc/common.css 2007-02-12 19:40:57 UTC (rev 357) @@ -0,0 +1,160 @@ +/******** General tags ********/ +body{ + font:76% Verdana,Tahoma,Arial,sans-serif; + background:#ffffff url(images/background.gif) top center repeat-y; + color:#404040; + line-height:1.2em; + margin:0 auto; + padding:0; +} + +a{ + text-decoration:none; + color:#4088b8; +} + +a img{ + border:0; +} + +p { + margin:0 0 10px 10px; +} + +img { + margin: 0 0 10px 10px; +} +ul ol dl { + margin: 2px 0 16px 16px; +} +ul ul,ol ol { + margin:4px 0 4px 16px; +} + +h1{ +font-size:4.2em; +letter-spacing:-5px; +margin:0 0 30px 25px; +color:#4088b8; +} + +h1 a{text-transform:none; color:#4088b8;} + +h2{ +font-size:1.4em; +color:#4088b8; +border-bottom:4px solid #dadada; +padding:0 2px 2px 5px; +margin:0 0 10px 0; +letter-spacing:-1px; +} + +h3{ +font-size:1.2em; +font-weight:bold; +color:#4088b8; +border-bottom:1px solid #dadada; +margin:10px 0 8px 0; +padding:1px 2px 2px 3px; +} + +blockquote{ +font-size:0.9em; +border:1px solid #dadada; +margin:20px 10px; +padding:8px; +} + +/******** Main wrap ********/ +#wrap{ +color:#404040; +width:970px; +margin:10px auto; +padding:0; +} + +#header{margin:0;} +.fade{color:#c8c8c8;} + +#toplinks{text-align:right; padding:5px 2px 2px 3px;} + +#slogan{ +font-size:1.5em; +color:#808080; +font-weight:bold; +letter-spacing:-1px; +margin:15px 0px 20px 35px; +line-height:1.2em; +} + +/******** sidebar ********/ +#sidebar{ +float:left; +width:195px; +margin:0 0 5px 0; +padding:1px 0 0 0; +} + +#sidebar ul{ +list-style:none; +font-size:0.9em; +margin:0; +padding:0 0 15px 10px; +} + +#sidebar li{ +list-style:none; +margin:0 0 4px 0; +padding:0; +} + +#sidebar li a{ +font-size:1.2em; +font-weight:bold; +padding:2px; +} + +#sidebar ul ul{ +margin:4px 0 3px 15px; +line-height:1.2em; +padding:0; +} + +#sidebar ul ul li a{font-weight:normal;} +#sidebar h2{margin:3px 0px 8px 0px;} + +/******** Content variations ********/ +#content{ +line-height:1.5em; +width:750px; +float:right; +text-align:left; +margin:0; +padding:0; +} + +#contentalt{ +line-height:1.5em; +width:750px; +float:left; +text-align:left; +padding:0; +margin-right:20px; +} + +#content h3, #contentalt h3{margin:10px 0 8px;} +/******** Footer ********/ +#footer{ +clear:both; +text-align:right; +color:#808080; +font-size:0.9em; +border-top:4px solid #dadada; +margin:0 auto; +padding:8px 0; +line-height:1.6em; +} + +#footer p{margin:0; padding:0;} +#footer a{color:#808080;} + Modified: trunk/pmplib/doc/pmplib-head.html =================================================================== --- trunk/pmplib/doc/pmplib-head.html 2007-02-12 14:46:58 UTC (rev 356) +++ trunk/pmplib/doc/pmplib-head.html 2007-02-12 19:40:57 UTC (rev 357) @@ -31,7 +31,6 @@ <li><a href="globals_func.html">Functions</a></li> <li><a href="globals_vars.html">Global variables</a></li> <li><a href="globals_eval.html">Enumeration Constants</a></li> -<li><a href="globals_enum.html">Enumeration Values</a></li> <li><a href="globals_type.html">Typedefs</a></li> <li><a href="globals_defs.html">Preprocessor Definitions</a></li> </ul> @@ -45,7 +44,6 @@ <li><a href="functions_vars.html">Fields/Members</a></li> <li><a href="functions_func.html">Functions/Methods</a></li> <li><a href="functions_type.html">Typedefs</a></li> -<li><a href="functions_eval.html">Enumeration Constants</a></li> </ul> </ul> <!-- hierarchy.html --> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ny...@us...> - 2007-02-12 14:47:00
|
Revision: 356 http://svn.sourceforge.net/pmplib/?rev=356&view=rev Author: nyaochi Date: 2007-02-12 06:46:58 -0800 (Mon, 12 Feb 2007) Log Message: ----------- Tag 0.14 release. Added Paths: ----------- tags/pmplib/0.14/ tags/pmplib/0.14/debian/ tags/pmplib/0.14/pmplib/ Removed Paths: ------------- tags/pmplib/0.14/pmplib/debian/ Copied: tags/pmplib/0.14/debian (from rev 355, trunk/pmplib/debian) Copied: tags/pmplib/0.14/pmplib (from rev 355, trunk/pmplib) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ny...@us...> - 2007-02-12 14:32:01
|
Revision: 355 http://svn.sourceforge.net/pmplib/?rev=355&view=rev Author: nyaochi Date: 2007-02-12 06:31:56 -0800 (Mon, 12 Feb 2007) Log Message: ----------- Added a description about MSVC++2005 runtime DLL. Modified Paths: -------------- trunk/webpage/download.xml Modified: trunk/webpage/download.xml =================================================================== --- trunk/webpage/download.xml 2007-02-12 06:46:21 UTC (rev 354) +++ trunk/webpage/download.xml 2007-02-12 14:31:56 UTC (rev 355) @@ -16,7 +16,12 @@ <subsection caption="EasyPMP [Win32]"> <ul> -<li>Download the <a href="http://sourceforge.net/project/showfiles.php?group_id=157298">EasyPMP binary for Windows 2000/XP/Vista</a> at sourceforge.net.</li> +<li> +Download the <a href="http://sourceforge.net/project/showfiles.php?group_id=157298">EasyPMP binaries for Windows 2000/XP/Vista</a> at sourceforge.net.<br/> +These binaries have the dependency to the Microsoft Visual C++ 2005 Run-time DLL (MSVCR80.dll). +If you don't have one, please install <a href="http://www.microsoft.com/downloads/details.aspx?familyid=32bc1bee-a3f9-4c13-9c99-220b62a191ee">Microsoft Visual C++ 2005 Redistributable Package (x86)</a> or <a href="http://www.microsoft.com/downloads/details.aspx?familyid=0856eacb-4362-4b0d-8edd-aab15c5e04f5">Microsoft .NET Framework Version 2.0 Redistributable Package (x86)</a>. +Windows Vista seems to have the one installed by default. +</li> </ul> </subsection> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ny...@us...> - 2007-02-12 06:46:22
|
Revision: 354 http://svn.sourceforge.net/pmplib/?rev=354&view=rev Author: nyaochi Date: 2007-02-11 22:46:21 -0800 (Sun, 11 Feb 2007) Log Message: ----------- Final version (maybe) for 0.14 release. Modified Paths: -------------- trunk/webpage/download.xml trunk/webpage/index.xml trunk/webpage/links.xml trunk/webpage/news.xml trunk/webpage/pmplib.xsl Modified: trunk/webpage/download.xml =================================================================== --- trunk/webpage/download.xml 2007-02-12 05:45:33 UTC (rev 353) +++ trunk/webpage/download.xml 2007-02-12 06:46:21 UTC (rev 354) @@ -15,15 +15,16 @@ </p> <subsection caption="EasyPMP [Win32]"> -<p> -Download the <a href="http://sourceforge.net/project/showfiles.php?group_id=157298&package_id=175772">EasyPMP binary for Windows 2000/XP</a> at sourceforge.net. -</p> +<ul> +<li>Download the <a href="http://sourceforge.net/project/showfiles.php?group_id=157298">EasyPMP binary for Windows 2000/XP/Vista</a> at sourceforge.net.</li> +</ul> </subsection> <subsection caption="EasyPMP [POSIX]"> -<p> -Download the <a href="http://sourceforge.net/project/showfiles.php?group_id=157298&package_id=175772">source code of pmplib</a> at sourceforge.net. -</p> +<ul> +<li>Download the <a href="http://sourceforge.net/project/showfiles.php?group_id=157298">RPM packages (pmplib and pmplib-tools) for i386</a></li> +<li>Download the <a href="http://sourceforge.net/project/showfiles.php?group_id=157298">source code of pmplib</a> at sourceforge.net.</li> +</ul> </subsection> </section> Modified: trunk/webpage/index.xml =================================================================== --- trunk/webpage/index.xml 2007-02-12 05:45:33 UTC (rev 353) +++ trunk/webpage/index.xml 2007-02-12 06:46:21 UTC (rev 354) @@ -14,21 +14,35 @@ Portable Media Player library (PMPlib) is an open source project for the development of management software/library for various portable media players. PMPlib project currently supports the following hardware: </p> <ul> +<li>iRivNavi.iDB (pmp_irivnavi)</li> +<ul> <li>iRiver H100 series</li> <li>iRiver H300 series</li> +</ul> +<li>PortalPlayer based players (pmp_portalplayer1)</li> +<ul> <li>iRiver H10 UMS</li> <li>iRiver H10 MTP (with emergency connect mode)</li> -<li>iRiver H10Jr. UMS</li> -<li>iRiver U10 UMS</li> -<li>iRiver E10 UMS</li> <li>MEDION MDJuke220</li> <li>MEDION MDJuke440</li> <li>Samsung YH-820</li> <li>Samsung YH-920</li> <li>Samsung YH-925</li> -<li>Philips HDD6320</li> <li>MSI MEGA PLAYER 540</li> </ul> +<li>iRiver 3rd generation (pmp_iriverplus2)</li> +<ul> +<li>iRiver H10Jr. UMS</li> +<li>iRiver U10 UMS</li> +</ul> +<li>iRiver 4th generation (pmp_iriverplus3)</li> +<ul> +<li>iRiver E10 UMS</li> +</ul> +</ul> +<p> + +</p> </section> <section caption="News"> Modified: trunk/webpage/links.xml =================================================================== --- trunk/webpage/links.xml 2007-02-12 05:45:33 UTC (rev 353) +++ trunk/webpage/links.xml 2007-02-12 06:46:21 UTC (rev 354) @@ -10,9 +10,37 @@ <body> <section caption="Links"> -<p> -If you know other useful sites or create a web site related to PMPlib, please let us know. -</p> +<subsection caption="Related projects"> +<dl> +<dt> +<a href="http://easyh10.sourceforge.net/">EasyH10</a> +</dt> +<dd> +EasyH10 is an open source project for the development of a software suite for iRiver H10 digital audio players. +This is the ancestral project of PMPlib. +</dd> +<dt> +<a href="http://cfergeau.free.fr/libitunesdb.html">libitunesdb</a> +</dt> +<dd> +libitunesdb is a library designed to make it easy to access the songs and playlists stored on an iPod. +libitunesdb was originally based on <a href="http://gtkpod.sourceforge.net/">gtkpod</a> iTunesDB parsing code. +</dd> +<dt> +<a href="http://libmtp.sourceforge.net/">libmtp</a> +</dt> +<dd>An implementation of <a href="http://msdn2.microsoft.com/en-us/library/ms867188.aspx">Media Transfer Protocol (MTP)</a> (developed by Microsoft) in the form of a library suitable primarily for POSIX compliant operating systems. Refer to their web site if you have an MTP device because PMPlib project will not support MTP devices. +</dd> +<dt> +<a href="http://www.gphoto.org/">gphoto</a> +</dt> +<dd> +Newer libgphoto2 versions also support Media Transfer Protocol (MTP) based media players since their communications protocol is based on the Picture Transfer Protocol (PTP). +</dd> + + +</dl> +</subsection> </section> </body> Modified: trunk/webpage/news.xml =================================================================== --- trunk/webpage/news.xml 2007-02-12 05:45:33 UTC (rev 353) +++ trunk/webpage/news.xml 2007-02-12 06:46:21 UTC (rev 354) @@ -17,10 +17,10 @@ I am pleased to announce that PMPlib 0.14 was released with numerous enhancements and improvements. </p> <ul> -<li>Implemented playlist conversion for iriver E10 (pmp_iriverplus3).</li> -<li>Added the support for MSI MEGA PLAYER 540 in pmp_portalplayer1.</li> +<li>Implemented <b>playlist conversion for iriver E10</b> (pmp_iriverplus3).</li> +<li>Added the <b>support for MSI MEGA PLAYER 540</b> in pmp_portalplayer1.</li> <li>Added the support of Ogg Vorbis for Samsung YH-920.</li> -<li>On-the-fly playlist conversion from M3U/PLS playlist file located on the PC. Use -P (--playlist-source) option to configure the source directory.</li> +<li><b>On-the-fly playlist conversion</b> from M3U/PLS playlist file located on the PC. Use -P (--playlist-source) option to configure the source directory.</li> <li>Configurable paths to music and playlist directories.</li> <li>Display supported firmware versions, audio codecs, and file extensions.</li> <li>Suppress flickering in the progress report.</li> @@ -30,10 +30,12 @@ <li>Fixed several bugs in reading/writing the database for iriver E10.</li> <li>Improved the routine for writing the iriver E10 database with the latest knowledge.</li> <li>Fixed a crash reported at <a href="http://nyaochi.sakura.ne.jp/pmplib/index.php?topic=210.msg910#msg910">the forum</a> (thanks jonof).</li> +<li>Fixed a bug in playlist conversion with -f (--find-missing) option on POSIX environments.</li> +<li>Fixed a bug in database update for PortalPlayer devices on POSIX environments.</li> <li>Applied two patches for libid3tag for bug-fixes (Win32 version).</li> <li>Updated the JavaScript engine to SpiderMonkey 1.6 (Win32 version).</li> -<li>Distribute RPM packages, pmplib, pmplib-tools, and pmplib-devel.</li> -<li>Grand API restructuring and documentation.</li> +<li><b>Distribute RPM packages</b>, pmplib, pmplib-tools, and pmplib-devel.</li> +<li><b>Grand API restructuring and documentation</b>.</li> <li>Install header files for the development to ${PREFIX}/include/pmplib</li> <li>Merged libucs2 (ucs2.dll) and libfilepath (filepath.dll) into libpmp (pmp.dll) for simplicity.</li> </ul> Modified: trunk/webpage/pmplib.xsl =================================================================== --- trunk/webpage/pmplib.xsl 2007-02-12 05:45:33 UTC (rev 353) +++ trunk/webpage/pmplib.xsl 2007-02-12 06:46:21 UTC (rev 354) @@ -304,7 +304,7 @@ <!--<li><a href="faq.html">FAQ</a></li>--> <li><a href="about.html">About</a></li> <li><a href="http://sourceforge.net/projects/pmplib/">Project Home</a></li> - <!--<li><a href="links.html">Links</a></li>--> + <li><a href="links.html">Links</a></li> </ul> </xsl:template> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ny...@us...> - 2007-02-12 05:45:42
|
Revision: 353 http://svn.sourceforge.net/pmplib/?rev=353&view=rev Author: nyaochi Date: 2007-02-11 21:45:33 -0800 (Sun, 11 Feb 2007) Log Message: ----------- Updated ChangeLog. Modified Paths: -------------- trunk/pmplib/ChangeLog Modified: trunk/pmplib/ChangeLog =================================================================== --- trunk/pmplib/ChangeLog 2007-02-12 05:17:19 UTC (rev 352) +++ trunk/pmplib/ChangeLog 2007-02-12 05:45:33 UTC (rev 353) @@ -6,6 +6,7 @@ - Implemented playlist conversion for iriver E10 (pmp_iriverplus3). - Added the support for MSI MEGA PLAYER 540 in pmp_portalplayer1. - Added the support of Ogg Vorbis for Samsung YH-920. +- Confirmed the functionality on Windows Vista. - On-the-fly playlist conversion from M3U/PLS playlist file located on the PC. Use -P (--playlist-source) option to configure the source directory. @@ -24,6 +25,10 @@ latest knowledge. - Fixed a crash reported at (thanks jonof): http://nyaochi.sakura.ne.jp/pmplib/index.php?topic=210.msg910#msg910 +- Fixed a bug in playlist conversion with -f (--find-missing) option + on POSIX environments. +- Fixed a bug in database update for PortalPlayer devices on POSIX + environments. - Applied two patches for libid3tag for bug-fixes (Win32 version). - Updated the JavaScript engine to SpiderMonkey 1.6 (Win32 version). - Distribute RPM packages, pmplib, pmplib-tools, and pmplib-devel. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ny...@us...> - 2007-02-12 05:17:19
|
Revision: 352 http://svn.sourceforge.net/pmplib/?rev=352&view=rev Author: nyaochi Date: 2007-02-11 21:17:19 -0800 (Sun, 11 Feb 2007) Log Message: ----------- Updated the copyright notice for this year. Modified Paths: -------------- trunk/webpage/pmplib.xsl Modified: trunk/webpage/pmplib.xsl =================================================================== --- trunk/webpage/pmplib.xsl 2007-02-12 05:15:35 UTC (rev 351) +++ trunk/webpage/pmplib.xsl 2007-02-12 05:17:19 UTC (rev 352) @@ -16,7 +16,7 @@ <meta name="keywords" content="PMPlib,EasyPMP,Portable Media Player,database,playlist" /> <meta name="description" content="Portable Media Player library (PMPlib) is an open source project for the development of management software/library for various portable media players." /> <meta name="author" content="http://pmplib.sourceforge.net/" /> - <meta name="copyright" content="Copyright (c) 2005-2006 by PMPlib project" /> + <meta name="copyright" content="Copyright (c) 2005-2007 by PMPlib project" /> <link rel="stylesheet" href="./1024px.css" type="text/css" title="1024px style" media="screen,projection"/> <xsl:if test="/page/head/include-rss"><link rel="alternate" type="application/rss+xml" title="RSS" href="./index.rss" /></xsl:if> @@ -310,7 +310,7 @@ <xsl:template name="footer"> <p> -Copyright 2005-2006 PMPlib Project | Thanks to <a href="http://www.active-sandals.com/womreefsan.html">Reef Sandals</a> | Design by <a href="http://andreasviklund.com/">Andreas Viklund</a></p> +Copyright 2005-2007 PMPlib Project | Thanks to <a href="http://www.active-sandals.com/womreefsan.html">Reef Sandals</a> | Design by <a href="http://andreasviklund.com/">Andreas Viklund</a></p> </xsl:template> </xsl:stylesheet> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ny...@us...> - 2007-02-12 05:15:36
|
Revision: 351 http://svn.sourceforge.net/pmplib/?rev=351&view=rev Author: nyaochi Date: 2007-02-11 21:15:35 -0800 (Sun, 11 Feb 2007) Log Message: ----------- Update the EasyPMP [Win32 GUI] tutorial with the latest version working on Windows Vista. Modified Paths: -------------- trunk/webpage/document_easypmp_tutorial.xml trunk/webpage/images/eac.png trunk/webpage/images/fb2k_playlist.png trunk/webpage/images/music-folder.png Added Paths: ----------- trunk/webpage/images/easypmp-win32gui_preference.png trunk/webpage/images/easypmp-win32gui_processing.png Modified: trunk/webpage/document_easypmp_tutorial.xml =================================================================== --- trunk/webpage/document_easypmp_tutorial.xml 2007-02-12 05:00:49 UTC (rev 350) +++ trunk/webpage/document_easypmp_tutorial.xml 2007-02-12 05:15:35 UTC (rev 351) @@ -13,7 +13,7 @@ <p> Can you imagine what life with EasyPMP is like? If not, check this tutorial before looking at the manuals. -This tutorial presents a brief introduction of EasyPMP [Win32 GUI] and EasyPMP [CUI] versions. +This tutorial presents a brief introduction of EasyPMP [Win32 GUI]. </p> <subsection caption="Prepare music files in your favorite way"> @@ -28,9 +28,11 @@ <li><a href="http://cdexos.sourceforge.net/">CDex</a> (easy-to-use CD ripper of good quality)</li> <li><a href="http://lame.sourceforge.net/">LAME</a> (king-of-quality MP3 encoder)</li> <li><a href="http://www.vorbis.com/">Ogg Vorbis</a> (king-of-quality lossy audio codec)</li> +<li><a href="http://www.winamp.com/">WinAmp</a> (multifunctional music player with CD ripper and encoders integrated)</li> <li><a href="http://www.foobar2000.org/">foobar2000</a> (multifunctional music player with CD ripper and encoders integrated)</li> - <li><a href="http://www.quinnware.com/">Quintessential Player</a> (multifunctional music player with CD ripper and encoders integrated)</li> +<li><a href="http://www.softpointer.com/AudioShell.htm">AudioShell</a> (shell extension plug-in to view and edit music tags directly in Windows Explorer)</li> +<li><a href="http://win32lab.com/fsw/mp3infp/">mp3infp</a> (shell extension plug-in to view and edit music tags directly in Windows Explorer)</li> <li><a href="http://www.mp3tag.de/en/">MP3TAG</a> (tagging software)</li> <li><a href="http://users.otenet.gr/~jtcliper/tgf/">The GodFather</a> (tagging software)</li> </ul> @@ -41,38 +43,41 @@ <a href="http://www.quinnware.com/downloads.php"><img src="http://www.quinnware.com/img/bug3.gif" width="88" height="31" border="0" /></a> </p> -<img src="images/eac.png" width="449" height="273" /> +<img src="images/eac.png" width="541" height="372" /> </subsection> <subsection caption="Transfer the music files that you want to listen to"> <p> -Refer to <a href="">the list of supported players</a> for the location where we should place them. You can transfer the music files into your player by Explorer, or synchronization software (e.g. <a href="http://www.microsoft.com/windowsxp/using/digitalphotography/prophoto/synctoy.mspx">SyncToy for Windows XP</a>, <a href="http://samba.anu.edu.au/rsync/">rsync</a>, and <a href="http://www.cis.upenn.edu/~bcpierce/unison/">Unison</a>). </p> -<img src="images/music-folder.png" width="386" height="285" /> +<img src="images/music-folder.png" width="712" height="465" /> </subsection> <subsection caption="Transfer the playlist files that you want to use in your player"> <p> -Refer to <a href="">the list of supported players</a> for the location where we should place them. -EasyPMP converts M3U/M3U8/PLS playlists into the native format recognized by your player. +EasyPMP converts M3U/M3U8/PLS/JSPL playlists into the native format recognized by your player. Just as music files, you can prepare playlist files in your favorite software such as <a href="http://www.winamp.com">WinAmp</a>, <a href="http://www.foobar2000.org/">foobar2000</a>, etc. EasyPMP can also generate dynamic playlists based on media information (e.g., all tracks by a specific artist, top 50 tracks played frequently, etc.) by describing JavaScript playlist (JSPL). </p> -<img src="images/fb2k_playlist.png" width="385" height="277" /> +<img src="images/fb2k_playlist.png" width="553" height="521" /> </subsection> <subsection caption="Run EasyPMP"> <p> -Run EasyPMP and choose a player location and determine processing modes (<i>update</i> or <i>rebuild</i>) for media database construction and playlist conversion. +Run EasyPMP and choose a player location. +EasyPMP will recognize your player and show the model name and firmware version. +Choose processing modes (<i>update</i> or <i>rebuild</i>) for media database construction and playlist conversion. +</p> +<img src="images/easypmp-win32gui_preference.png" width="411" height="468" /> +<p> Press [OK] button in the previous dialog and wait for EasyPMP to complete the preparation. EasyPMP enumerates all music files located under music folders and constructs the media database (if necessary). It also converts M3U/M3U8/PLS/JSPL playlist files into respective playlist files (if necessary) that are recognized by your player. </p> -<img src="images/easypmp_win32gui_screenshot.png" width="602" height="324" /> +<img src="images/easypmp-win32gui_processing.png" width="411" height="468" /> <p> Note that EasyPMP <b>never interferes your style of preparing music files and transferring them into your player</b>. -You don't have to stick with Windows Media Player 10 or cumbersome bundled software any more. +You don't have to stick with Windows Media Player 11 or cumbersome bundled software any more. </p> </subsection> </section> Modified: trunk/webpage/images/eac.png =================================================================== (Binary files differ) Added: trunk/webpage/images/easypmp-win32gui_preference.png =================================================================== (Binary files differ) Property changes on: trunk/webpage/images/easypmp-win32gui_preference.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/webpage/images/easypmp-win32gui_processing.png =================================================================== (Binary files differ) Property changes on: trunk/webpage/images/easypmp-win32gui_processing.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: trunk/webpage/images/fb2k_playlist.png =================================================================== (Binary files differ) Modified: trunk/webpage/images/music-folder.png =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |