FLAC/_encoder.h: encoder interfaces

Main Page Modules Class Hierarchy Alphabetical List Compound List File List Compound Members File Members

# FLAC/_encoder.h: encoder interfaces
[FLAC C API]

This module describes the two encoder layers provided by libFLAC. More...

## Modules

FLAC/file_encoder.h: file encoder interface
| This module contains the functions which implement the file encoder.

FLAC/seekable_stream_encoder.h: seekable stream encoder interface
| This module contains the functions which implement the seekable stream encoder.

FLAC/stream_encoder.h: stream encoder interface
| This module contains the functions which implement the stream encoder.

## Detailed Description

This module describes the two encoder layers provided by libFLAC.

For encoding FLAC streams, libFLAC provides three layers of access. The lowest layer is non-seekable stream-level encoding, the next is seekable stream-level encoding, and the highest layer is file-level encoding. The interfaces are described in the stream encoder, seekable stream encoder, and file encoder modules respectively. Typically you will choose the highest layer that your input source will support. The stream encoder relies on callbacks for writing the data and metadata. The file encoder provides these callbacks internally and you need only supply the filename.

The stream encoder relies on callbacks for writing the data and has no provisions for seeking the output. The seekable stream encoder wraps the stream encoder and also automaticallay handles the writing back of metadata discovered while encoding. However, you must provide extra callbacks for seek-related operations on your output, like seek and tell. The file encoder wraps the seekable stream encoder and supplies all of the callbacks internally, simplifying the processing of standard files. The only callback exposed is for progress reporting, and that is optional.