changeset 2027:d5a673ad2283 trunk

[svn] - clean up
author yaz
date Thu, 30 Nov 2006 04:27:49 -0800
parents f15664434382
children 88bbe66923fe
files ChangeLog audacious/playlist.c
diffstat 2 files changed, 21 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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 <yaz@cc.rim.or.jp>
+  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 <nenolod@nenolod.net>
   revision [3049]
   - make sure the mainwin is redrawn correctly when doublesized. reported by Tom St. Denis, closes #674.
--- 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);
 }