diff Plugins/Input/mpg123/http.c @ 1273:3b990c26fc46 trunk

[svn] - Support for the buffer indicator in playpaus.png that was apparently ignored by XMMS devs. Supports mp3 streams only, at the moment.
author nhjm449
date Fri, 16 Jun 2006 02:17:33 -0700
parents b5ae09a6c2f1
children f12d7e208b43
line wrap: on
line diff
--- a/Plugins/Input/mpg123/http.c	Fri Jun 16 01:45:08 2006 -0700
+++ b/Plugins/Input/mpg123/http.c	Fri Jun 16 02:17:33 2006 -0700
@@ -655,8 +655,10 @@
 
     while (going) {
 
-        if (!http_used() && !mpgdec_ip.output->buffer_playing())
+        if (!http_used() && !mpgdec_ip.output->buffer_playing()) {
             prebuffering = TRUE;
+            mpgdec_ip.set_status_buffering(TRUE);
+        }
         if (http_free() > 0 && !eof) {
             if (http_check_for_data()) {
                 cnt = min(http_free(), buffer_length - wr_index);
@@ -667,6 +669,7 @@
                     eof = TRUE;
                     if (prebuffering) {
                         prebuffering = FALSE;
+                        mpgdec_ip.set_status_buffering(FALSE);
 
                         mpgdec_ip.set_info_text(NULL);
                     }
@@ -679,6 +682,7 @@
             if (prebuffering) {
                 if (http_used() > prebuffer_length) {
                     prebuffering = FALSE;
+                    mpgdec_ip.set_status_buffering(FALSE);
                     mpgdec_ip.set_info_text(NULL);
                 }
                 else {
@@ -733,6 +737,7 @@
     buffer_read = 0;
     icy_metaint = 0;
     prebuffering = TRUE;
+    mpgdec_ip.set_status_buffering(TRUE);
     going = TRUE;
     eof = FALSE;
     buffer = g_malloc(buffer_length);