Chris@1: The ogg_sync_state struct tracks the synchronization of the current page.
Chris@1:
It is used during decoding to track the status of data as it is read in, synchronized, verified, and parsed into pages belonging to the various logical bistreams in the current physical bitstream link.
Chris@1:
Chris@1:
Chris@1:
Chris@1:
Chris@1:
Chris@1:
Chris@1: typedef struct {
Chris@1: unsigned char *data;
Chris@1: int storage;
Chris@1: int fill;
Chris@1: int returned;
Chris@1:
Chris@1: int unsynced;
Chris@1: int headerbytes;
Chris@1: int bodybytes;
Chris@1: } ogg_sync_state;
Chris@1:
Chris@1:
Chris@1:
Chris@1:
Chris@1:
Chris@1:
Relevant Struct Members
Chris@1:
Chris@1:
data
Chris@1:
Pointer to buffered stream data.
Chris@1:
storage
Chris@1:
Current allocated size of the stream buffer held in *data.
Chris@1:
fill
Chris@1:
The number of valid bytes currently held in *data; functions as the buffer head pointer.
Chris@1:
returned
Chris@1:
The number of bytes at the head of *data that have already been returned as pages; functions as the buffer tail pointer.
Chris@1:
unsynced
Chris@1:
Synchronization state flag; nonzero if sync has not yet been attained or has been lost.
Chris@1:
headerbytes
Chris@1:
If synced, the number of bytes used by the synced page's header.
Chris@1:
bodybytes
Chris@1:
If synced, the number of bytes used by the synced page's body.