[xiph-cvs] cvs commit: vorbis-tools/ogg123 buffer.c buffer.h http_transport.c status.c

Stan Seibert volsung at xiph.org
Wed Dec 19 16:24:55 PST 2001



volsung     01/12/19 16:24:54

  Modified:    ogg123   buffer.c buffer.h http_transport.c status.c
  Log:
  Display prebuffer fill percentage.  Extra thread cancellation test.

Revision  Changes    Path
1.13      +2 -3      vorbis-tools/ogg123/buffer.c

Index: buffer.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis-tools/ogg123/buffer.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- buffer.c	2001/12/19 05:37:32	1.12
+++ buffer.c	2001/12/20 00:24:53	1.13
@@ -11,7 +11,7 @@
  *                                                                  *
  ********************************************************************
 
- last mod: $Id: buffer.c,v 1.12 2001/12/19 05:37:32 volsung Exp $
+ last mod: $Id: buffer.c,v 1.13 2001/12/20 00:24:53 volsung Exp $
 
  ********************************************************************/
 
@@ -758,6 +758,7 @@
 
   stats->size = buf->size;
   stats->fill = (double) buf->curfill / (double) buf->size * 100.0;
+  stats->prebuffer_fill = (double) buf->prebuffer_size / (double) buf->size;
   stats->prebuffering = buf->prebuffering;
   stats->paused = buf->paused;
   stats->eos = buf->eos;
@@ -768,5 +769,3 @@
 
   return stats;
 }
-
-    

1.5       +2 -1      vorbis-tools/ogg123/buffer.h

Index: buffer.h
===================================================================
RCS file: /usr/local/cvsroot/vorbis-tools/ogg123/buffer.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- buffer.h	2001/12/19 02:52:53	1.4
+++ buffer.h	2001/12/20 00:24:54	1.5
@@ -11,7 +11,7 @@
  *                                                                  *
  ********************************************************************
  
- last mod: $Id: buffer.h,v 1.4 2001/12/19 02:52:53 volsung Exp $
+ last mod: $Id: buffer.h,v 1.5 2001/12/20 00:24:54 volsung Exp $
  
 ********************************************************************/
 
@@ -85,6 +85,7 @@
 typedef struct buffer_stats_t {
   long size;
   double fill;
+  double prebuffer_fill;
   int prebuffering;
   int paused;
   int eos;

1.7       +3 -1      vorbis-tools/ogg123/http_transport.c

Index: http_transport.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis-tools/ogg123/http_transport.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- http_transport.c	2001/12/20 00:10:14	1.6
+++ http_transport.c	2001/12/20 00:24:54	1.7
@@ -11,7 +11,7 @@
  *                                                                  *
  ********************************************************************
  
- last mod: $Id: http_transport.c,v 1.6 2001/12/20 00:10:14 jack Exp $
+ last mod: $Id: http_transport.c,v 1.7 2001/12/20 00:24:54 volsung Exp $
  
 ********************************************************************/
 
@@ -61,6 +61,8 @@
   buf_t *buf = arg;
 
   buffer_submit_data(buf, ptr, size*nmemb);
+
+  pthread_testcancel();
 
   return size * nmemb;
 }

1.4       +3 -2      vorbis-tools/ogg123/status.c

Index: status.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis-tools/ogg123/status.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- status.c	2001/12/19 04:59:17	1.3
+++ status.c	2001/12/20 00:24:54	1.4
@@ -11,7 +11,7 @@
  *                                                                  *
  ********************************************************************
 
- last mod: $Id: status.c,v 1.3 2001/12/19 04:59:17 volsung Exp $
+ last mod: $Id: status.c,v 1.4 2001/12/20 00:24:54 volsung Exp $
 
  ********************************************************************/
 
@@ -43,7 +43,8 @@
   char *sep = "(";
 
   if (buf_stats->prebuffering) {
-    cur += sprintf (cur, "%sPrebuf", sep);
+    cur += sprintf (cur, "%sPrebuf to %1.f%%", sep, 
+		    100.0f * buf_stats->prebuffer_fill);
     sep = comma;
   }
   if (buf_stats->paused) {

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list