Home | History | Annotate | Download | only in src

Lines Matching defs:page

46   unsigned char *page=og->header;
47 ogg_int64_t granulepos=page[13]&(0xff);
48 granulepos= (granulepos<<8)|(page[12]&0xff);
49 granulepos= (granulepos<<8)|(page[11]&0xff);
50 granulepos= (granulepos<<8)|(page[10]&0xff);
51 granulepos= (granulepos<<8)|(page[9]&0xff);
52 granulepos= (granulepos<<8)|(page[8]&0xff);
53 granulepos= (granulepos<<8)|(page[7]&0xff);
54 granulepos= (granulepos<<8)|(page[6]&0xff);
74 /* returns the number of packets that are completed on this page (if
75 the leading packet is begun on a previous page, but ends on this
76 page, it's counted */
79 If a page consists of a packet begun on a previous page, and a new
80 packet begun (but not completed) on this page, the return will be:
81 ogg_page_packets(page) ==1,
82 ogg_page_continued(page) !=0
84 If a page happens to be a single packet that was begun on a
85 previous page, and spans to the next page (in the case of a three or
86 more page packet), the return will be:
87 ogg_page_packets(page) ==0,
88 ogg_page_continued(page) !=0
276 /* checksum the page */
369 /* Conditionally flush a page; force==0 will only flush nominal-size
370 pages, force==1 forces us to flush a page regardless of page size
383 /* construct a page */
386 /* If this is the initial header case, the first page must only include
388 if(os->b_o_s==0){ /* 'initial header page' case */
401 them; this expands page size to reduce unneccessary overhead if incoming packets
435 /* first page flag? */
437 /* last page flag? */
456 /* 32 bits of page counter (we have both counter and page header
503 /* This will flush remaining packets into a page (returning nonzero),
505 (undersized page). If there are no packets or partial packets to
507 try to flush a normal sized page
512 since ogg_stream_flush will flush the last page in a stream even if
515 an page regardless of size in the middle of a stream. */
530 (os->lacing_fill&&!os->b_o_s)) /* 'initial header page' case */
550 by ogg_sync_pageout(). The page is then submitted to
600 long newsize=size+oy->fill+4096; /* an extra page to be nice */
626 /* sync the stream. This is meant to be useful for finding page
631 0) page not ready; more data (no bytes skipped)
632 n) page synced at current location; page length n bytes
637 unsigned char *page=oy->data+oy->returned;
648 if(memcmp(page,"OggS",4))goto sync_fail;
650 headerbytes=page[26]+27;
655 for(i=0;i<page[26];i++)
656 oy->bodybytes+=page[27+i];
662 /* The whole test page is buffered. Verify the checksum */
668 memcpy(chksum,page+22,4);
669 memset(page+22,0,4);
671 /* set up a temp page struct and recompute the checksum */
672 log.header=page;
674 log.body=page+oy->headerbytes;
679 if(memcmp(chksum,page+22,4)){
680 /* D'oh. Mismatch! Corrupt page (or miscapture and not a page
683 memcpy(page+22,chksum,4);
690 /* yes, have a whole page all ready to go */
692 unsigned char *page=oy->data+oy->returned;
696 og->header=page;
698 og->body=page+oy->headerbytes;
715 next=memchr(page+1,'O',bytes-1);
720 return((long)-(next-page));
723 /* sync the stream and get a page. Keep trying until we find a page.
729 1) page returned
738 /* all we need to do is verify a page at the head of the stream
745 /* have a page */
753 /* head did not start a synced page... skipped some bytes */
764 /* add the incoming page to the stream state; we decompose the page
833 /* are we a 'continued packet' page? If so, we may need to skip
1254 /* page with the 255 segment limit */
1308 /* packet that overspans over an entire page */
1400 /* packet that overspans over an entire page */
1499 /* We have a page. Check it carefully */
1518 /* have a complete page; submit it to sync/decode */
1545 /* got a page. Happy happy. Verify that it's good. */
1607 fprintf(stderr,"did not write last page!\n");
1611 fprintf(stderr,"did not decode last page!\n");
1615 fprintf(stderr,"encoded page data incomplete!\n");
1619 fprintf(stderr,"decoded page data incomplete!\n");
1647 fprintf(stderr,"testing single page encoding... ");
1656 fprintf(stderr,"testing basic page encoding... ");
1679 /* continuing packet test; with page spill expansion, we have to
1684 fprintf(stderr,"testing single packet page span... ");
1693 fprintf(stderr,"testing page spill expansion... ");
1697 /* page with the 255 segment limit */
1739 /* packet that overspans over an entire page */
1758 /* term only page. why not? */
1762 fprintf(stderr,"testing zero data page (1 nil packet)... ");
1840 fprintf(stderr,"Error: loss of page did not return error\n");
1899 fprintf(stderr,"Error: loss of page did not return error\n");
1910 /* Test fractional page inputs: incomplete capture */
1918 /* Test fractional page inputs: incomplete fixed header */
1924 /* Test fractional page inputs: incomplete header */
1930 /* Test fractional page inputs: incomplete body */
1949 /* Test fractional page inputs: page + incomplete capture */
1980 /* Test recapture: garbage + page */
2017 /* Test recapture: page + garbage + page */
2059 /* Free page data that was previously copied */