[xiph-cvs] cvs commit: vorbis-tools/ogg123 callbacks.c ogg123.c oggvorbis_format.c
Stan Seibert
volsung at xiph.org
Fri Dec 14 09:54:06 PST 2001
volsung 01/12/14 09:54:06
Modified: ogg123 Tag: volsung_kc_20011011 callbacks.c ogg123.c
oggvorbis_format.c
Log:
Fixed up stats display during streaming. Fixed EOS bug. Just need to add
the save stream feature back and we're ready to test and merge.
Revision Changes Path
No revision
No revision
1.1.2.5 +31 -4 vorbis-tools/ogg123/Attic/callbacks.c
Index: callbacks.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis-tools/ogg123/Attic/callbacks.c,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -u -r1.1.2.4 -r1.1.2.5
--- callbacks.c 2001/12/14 05:45:14 1.1.2.4
+++ callbacks.c 2001/12/14 17:54:04 1.1.2.5
@@ -11,7 +11,7 @@
* *
********************************************************************
- last mod: $Id: callbacks.c,v 1.1.2.4 2001/12/14 05:45:14 volsung Exp $
+ last mod: $Id: callbacks.c,v 1.1.2.5 2001/12/14 17:54:04 volsung Exp $
********************************************************************/
@@ -20,6 +20,9 @@
#include "callbacks.h"
+#define WARNING_VERBOSITY 2
+#define INFO_VERBOSITY 3
+
/* Audio callbacks */
int audio_play_callback (void *ptr, int nbytes, int eos, void *arg)
@@ -187,7 +190,17 @@
va_list ap;
va_start(ap, message);
- vstatus_error(message, ap);
+ switch (severity) {
+ case ERROR:
+ vstatus_error(message, ap);
+ break;
+ case WARNING:
+ vstatus_message(WARNING_VERBOSITY, message, ap);
+ break;
+ case INFO:
+ vstatus_message(INFO_VERBOSITY, message, ap);
+ break;
+ }
va_end(ap);
}
@@ -286,9 +299,23 @@
exit(1);
}
}
+
+
+ switch (severity) {
+ case ERROR:
+ buffer_append_action_at_end(buf, &status_error_action, sm_arg);
+ break;
+ case WARNING:
+ sm_arg->verbosity = WARNING_VERBOSITY;
+ buffer_append_action_at_end(buf, &status_message_action, sm_arg);
+ break;
+ case INFO:
+ sm_arg->verbosity = INFO_VERBOSITY;
+ buffer_append_action_at_end(buf, &status_message_action, sm_arg);
+ break;
+ }
+
- /* Use vsnprintf! */
- buffer_append_action_at_end(buf, &status_error_action, sm_arg);
}
1.39.2.30.2.21 +5 -6 vorbis-tools/ogg123/ogg123.c
Index: ogg123.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis-tools/ogg123/ogg123.c,v
retrieving revision 1.39.2.30.2.20
retrieving revision 1.39.2.30.2.21
diff -u -r1.39.2.30.2.20 -r1.39.2.30.2.21
--- ogg123.c 2001/12/14 05:45:14 1.39.2.30.2.20
+++ ogg123.c 2001/12/14 17:54:05 1.39.2.30.2.21
@@ -14,7 +14,7 @@
* *
********************************************************************
- last mod: $Id: ogg123.c,v 1.39.2.30.2.20 2001/12/14 05:45:14 volsung Exp $
+ last mod: $Id: ogg123.c,v 1.39.2.30.2.21 2001/12/14 17:54:05 volsung Exp $
********************************************************************/
@@ -492,9 +492,6 @@
} /* End of data loop */
-
- if (audio_buffer != NULL)
- buffer_mark_eos(audio_buffer);
} /* End of logical bitstream loop */
/* Done playing this logical bitstream. Clean up house. */
@@ -504,9 +501,11 @@
if (audio_buffer) {
- if (!sig_request.exit && !sig_request.skipfile)
+ if (!sig_request.exit && !sig_request.skipfile) {
+ buffer_mark_eos(audio_buffer);
buffer_wait_for_empty(audio_buffer);
-
+ }
+
buffer_thread_kill(audio_buffer);
}
1.1.2.7 +4 -3 vorbis-tools/ogg123/Attic/oggvorbis_format.c
Index: oggvorbis_format.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis-tools/ogg123/Attic/oggvorbis_format.c,v
retrieving revision 1.1.2.6
retrieving revision 1.1.2.7
diff -u -r1.1.2.6 -r1.1.2.7
--- oggvorbis_format.c 2001/12/14 16:46:11 1.1.2.6
+++ oggvorbis_format.c 2001/12/14 17:54:05 1.1.2.7
@@ -11,7 +11,7 @@
* *
********************************************************************
- last mod: $Id: oggvorbis_format.c,v 1.1.2.6 2001/12/14 16:46:11 volsung Exp $
+ last mod: $Id: oggvorbis_format.c,v 1.1.2.7 2001/12/14 17:54:05 volsung Exp $
********************************************************************/
@@ -164,8 +164,8 @@
} else if (ret == OV_HOLE) {
if (cb->printf_error != NULL)
- cb->printf_error(decoder->callback_arg, WARNING,
- "--- Hole in the stream; probably harmless\n");
+ cb->printf_error(decoder->callback_arg, INFO,
+ "--- Hole in the stream; probably harmless\n");
} else if (ret < 0) {
@@ -315,6 +315,7 @@
if (cb == NULL || cb->printf_metadata == NULL)
return;
+ cb->printf_metadata(decoder->callback_arg, 1, ""); /* Add a blank line */
for (i = 0; i < priv->vc->comments; i++) {
comment = priv->vc->user_comments[i];
--- >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