[xiph-cvs] cvs commit: ices/src Makefile.am encode.c im_stdinpcm.c input.c
Michael Smith
msmith at xiph.org
Fri Feb 8 04:54:10 PST 2002
msmith 02/02/08 04:54:09
Modified: src Tag: branch-beta2-rewrite Makefile.am encode.c
im_stdinpcm.c input.c
Log:
Minor fixes so that encode works right - IF the encoder is on the output
chain (timing code doesn't work right if it's on the input chain).
Revision Changes Path
No revision
<p>No revision
<p>1.5.2.2 +1 -1 ices/src/Makefile.am
Index: Makefile.am
===================================================================
RCS file: /usr/local/cvsroot/ices/src/Makefile.am,v
retrieving revision 1.5.2.1
retrieving revision 1.5.2.2
diff -u -r1.5.2.1 -r1.5.2.2
--- Makefile.am 2002/02/07 09:11:10 1.5.2.1
+++ Makefile.am 2002/02/08 12:54:08 1.5.2.2
@@ -28,7 +28,7 @@
ices_LDADD = net/libicenet.la thread/libicethread.la log/libicelog.la\
avl/libiceavl.la timing/libicetiming.la
-LIBS = @LIBS@ -lpthread -lefence @SOCKET_LIBS@ @XML_LIBS@ @OGG_LIBS@ @VORBIS_LIBS@\
+LIBS = @LIBS@ -lpthread @SOCKET_LIBS@ @XML_LIBS@ @OGG_LIBS@ @VORBIS_LIBS@\
@VORBISENC_LIBS@ @SHOUT_LIBS@
CFLAGS = @CFLAGS@ @XML_CFLAGS@ @OGG_CFLAGS@ @VORBIS_CFLAGS@ @SHOUT_CFLAGS@
<p><p>1.6.2.3 +2 -1 ices/src/encode.c
Index: encode.c
===================================================================
RCS file: /usr/local/cvsroot/ices/src/encode.c,v
retrieving revision 1.6.2.2
retrieving revision 1.6.2.3
diff -u -r1.6.2.2 -r1.6.2.3
--- encode.c 2002/02/08 11:14:03 1.6.2.2
+++ encode.c 2002/02/08 12:54:08 1.6.2.3
@@ -1,7 +1,7 @@
/* encode.c
* - runtime encoding of PCM data.
*
- * $Id: encode.c,v 1.6.2.2 2002/02/08 11:14:03 msmith Exp $
+ * $Id: encode.c,v 1.6.2.3 2002/02/08 12:54:08 msmith Exp $
*
* Copyright (c) 2001-2002 Michael Smith <msmith at labyrinth.net.au>
*
@@ -77,6 +77,7 @@
buf->buf = realloc(buf->buf, buf->len);
memcpy(buf->buf + old, page->header, page->header_len);
memcpy(buf->buf + old + page->header_len, page->body, page->body_len);
+ buf->aux_data = -1;
}
static int encode_flush(encoder_state *s, ogg_page *og)
<p><p>1.2.2.3 +2 -1 ices/src/im_stdinpcm.c
Index: im_stdinpcm.c
===================================================================
RCS file: /usr/local/cvsroot/ices/src/im_stdinpcm.c,v
retrieving revision 1.2.2.2
retrieving revision 1.2.2.3
diff -u -r1.2.2.2 -r1.2.2.3
--- im_stdinpcm.c 2002/02/08 11:14:03 1.2.2.2
+++ im_stdinpcm.c 2002/02/08 12:54:08 1.2.2.3
@@ -1,7 +1,7 @@
/* im_stdinpcm.c
* - Raw PCM input from stdin
*
- * $Id: im_stdinpcm.c,v 1.2.2.2 2002/02/08 11:14:03 msmith Exp $
+ * $Id: im_stdinpcm.c,v 1.2.2.3 2002/02/08 12:54:08 msmith Exp $
*
* Copyright (c) 2001-2002 Michael Smith <msmith at labyrinth.net.au>
*
@@ -76,6 +76,7 @@
rb->rate = s->rate;
rb->channels = s->channels;
rb->subtype = SUBTYPE_PCM_LE_16;
+ rb->aux_data = s->rate*s->channels*2;
if(s->newtrack)
{
<p><p>1.12.2.3 +7 -7 ices/src/input.c
Index: input.c
===================================================================
RCS file: /usr/local/cvsroot/ices/src/input.c,v
retrieving revision 1.12.2.2
retrieving revision 1.12.2.3
diff -u -r1.12.2.2 -r1.12.2.3
--- input.c 2002/02/08 11:14:03 1.12.2.2
+++ input.c 2002/02/08 12:54:08 1.12.2.3
@@ -2,7 +2,7 @@
* - Main producer control loop. Fetches data from input modules, and controls
* submission of these to the instance threads. Timing control happens here.
*
- * $Id: input.c,v 1.12.2.2 2002/02/08 11:14:03 msmith Exp $
+ * $Id: input.c,v 1.12.2.3 2002/02/08 12:54:08 msmith Exp $
*
* Copyright (c) 2001-2002 Michael Smith <msmith at labyrinth.net.au>
*
@@ -97,17 +97,18 @@
control->oldsamples = 0;
ogg_stream_init(&os, control->serialno);
- if(ogg_stream_pagein(&os, &og)) {
+ vorbis_info_init(&vi);
+ vorbis_comment_init(&vc);
+
+ if(ogg_stream_pagein(&os, &og) < 0) {
LOG_ERROR0("Error submitting page to libogg");
goto fail;
}
- if(ogg_stream_packetout(&os, &op)) {
+ if(ogg_stream_packetout(&os, &op) < 0) {
LOG_ERROR0("Error retrieving packet from libogg");
goto fail;
}
- vorbis_info_init(&vi);
- vorbis_comment_init(&vc);
if(vorbis_synthesis_headerin(&vi, &vc, &op) < 0)
{
@@ -331,9 +332,8 @@
* from here */
if(ret < 0)
{
- ices_config->shutdown = 1;
+ ices_config->shutdown = shutdown = 1;
thread_cond_broadcast(&ices_config->queue_cond);
- release_buffer(outchunk);
continue;
}
<p><p><p>--- >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