package ogg

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Ogg.SyncSource

Sourcetype t
Sourcetype read = bytes -> int -> int -> int

Type for read functions.

Sourceval create : read -> t

* This function is used to initialize a Sync.t to a known initial value * in preparation for manipulation of an Ogg bitstream. * * The function passed is used to fill the stream with new data.

Sourceval create_from_file : string -> t * Unix.file_descr

* Wrapper around create to open a file as the ogg stream.

Sourceval read : t -> Page.t

* Read a page from Sync.t * * Raises End_of_stream if the reading function returned an empty string. * Raises Out_of_sync if data is not synced and some byte where skiped.

Sourceval reset : ?read_func:read -> t -> unit

* This function is used to reset the internal counters of the * Sync.t to initial values. * * read_func is optional and is a new function to read new data.

Sourceval seek : t -> Page.t

* This function synchronizes the ogg_sync_state struct to the next ogg_page. * * This is useful when seeking within a bitstream. page_seek will synchronize * to the next page in the bitstream and return information about how many bytes * we advanced or skipped in order to do so.