[xiph-cvs] cvs commit: ogg/src framing.c

Jack Moffitt jack at xiph.org
Tue Sep 26 10:55:59 PDT 2000



jack        00/09/26 10:55:58

  Modified:    include/ogg ogg.h
               src      framing.c
  Log:
  changed all instances of "frameno" to "granulepos"
  
  jack.

Revision  Changes    Path
1.3       +2 -2      ogg/include/ogg/ogg.h

Index: ogg.h
===================================================================
RCS file: /usr/local/cvsroot/ogg/include/ogg/ogg.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ogg.h	2000/09/07 00:38:33	1.2
+++ ogg.h	2000/09/26 17:55:57	1.3
@@ -71,7 +71,7 @@
   long  b_o_s;
   long  e_o_s;
 
-  ogg_int64_t  frameno;
+  ogg_int64_t  granulepos;
   ogg_int64_t  packetno;       /* sequence number for decode; the framing
                              knows where there's a hole in the data,
                              but we need coupling so that the codec
@@ -142,7 +142,7 @@
 extern int      ogg_page_continued(ogg_page *og);
 extern int      ogg_page_bos(ogg_page *og);
 extern int      ogg_page_eos(ogg_page *og);
-extern ogg_int64_t  ogg_page_frameno(ogg_page *og);
+extern ogg_int64_t  ogg_page_granulepos(ogg_page *og);
 extern int      ogg_page_serialno(ogg_page *og);
 extern int      ogg_page_pageno(ogg_page *og);
 

1.2       +10 -10    ogg/src/framing.c

Index: framing.c
===================================================================
RCS file: /usr/local/cvsroot/ogg/src/framing.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- framing.c	2000/09/03 05:54:28	1.1
+++ framing.c	2000/09/26 17:55:58	1.2
@@ -13,7 +13,7 @@
 
  function: code raw [Vorbis] packets into framed OggSquish stream and
            decode Ogg streams back into raw packets
- last mod: $Id: framing.c,v 1.1 2000/09/03 05:54:28 jack Exp $
+ last mod: $Id: framing.c,v 1.2 2000/09/26 17:55:58 jack Exp $
 
  note: The CRC code is directly derived from public domain code by
  Ross Williams (ross at guest.adelaide.edu.au).  See docs/framing.html
@@ -43,7 +43,7 @@
   return((int)(og->header[5]&0x04));
 }
 
-ogg_int64_t ogg_page_frameno(ogg_page *og){
+ogg_int64_t ogg_page_granulepos(ogg_page *og){
   unsigned char *page=og->header;
   ogg_int64_t granulepos=page[13]&(0xff);
   granulepos= (granulepos<<8)|(page[12]&0xff);
@@ -217,7 +217,7 @@
     os->granule_vals[os->lacing_fill+i]=os->granulepos;
   }
   os->lacing_vals[os->lacing_fill+i]=(op->bytes)%255;
-  os->granulepos=os->granule_vals[os->lacing_fill+i]=op->frameno;
+  os->granulepos=os->granule_vals[os->lacing_fill+i]=op->granulepos;
 
   /* flag the first segment as the beginning of the packet */
   os->lacing_vals[os->lacing_fill]|= 0x100;
@@ -590,7 +590,7 @@
   int continued=ogg_page_continued(og);
   int bos=ogg_page_bos(og);
   int eos=ogg_page_eos(og);
-  ogg_int64_t granulepos=ogg_page_frameno(og);
+  ogg_int64_t granulepos=ogg_page_granulepos(og);
   int serialno=ogg_page_serialno(og);
   int pageno=ogg_page_pageno(og);
   int segments=header[26];
@@ -770,7 +770,7 @@
     }
 
     op->packetno=os->packetno;
-    op->frameno=os->granule_vals[ptr];
+    op->granulepos=os->granule_vals[ptr];
     op->bytes=bytes;
 
     os->body_returned+=bytes;
@@ -795,7 +795,7 @@
     fprintf(stderr,"incorrect packet length!\n");
     exit(1);
   }
-  if(op->frameno!=pos){
+  if(op->granulepos!=pos){
     fprintf(stderr,"incorrect packet position!\n");
     exit(1);
   }
@@ -1103,7 +1103,7 @@
     op.packet=data+inptr;
     op.bytes=len;
     op.e_o_s=(pl[i+1]<0?1:0);
-    op.frameno=granule_pos;
+    op.granulepos=granule_pos;
 
     granule_pos+=1024;
 
@@ -1182,8 +1182,8 @@
               if(op_de.e_o_s)eosflag=1;
 
               /* check granulepos flag */
-	      if(op_de.frameno!=-1){
-		fprintf(stderr," granule:%ld ",(long)op_de.frameno);
+	      if(op_de.granulepos!=-1){
+		fprintf(stderr," granule:%ld ",(long)op_de.granulepos);
               }
             }
           }
@@ -1350,7 +1350,7 @@
       op.packet=data+inptr;
       op.bytes=len;
       op.e_o_s=(pl[i+1]<0?1:0);
-      op.frameno=(i+1)*1000;
+      op.granulepos=(i+1)*1000;
 
       for(j=0;j<len;j++)data[inptr++]=i+j;
       ogg_stream_packetin(&os_en,&op);

--- >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