libvorbis documentation | libvorbis version 1.3.2 - 20101101

# vorbis_analysis_headerout

declared in "vorbis/codec.h";

This function creates and returns the three header packets needed to configure a decoder to accept compressed data. I should be called after all encoder initialization and configuration is complete. The output packets should be placed in order at the start of the compressed vorbis stream, prior to the first data packet.

    extern int      vorbis_analysis_headerout(vorbis_dsp_state *v,
                                              vorbis_comment *vc,
                                              ogg_packet *op,
                                              ogg_packet *op_comm,
                                              ogg_packet *op_code);

### Parameters

v
  Pointer to an initialized vorbis_dsp_state which holds the encoder configuration.
vc
  Pointer to an initialized vorbis_comment structure which holds the metadata associated with the stream being encoded.
op
  Pointer to an ogg_packet structure to be filled out with the stream identification header.
op_comm
  Pointer to an ogg_packet structure to be filled out with the serialied vorbis_comment data.
op_code
  Pointer to an ogg_packet structure to be filled out with the codebooks, mode descriptions, etc. which will be used encoding the stream.

### Return Values

- 0 for success
- negative values for failure:
  - OV_EFAULT - Internal fault; indicates a bug or memory corruption.
  - OV_EIMPL - Unimplemented; not supported by this version of the library.

copyright © 2010 Xiph.Org | Ogg Vorbis
libvorbis documentation | libvorbis version 1.3.2 - 20101101