# HG changeset patch # User yaz # Date 1164889669 28800 # Node ID d5a673ad2283296386286247a5da1838fa7ebdb8 # Parent f156644343829821f09e41b4031d255ef1a0a434 [svn] - clean up diff -r f15664434382 -r d5a673ad2283 ChangeLog --- a/ChangeLog Thu Nov 30 03:16:08 2006 -0800 +++ b/ChangeLog Thu Nov 30 04:27:49 2006 -0800 @@ -1,3 +1,19 @@ +2006-11-30 11:16:08 +0000 Yoshiki Yazawa + revision [3055] + rewrite scan thread with g_cond_wait(): + - new scan thread is completely event driven. + - reduce playlist update latency. + - no need for periodical execution. + + trunk/audacious/main.c | 9 ++ + trunk/audacious/main.h | 3 + trunk/audacious/playlist.c | 107 ++++++++++++++++++------------ + trunk/audacious/ui_playlist.c | 10 +- + trunk/audacious/widgets/Makefile | 2 + trunk/audacious/widgets/playlist_slider.c | 5 + + 6 files changed, 87 insertions(+), 49 deletions(-) + + 2006-11-30 03:49:30 +0000 William Pitcock revision [3049] - make sure the mainwin is redrawn correctly when doublesized. reported by Tom St. Denis, closes #674. diff -r f15664434382 -r d5a673ad2283 audacious/playlist.c --- a/audacious/playlist.c Thu Nov 30 03:16:08 2006 -0800 +++ b/audacious/playlist.c Thu Nov 30 04:27:49 2006 -0800 @@ -2260,6 +2260,7 @@ update_playlistwin = TRUE; if (entry == playlist_position) update_mainwin = TRUE; + // no need for break here since this iteration is very short. } } PLAYLIST_UNLOCK(); @@ -2284,7 +2285,7 @@ g_cond_wait(cond_scan, mutex_scan); g_mutex_unlock(mutex_scan); - }// while + } // while g_thread_exit(NULL); return NULL; @@ -2293,7 +2294,10 @@ void playlist_start_get_info_thread(void) { + G_LOCK(playlist_get_info_going); playlist_get_info_going = TRUE; + G_UNLOCK(playlist_get_info_going); + playlist_get_info_thread = g_thread_create(playlist_get_info_func, NULL, TRUE, NULL); } @@ -2305,10 +2309,6 @@ playlist_get_info_going = FALSE; G_UNLOCK(playlist_get_info_going); - g_mutex_lock(mutex_scan); - playlist_get_info_scan_active = TRUE; - g_mutex_unlock(mutex_scan); - g_cond_broadcast(cond_scan); g_thread_join(playlist_get_info_thread); }