[xiph-cvs] cvs commit: ices/src encode.c

Michael Smith msmith at xiph.org
Sun Jan 27 15:45:32 PST 2002



msmith      02/01/27 15:45:32

  Modified:    src      encode.c
  Log:
  API updates for CBR encoding. Sometime soon, options will be added to use
  VBR, and to specify min/max bitrates.

Revision  Changes    Path
1.4       +5 -3      ices/src/encode.c

Index: encode.c
===================================================================
RCS file: /usr/local/cvsroot/ices/src/encode.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- encode.c	2001/11/10 04:47:24	1.3
+++ encode.c	2002/01/27 23:45:32	1.4
@@ -1,7 +1,7 @@
 /* encode.c
  * - runtime encoding of PCM data.
  *
- * $Id: encode.c,v 1.3 2001/11/10 04:47:24 msmith Exp $
+ * $Id: encode.c,v 1.4 2002/01/27 23:45:32 msmith Exp $
  *
  * Copyright (c) 2001 Michael Smith <msmith at labyrinth.net.au>
  *
@@ -151,9 +151,11 @@
         {
                 while(vorbis_analysis_blockout(&s->vd, &s->vb)==1)
                 {
-			vorbis_analysis(&s->vb, &op);
+			vorbis_analysis(&s->vb, NULL);
+            vorbis_bitrate_addblock(&s->vd);
 
-			ogg_stream_packetin(&s->os, &op);
+            while(vorbis_bitrate_flushpacket(&s->vd, &op)) 
+    			ogg_stream_packetin(&s->os, &op);
                 }
 
         /* FIXME: Make this threshold configurable.

<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