Mercurial > audlegacy
comparison src/audacious/pluginenum.c @ 3959:a575c29cee05
- revive on-demand metadata retrieving. in the combination with "Detect file formats on demand", now audacious can load large directory in a few seconds.
- revise ext_hash to have lists of input plugins which associated with each extension.
- now input_check_file() makes use of ext_hash for file format probing to avoid full scan in the input list.
- make "detect file formats on demand" default.
- change tooltip text for on demand {detect|metadata}.
- move update request for playlist from idle function to event queue.
| author | Yoshiki Yazawa <yaz@cc.rim.or.jp> |
|---|---|
| date | Sat, 17 Nov 2007 17:07:46 +0900 |
| parents | e924c9ee3958 |
| children | 572258c68dfb |
comparison
equal
deleted
inserted
replaced
| 3958:ad14a25a31fa | 3959:a575c29cee05 |
|---|---|
| 522 | 522 |
| 523 /* build the extension hash table */ | 523 /* build the extension hash table */ |
| 524 gint i; | 524 gint i; |
| 525 if(p->vfs_extensions) { | 525 if(p->vfs_extensions) { |
| 526 for(i = 0; p->vfs_extensions[i] != NULL; i++) { | 526 for(i = 0; p->vfs_extensions[i] != NULL; i++) { |
| 527 g_hash_table_replace(ext_hash, g_strdup(p->vfs_extensions[i]), g_strdup(p->description)); | 527 GList *hdr = NULL; |
| 528 GList **handle = NULL; //allocated as auto in stack. | |
| 529 GList **handle2 = g_malloc(sizeof(GList **)); | |
| 530 | |
| 531 handle = g_hash_table_lookup(ext_hash, p->vfs_extensions[i]); | |
| 532 if(handle) | |
| 533 hdr = *handle; | |
| 534 hdr = g_list_append(hdr, p); //returned hdr is non-volatile | |
| 535 *handle2 = hdr; | |
| 536 g_hash_table_replace(ext_hash, g_strdup(p->vfs_extensions[i]), handle2); | |
| 528 } | 537 } |
| 529 } | 538 } |
| 530 } | 539 } |
| 531 | 540 |
| 532 static void | 541 static void |
