#include <ogg/os_types.h>Go to the source code of this file.
|
|
Definition at line 896 of file framing.c. References _ogg_free, and ogg_packet::packet.
|
|
|
Definition at line 37 of file framing.c. References ogg_page::header. Referenced by ogg_stream_pagein(). 00037 { 00038 return((int)(og->header[5]&0x02)); 00039 }
|
|
|
Definition at line 247 of file framing.c. References ogg_page::body, ogg_page::body_len, ogg_page::header, and ogg_page::header_len. Referenced by ogg_stream_flush(), and ogg_sync_pageseek(). 00247 { 00248 if(og){ 00249 ogg_uint32_t crc_reg=0; 00250 int i; 00251 00252 /* safety; needed for API behavior, but not framing code */ 00253 og->header[22]=0; 00254 og->header[23]=0; 00255 og->header[24]=0; 00256 og->header[25]=0; 00257 00258 for(i=0;i<og->header_len;i++) 00259 crc_reg=(crc_reg<<8)^crc_lookup[((crc_reg >> 24)&0xff)^og->header[i]]; 00260 for(i=0;i<og->body_len;i++) 00261 crc_reg=(crc_reg<<8)^crc_lookup[((crc_reg >> 24)&0xff)^og->body[i]]; 00262 00263 og->header[22]=(unsigned char)(crc_reg&0xff); 00264 og->header[23]=(unsigned char)((crc_reg>>8)&0xff); 00265 og->header[24]=(unsigned char)((crc_reg>>16)&0xff); 00266 og->header[25]=(unsigned char)((crc_reg>>24)&0xff); 00267 } 00268 }
|
|
|
Definition at line 33 of file framing.c. References ogg_page::header. Referenced by ogg_stream_pagein(). 00033 { 00034 return((int)(og->header[5]&0x01)); 00035 }
|
|
|
Definition at line 41 of file framing.c. References ogg_page::header. Referenced by ogg_stream_pagein(). 00041 { 00042 return((int)(og->header[5]&0x04)); 00043 }
|
|
|
Definition at line 45 of file framing.c. References ogg_page::header. Referenced by ogg_stream_pagein(). 00045 { 00046 unsigned char *page=og->header; 00047 ogg_int64_t granulepos=page[13]&(0xff); 00048 granulepos= (granulepos<<8)|(page[12]&0xff); 00049 granulepos= (granulepos<<8)|(page[11]&0xff); 00050 granulepos= (granulepos<<8)|(page[10]&0xff); 00051 granulepos= (granulepos<<8)|(page[9]&0xff); 00052 granulepos= (granulepos<<8)|(page[8]&0xff); 00053 granulepos= (granulepos<<8)|(page[7]&0xff); 00054 granulepos= (granulepos<<8)|(page[6]&0xff); 00055 return(granulepos); 00056 }
|
|
|
Definition at line 91 of file framing.c. References ogg_page::header. 00091 { 00092 int i,n=og->header[26],count=0; 00093 for(i=0;i<n;i++) 00094 if(og->header[27+i]<255)count++; 00095 return(count); 00096 }
|
|
|
Definition at line 65 of file framing.c. References ogg_page::header. Referenced by ogg_stream_pagein(). 00065 { 00066 return(og->header[18] | 00067 (og->header[19]<<8) | 00068 (og->header[20]<<16) | 00069 (og->header[21]<<24)); 00070 }
|
|
|
Definition at line 58 of file framing.c. References ogg_page::header. Referenced by ogg_stream_pagein(). 00058 { 00059 return(og->header[14] | 00060 (og->header[15]<<8) | 00061 (og->header[16]<<16) | 00062 (og->header[17]<<24)); 00063 }
|
|
|
Definition at line 29 of file framing.c. References ogg_page::header. Referenced by ogg_stream_pagein(). 00029 { 00030 return((int)(og->header[4])); 00031 }
|
|
|
Definition at line 206 of file framing.c. References _ogg_free, ogg_stream_state::body_data, ogg_stream_state::granule_vals, and ogg_stream_state::lacing_vals. Referenced by ogg_stream_destroy(). 00206 { 00207 if(os){ 00208 if(os->body_data)_ogg_free(os->body_data); 00209 if(os->lacing_vals)_ogg_free(os->lacing_vals); 00210 if(os->granule_vals)_ogg_free(os->granule_vals); 00211 00212 memset(os,0,sizeof(*os)); 00213 } 00214 return(0); 00215 }
|
|
|
Definition at line 217 of file framing.c. References _ogg_free, and ogg_stream_clear(). 00217 { 00218 if(os){ 00219 ogg_stream_clear(os); 00220 _ogg_free(os); 00221 } 00222 return(0); 00223 }
|
|
|
Definition at line 461 of file framing.c. References ogg_stream_state::e_o_s. 00461 { 00462 return os->e_o_s; 00463 }
|
|
||||||||||||
|
Definition at line 333 of file framing.c. References ogg_stream_state::b_o_s, ogg_page::body, ogg_stream_state::body_data, ogg_page::body_len, ogg_stream_state::body_returned, ogg_stream_state::e_o_s, ogg_stream_state::granule_vals, ogg_stream_state::header, ogg_page::header, ogg_stream_state::header_fill, ogg_page::header_len, ogg_stream_state::lacing_fill, ogg_stream_state::lacing_vals, ogg_page_checksum_set(), ogg_stream_state::pageno, and ogg_stream_state::serialno. Referenced by ogg_stream_pageout(). 00333 { 00334 int i; 00335 int vals=0; 00336 int maxvals=(os->lacing_fill>255?255:os->lacing_fill); 00337 int bytes=0; 00338 long acc=0; 00339 ogg_int64_t granule_pos=-1; 00340 00341 if(maxvals==0)return(0); 00342 00343 /* construct a page */ 00344 /* decide how many segments to include */ 00345 00346 /* If this is the initial header case, the first page must only include 00347 the initial header packet */ 00348 if(os->b_o_s==0){ /* 'initial header page' case */ 00349 granule_pos=0; 00350 for(vals=0;vals<maxvals;vals++){ 00351 if((os->lacing_vals[vals]&0x0ff)<255){ 00352 vals++; 00353 break; 00354 } 00355 } 00356 }else{ 00357 for(vals=0;vals<maxvals;vals++){ 00358 if(acc>4096)break; 00359 acc+=os->lacing_vals[vals]&0x0ff; 00360 if((os->lacing_vals[vals]&0xff)<255) 00361 granule_pos=os->granule_vals[vals]; 00362 } 00363 } 00364 00365 /* construct the header in temp storage */ 00366 memcpy(os->header,"OggS",4); 00367 00368 /* stream structure version */ 00369 os->header[4]=0x00; 00370 00371 /* continued packet flag? */ 00372 os->header[5]=0x00; 00373 if((os->lacing_vals[0]&0x100)==0)os->header[5]|=0x01; 00374 /* first page flag? */ 00375 if(os->b_o_s==0)os->header[5]|=0x02; 00376 /* last page flag? */ 00377 if(os->e_o_s && os->lacing_fill==vals)os->header[5]|=0x04; 00378 os->b_o_s=1; 00379 00380 /* 64 bits of PCM position */ 00381 for(i=6;i<14;i++){ 00382 os->header[i]=(unsigned char)(granule_pos&0xff); 00383 granule_pos>>=8; 00384 } 00385 00386 /* 32 bits of stream serial number */ 00387 { 00388 long serialno=os->serialno; 00389 for(i=14;i<18;i++){ 00390 os->header[i]=(unsigned char)(serialno&0xff); 00391 serialno>>=8; 00392 } 00393 } 00394 00395 /* 32 bits of page counter (we have both counter and page header 00396 because this val can roll over) */ 00397 if(os->pageno==-1)os->pageno=0; /* because someone called 00398 stream_reset; this would be a 00399 strange thing to do in an 00400 encode stream, but it has 00401 plausible uses */ 00402 { 00403 long pageno=os->pageno++; 00404 for(i=18;i<22;i++){ 00405 os->header[i]=(unsigned char)(pageno&0xff); 00406 pageno>>=8; 00407 } 00408 } 00409 00410 /* zero for computation; filled in later */ 00411 os->header[22]=0; 00412 os->header[23]=0; 00413 os->header[24]=0; 00414 os->header[25]=0; 00415 00416 /* segment table */ 00417 os->header[26]=(unsigned char)(vals&0xff); 00418 for(i=0;i<vals;i++) 00419 bytes+=os->header[i+27]=(unsigned char)(os->lacing_vals[i]&0xff); 00420 00421 /* set pointers in the ogg_page struct */ 00422 og->header=os->header; 00423 og->header_len=os->header_fill=vals+27; 00424 og->body=os->body_data+os->body_returned; 00425 og->body_len=bytes; 00426 00427 /* advance the lacing data and set the body_returned pointer */ 00428 00429 os->lacing_fill-=vals; 00430 memmove(os->lacing_vals,os->lacing_vals+vals,os->lacing_fill*sizeof(*os->lacing_vals)); 00431 memmove(os->granule_vals,os->granule_vals+vals,os->lacing_fill*sizeof(*os->granule_vals)); 00432 os->body_returned+=bytes; 00433 00434 /* calculate the checksum */ 00435 00436 ogg_page_checksum_set(og); 00437 00438 /* done */ 00439 return(1); 00440 }
|
|
||||||||||||
|
Definition at line 188 of file framing.c. References _ogg_malloc. 00188 { 00189 if(os){ 00190 memset(os,0,sizeof(*os)); 00191 os->body_storage=16*1024; 00192 os->body_data=_ogg_malloc(os->body_storage*sizeof(*os->body_data)); 00193 00194 os->lacing_storage=1024; 00195 os->lacing_vals=_ogg_malloc(os->lacing_storage*sizeof(*os->lacing_vals)); 00196 os->granule_vals=_ogg_malloc(os->lacing_storage*sizeof(*os->granule_vals)); 00197 00198 os->serialno=serialno; 00199 00200 return(0); 00201 } 00202 return(-1); 00203 }
|
|
||||||||||||
|
Definition at line 271 of file framing.c. References _os_body_expand(), _os_lacing_expand(), ogg_stream_state::body_data, ogg_stream_state::body_fill, ogg_stream_state::body_returned, ogg_packet::bytes, ogg_packet::e_o_s, ogg_stream_state::e_o_s, ogg_stream_state::granule_vals, ogg_stream_state::granulepos, ogg_packet::granulepos, ogg_stream_state::lacing_fill, ogg_stream_state::lacing_vals, ogg_packet::packet, and ogg_stream_state::packetno. 00271 { 00272 int lacing_vals=op->bytes/255+1,i; 00273 00274 if(os->body_returned){ 00275 /* advance packet data according to the body_returned pointer. We 00276 had to keep it around to return a pointer into the buffer last 00277 call */ 00278 00279 os->body_fill-=os->body_returned; 00280 if(os->body_fill) 00281 memmove(os->body_data,os->body_data+os->body_returned, 00282 os->body_fill); 00283 os->body_returned=0; 00284 } 00285 00286 /* make sure we have the buffer storage */ 00287 _os_body_expand(os,op->bytes); 00288 _os_lacing_expand(os,lacing_vals); 00289 00290 /* Copy in the submitted packet. Yes, the copy is a waste; this is 00291 the liability of overly clean abstraction for the time being. It 00292 will actually be fairly easy to eliminate the extra copy in the 00293 future */ 00294 00295 memcpy(os->body_data+os->body_fill,op->packet,op->bytes); 00296 os->body_fill+=op->bytes; 00297 00298 /* Store lacing vals for this packet */ 00299 for(i=0;i<lacing_vals-1;i++){ 00300 os->lacing_vals[os->lacing_fill+i]=255; 00301 os->granule_vals[os->lacing_fill+i]=os->granulepos; 00302 } 00303 os->lacing_vals[os->lacing_fill+i]=(op->bytes)%255; 00304 os->granulepos=os->granule_vals[os->lacing_fill+i]=op->granulepos; 00305 00306 /* flag the first segment as the beginning of the packet */ 00307 os->lacing_vals[os->lacing_fill]|= 0x100; 00308 00309 os->lacing_fill+=lacing_vals; 00310 00311 /* for the sake of completeness */ 00312 os->packetno++; 00313 00314 if(op->e_o_s)os->e_o_s=1; 00315 00316 return(0); 00317 }
|
|
||||||||||||
|
Definition at line 888 of file framing.c. References _packetout(). 00888 { 00889 return _packetout(os,op,1); 00890 }
|
|
||||||||||||
|
Definition at line 892 of file framing.c. References _packetout(). 00892 { 00893 return _packetout(os,op,0); 00894 }
|
|
||||||||||||
|
Definition at line 673 of file framing.c. References _os_body_expand(), _os_lacing_expand(), ogg_page::body, ogg_stream_state::body_data, ogg_stream_state::body_fill, ogg_page::body_len, ogg_stream_state::body_returned, ogg_stream_state::e_o_s, ogg_stream_state::granule_vals, ogg_page::header, ogg_stream_state::lacing_fill, ogg_stream_state::lacing_packet, ogg_stream_state::lacing_returned, ogg_stream_state::lacing_vals, ogg_page_bos(), ogg_page_continued(), ogg_page_eos(), ogg_page_granulepos(), ogg_page_pageno(), ogg_page_serialno(), ogg_page_version(), ogg_stream_state::pageno, and ogg_stream_state::serialno. 00673 { 00674 unsigned char *header=og->header; 00675 unsigned char *body=og->body; 00676 long bodysize=og->body_len; 00677 int segptr=0; 00678 00679 int version=ogg_page_version(og); 00680 int continued=ogg_page_continued(og); 00681 int bos=ogg_page_bos(og); 00682 int eos=ogg_page_eos(og); 00683 ogg_int64_t granulepos=ogg_page_granulepos(og); 00684 int serialno=ogg_page_serialno(og); 00685 long pageno=ogg_page_pageno(og); 00686 int segments=header[26]; 00687 00688 /* clean up 'returned data' */ 00689 { 00690 long lr=os->lacing_returned; 00691 long br=os->body_returned; 00692 00693 /* body data */ 00694 if(br){ 00695 os->body_fill-=br; 00696 if(os->body_fill) 00697 memmove(os->body_data,os->body_data+br,os->body_fill); 00698 os->body_returned=0; 00699 } 00700 00701 if(lr){ 00702 /* segment table */ 00703 if(os->lacing_fill-lr){ 00704 memmove(os->lacing_vals,os->lacing_vals+lr, 00705 (os->lacing_fill-lr)*sizeof(*os->lacing_vals)); 00706 memmove(os->granule_vals,os->granule_vals+lr, 00707 (os->lacing_fill-lr)*sizeof(*os->granule_vals)); 00708 } 00709 os->lacing_fill-=lr; 00710 os->lacing_packet-=lr; 00711 os->lacing_returned=0; 00712 } 00713 } 00714 00715 /* check the serial number */ 00716 if(serialno!=os->serialno)return(-1); 00717 if(version>0)return(-1); 00718 00719 _os_lacing_expand(os,segments+1); 00720 00721 /* are we in sequence? */ 00722 if(pageno!=os->pageno){ 00723 int i; 00724 00725 /* unroll previous partial packet (if any) */ 00726 for(i=os->lacing_packet;i<os->lacing_fill;i++) 00727 os->body_fill-=os->lacing_vals[i]&0xff; 00728 os->lacing_fill=os->lacing_packet; 00729 00730 /* make a note of dropped data in segment table */ 00731 if(os->pageno!=-1){ 00732 os->lacing_vals[os->lacing_fill++]=0x400; 00733 os->lacing_packet++; 00734 } 00735 } 00736 00737 /* are we a 'continued packet' page? If so, we may need to skip 00738 some segments */ 00739 if(continued){ 00740 if(os->lacing_fill<1 || 00741 os->lacing_vals[os->lacing_fill-1]==0x400){ 00742 bos=0; 00743 for(;segptr<segments;segptr++){ 00744 int val=header[27+segptr]; 00745 body+=val; 00746 bodysize-=val; 00747 if(val<255){ 00748 segptr++; 00749 break; 00750 } 00751 } 00752 } 00753 } 00754 00755 if(bodysize){ 00756 _os_body_expand(os,bodysize); 00757 memcpy(os->body_data+os->body_fill,body,bodysize); 00758 os->body_fill+=bodysize; 00759 } 00760 00761 { 00762 int saved=-1; 00763 while(segptr<segments){ 00764 int val=header[27+segptr]; 00765 os->lacing_vals[os->lacing_fill]=val; 00766 os->granule_vals[os->lacing_fill]=-1; 00767 00768 if(bos){ 00769 os->lacing_vals[os->lacing_fill]|=0x100; 00770 bos=0; 00771 } 00772 00773 if(val<255)saved=os->lacing_fill; 00774 00775 os->lacing_fill++; 00776 segptr++; 00777 00778 if(val<255)os->lacing_packet=os->lacing_fill; 00779 } 00780 00781 /* set the granulepos on the last granuleval of the last full packet */ 00782 if(saved!=-1){ 00783 os->granule_vals[saved]=granulepos; 00784 } 00785 00786 } 00787 00788 if(eos){ 00789 os->e_o_s=1; 00790 if(os->lacing_fill>0) 00791 os->lacing_vals[os->lacing_fill-1]|=0x200; 00792 } 00793 00794 os->pageno=pageno+1; 00795 00796 return(0); 00797 }
|
|
||||||||||||
|
Definition at line 447 of file framing.c. References ogg_stream_state::b_o_s, ogg_stream_state::body_fill, ogg_stream_state::body_returned, ogg_stream_state::e_o_s, ogg_stream_state::lacing_fill, and ogg_stream_flush(). 00447 { 00448 00449 if((os->e_o_s&&os->lacing_fill) || /* 'were done, now flush' case */ 00450 os->body_fill-os->body_returned > 4096 ||/* 'page nominal size' case */ 00451 os->lacing_fill>=255 || /* 'segment table full' case */ 00452 (os->lacing_fill&&!os->b_o_s)){ /* 'initial header page' case */ 00453 00454 return(ogg_stream_flush(os,og)); 00455 } 00456 00457 /* not enough data to construct a page and not end of stream */ 00458 return(0); 00459 }
|
|
|
Definition at line 809 of file framing.c. References ogg_stream_state::b_o_s, ogg_stream_state::body_fill, ogg_stream_state::body_returned, ogg_stream_state::e_o_s, ogg_stream_state::granulepos, ogg_stream_state::header_fill, ogg_stream_state::lacing_fill, ogg_stream_state::lacing_packet, ogg_stream_state::lacing_returned, ogg_stream_state::packetno, and ogg_stream_state::pageno. Referenced by ogg_stream_reset_serialno(). 00809 { 00810 os->body_fill=0; 00811 os->body_returned=0; 00812 00813 os->lacing_fill=0; 00814 os->lacing_packet=0; 00815 os->lacing_returned=0; 00816 00817 os->header_fill=0; 00818 00819 os->e_o_s=0; 00820 os->b_o_s=0; 00821 os->pageno=-1; 00822 os->packetno=0; 00823 os->granulepos=0; 00824 00825 return(0); 00826 }
|
|
||||||||||||
|
Definition at line 828 of file framing.c. References ogg_stream_reset(), and ogg_stream_state::serialno. 00828 { 00829 ogg_stream_reset(os); 00830 os->serialno=serialno; 00831 return(0); 00832 }
|
|
||||||||||||
|
Definition at line 505 of file framing.c. References _ogg_malloc, _ogg_realloc, ogg_sync_state::data, ogg_sync_state::fill, ogg_sync_state::returned, and ogg_sync_state::storage. 00505 { 00506 00507 /* first, clear out any space that has been previously returned */ 00508 if(oy->returned){ 00509 oy->fill-=oy->returned; 00510 if(oy->fill>0) 00511 memmove(oy->data,oy->data+oy->returned,oy->fill); 00512 oy->returned=0; 00513 } 00514 00515 if(size>oy->storage-oy->fill){ 00516 /* We need to extend the internal buffer */ 00517 long newsize=size+oy->fill+4096; /* an extra page to be nice */ 00518 00519 if(oy->data) 00520 oy->data=_ogg_realloc(oy->data,newsize); 00521 else 00522 oy->data=_ogg_malloc(newsize); 00523 oy->storage=newsize; 00524 } 00525 00526 /* expose a segment at least as large as requested at the fill mark */ 00527 return((char *)oy->data+oy->fill); 00528 }
|
|
|
Definition at line 489 of file framing.c. References _ogg_free, ogg_sync_state::data, and ogg_sync_init(). Referenced by ogg_sync_destroy(). 00489 { 00490 if(oy){ 00491 if(oy->data)_ogg_free(oy->data); 00492 ogg_sync_init(oy); 00493 } 00494 return(0); 00495 }
|
|
|
Definition at line 497 of file framing.c. References _ogg_free, and ogg_sync_clear(). 00497 { 00498 if(oy){ 00499 ogg_sync_clear(oy); 00500 _ogg_free(oy); 00501 } 00502 return(0); 00503 }
|
|
|
Definition at line 481 of file framing.c. Referenced by ogg_sync_clear().
|
|
||||||||||||
|
Definition at line 642 of file framing.c. References ogg_sync_pageseek(), and ogg_sync_state::unsynced. 00642 { 00643 00644 /* all we need to do is verify a page at the head of the stream 00645 buffer. If it doesn't verify, we look for the next potential 00646 frame */ 00647 00648 for(;;){ 00649 long ret=ogg_sync_pageseek(oy,og); 00650 if(ret>0){ 00651 /* have a page */ 00652 return(1); 00653 } 00654 if(ret==0){ 00655 /* need more data */ 00656 return(0); 00657 } 00658 00659 /* head did not start a synced page... skipped some bytes */ 00660 if(!oy->unsynced){ 00661 oy->unsynced=1; 00662 return(-1); 00663 } 00664 00665 /* loop. keep looking */ 00666 00667 } 00668 }
|
|
||||||||||||
|
Definition at line 546 of file framing.c. References ogg_page::body, ogg_page::body_len, ogg_sync_state::bodybytes, ogg_sync_state::data, ogg_sync_state::fill, ogg_page::header, ogg_page::header_len, ogg_sync_state::headerbytes, ogg_page_checksum_set(), ogg_sync_state::returned, and ogg_sync_state::unsynced. Referenced by ogg_sync_pageout(). 00546 { 00547 unsigned char *page=oy->data+oy->returned; 00548 unsigned char *next; 00549 long bytes=oy->fill-oy->returned; 00550 00551 if(oy->headerbytes==0){ 00552 int headerbytes,i; 00553 if(bytes<27)return(0); /* not enough for a header */ 00554 00555 /* verify capture pattern */ 00556 if(memcmp(page,"OggS",4))goto sync_fail; 00557 00558 headerbytes=page[26]+27; 00559 if(bytes<headerbytes)return(0); /* not enough for header + seg table */ 00560 00561 /* count up body length in the segment table */ 00562 00563 for(i=0;i<page[26];i++) 00564 oy->bodybytes+=page[27+i]; 00565 oy->headerbytes=headerbytes; 00566 } 00567 00568 if(oy->bodybytes+oy->headerbytes>bytes)return(0); 00569 00570 /* The whole test page is buffered. Verify the checksum */ 00571 { 00572 /* Grab the checksum bytes, set the header field to zero */ 00573 char chksum[4]; 00574 ogg_page log; 00575 00576 memcpy(chksum,page+22,4); 00577 memset(page+22,0,4); 00578 00579 /* set up a temp page struct and recompute the checksum */ 00580 log.header=page; 00581 log.header_len=oy->headerbytes; 00582 log.body=page+oy->headerbytes; 00583 log.body_len=oy->bodybytes; 00584 ogg_page_checksum_set(&log); 00585 00586 /* Compare */ 00587 if(memcmp(chksum,page+22,4)){ 00588 /* D'oh. Mismatch! Corrupt page (or miscapture and not a page 00589 at all) */ 00590 /* replace the computed checksum with the one actually read in */ 00591 memcpy(page+22,chksum,4); 00592 00593 /* Bad checksum. Lose sync */ 00594 goto sync_fail; 00595 } 00596 } 00597 00598 /* yes, have a whole page all ready to go */ 00599 { 00600 unsigned char *page=oy->data+oy->returned; 00601 long bytes; 00602 00603 if(og){ 00604 og->header=page; 00605 og->header_len=oy->headerbytes; 00606 og->body=page+oy->headerbytes; 00607 og->body_len=oy->bodybytes; 00608 } 00609 00610 oy->unsynced=0; 00611 oy->returned+=(bytes=oy->headerbytes+oy->bodybytes); 00612 oy->headerbytes=0; 00613 oy->bodybytes=0; 00614 return(bytes); 00615 } 00616 00617 sync_fail: 00618 00619 oy->headerbytes=0; 00620 oy->bodybytes=0; 00621 00622 /* search for possible capture */ 00623 next=memchr(page+1,'O',bytes-1); 00624 if(!next) 00625 next=oy->data+oy->fill; 00626 00627 oy->returned=next-oy->data; 00628 return(-(next-page)); 00629 }
|
|
|
Definition at line 800 of file framing.c. References ogg_sync_state::bodybytes, ogg_sync_state::fill, ogg_sync_state::headerbytes, ogg_sync_state::returned, and ogg_sync_state::unsynced. 00800 { 00801 oy->fill=0; 00802 oy->returned=0; 00803 oy->unsynced=0; 00804 oy->headerbytes=0; 00805 oy->bodybytes=0; 00806 return(0); 00807 }
|
|
||||||||||||
|
Definition at line 530 of file framing.c. References ogg_sync_state::fill, and ogg_sync_state::storage. 00530 { 00531 if(oy->fill+bytes>oy->storage)return(-1); 00532 oy->fill+=bytes; 00533 return(0); 00534 }
|
|
||||||||||||
|
Definition at line 288 of file bitwise.c. References oggpack_buffer::endbit, oggpack_buffer::endbyte, and oggpack_buffer::ptr. Referenced by oggpackB_adv(). 00288 { 00289 bits+=b->endbit; 00290 b->ptr+=bits/8; 00291 b->endbyte+=bits/8; 00292 b->endbit=bits&7; 00293 }
|
|