📄 seekable_stream_decoder.h
字号:
* from the beginning of the stream. * \param client_data The callee's client data set through * FLAC__seekable_stream_decoder_set_client_data(). * \retval FLAC__SeekableStreamDecoderTellStatus * The callee's return status. */typedef FLAC__SeekableStreamDecoderTellStatus (*FLAC__SeekableStreamDecoderTellCallback)(const FLAC__SeekableStreamDecoder *decoder, FLAC__uint64 *absolute_byte_offset, void *client_data);/** Signature for the length callback. * See FLAC__seekable_stream_decoder_set_length_callback() for more info. * * \param decoder The decoder instance calling the callback. * \param stream_length A pointer to storage for the length of the stream * in bytes. * \param client_data The callee's client data set through * FLAC__seekable_stream_decoder_set_client_data(). * \retval FLAC__SeekableStreamDecoderLengthStatus * The callee's return status. */typedef FLAC__SeekableStreamDecoderLengthStatus (*FLAC__SeekableStreamDecoderLengthCallback)(const FLAC__SeekableStreamDecoder *decoder, FLAC__uint64 *stream_length, void *client_data);/** Signature for the EOF callback. * See FLAC__seekable_stream_decoder_set_eof_callback() for more info. * * \param decoder The decoder instance calling the callback. * \param client_data The callee's client data set through * FLAC__seekable_stream_decoder_set_client_data(). * \retval FLAC__bool * \c true if the currently at the end of the stream, else \c false. */typedef FLAC__bool (*FLAC__SeekableStreamDecoderEofCallback)(const FLAC__SeekableStreamDecoder *decoder, void *client_data);/** Signature for the write callback. * See FLAC__seekable_stream_decoder_set_write_callback() * and FLAC__StreamDecoderWriteCallback for more info. * * \param decoder The decoder instance calling the callback. * \param frame The description of the decoded frame. * \param buffer An array of pointers to decoded channels of data. * \param client_data The callee's client data set through * FLAC__seekable_stream_decoder_set_client_data(). * \retval FLAC__StreamDecoderWriteStatus * The callee's return status. */typedef FLAC__StreamDecoderWriteStatus (*FLAC__SeekableStreamDecoderWriteCallback)(const FLAC__SeekableStreamDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data);/** Signature for the metadata callback. * See FLAC__seekable_stream_decoder_set_metadata_callback() * and FLAC__StreamDecoderMetadataCallback for more info. * * \param decoder The decoder instance calling the callback. * \param metadata The decoded metadata block. * \param client_data The callee's client data set through * FLAC__seekable_stream_decoder_set_client_data(). */typedef void (*FLAC__SeekableStreamDecoderMetadataCallback)(const FLAC__SeekableStreamDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data);/** Signature for the error callback. * See FLAC__seekable_stream_decoder_set_error_callback() * and FLAC__StreamDecoderErrorCallback for more info. * * \param decoder The decoder instance calling the callback. * \param status The error encountered by the decoder. * \param client_data The callee's client data set through * FLAC__seekable_stream_decoder_set_client_data(). */typedef void (*FLAC__SeekableStreamDecoderErrorCallback)(const FLAC__SeekableStreamDecoder *decoder, FLAC__StreamDecoderErrorStatus status, void *client_data);/*********************************************************************** * * Class constructor/destructor * ***********************************************************************//** Create a new seekable stream decoder instance. The instance is created * with default settings; see the individual * FLAC__seekable_stream_decoder_set_*() functions for each setting's * default. * * \retval FLAC__SeekableStreamDecoder* * \c NULL if there was an error allocating memory, else the new instance. */FLAC_API FLAC__SeekableStreamDecoder *FLAC__seekable_stream_decoder_new();/** Free a decoder instance. Deletes the object pointed to by \a decoder. * * \param decoder A pointer to an existing decoder. * \assert * \code decoder != NULL \endcode */FLAC_API void FLAC__seekable_stream_decoder_delete(FLAC__SeekableStreamDecoder *decoder);/*********************************************************************** * * Public class method prototypes * ***********************************************************************//** Set the "MD5 signature checking" flag. If \c true, the decoder will * compute the MD5 signature of the unencoded audio data while decoding * and compare it to the signature from the STREAMINFO block, if it * exists, during FLAC__seekable_stream_decoder_finish(). * * MD5 signature checking will be turned off (until the next * FLAC__seekable_stream_decoder_reset()) if there is no signature in * the STREAMINFO block or when a seek is attempted. * * \default \c false * \param decoder A decoder instance to set. * \param value Flag value (see above). * \assert * \code decoder != NULL \endcode * \retval FLAC__bool * \c false if the decoder is already initialized, else \c true. */FLAC_API FLAC__bool FLAC__seekable_stream_decoder_set_md5_checking(FLAC__SeekableStreamDecoder *decoder, FLAC__bool value);/** Set the read callback. * This is inherited from FLAC__StreamDecoder; see * FLAC__stream_decoder_set_read_callback(). * * \note * The callback is mandatory and must be set before initialization. * * \default \c NULL * \param decoder A decoder instance to set. * \param value See above. * \assert * \code decoder != NULL \endcode * \code value != NULL \endcode * \retval FLAC__bool * \c false if the decoder is already initialized, else \c true. */FLAC_API FLAC__bool FLAC__seekable_stream_decoder_set_read_callback(FLAC__SeekableStreamDecoder *decoder, FLAC__SeekableStreamDecoderReadCallback value);/** Set the seek callback. * The supplied function will be called when the decoder needs to seek * the input stream. The decoder will pass the absolute byte offset * to seek to, 0 meaning the beginning of the stream. * * \note * The callback is mandatory and must be set before initialization. * * \default \c NULL * \param decoder A decoder instance to set. * \param value See above. * \assert * \code decoder != NULL \endcode * \code value != NULL \endcode * \retval FLAC__bool * \c false if the decoder is already initialized, else \c true. */FLAC_API FLAC__bool FLAC__seekable_stream_decoder_set_seek_callback(FLAC__SeekableStreamDecoder *decoder, FLAC__SeekableStreamDecoderSeekCallback value);/** Set the tell callback. * The supplied function will be called when the decoder wants to know * the current position of the stream. The callback should return the * byte offset from the beginning of the stream. * * \note * The callback is mandatory and must be set before initialization. * * \default \c NULL * \param decoder A decoder instance to set. * \param value See above. * \assert * \code decoder != NULL \endcode * \code value != NULL \endcode * \retval FLAC__bool * \c false if the decoder is already initialized, else \c true. */FLAC_API FLAC__bool FLAC__seekable_stream_decoder_set_tell_callback(FLAC__SeekableStreamDecoder *decoder, FLAC__SeekableStreamDecoderTellCallback value);/** Set the length callback. * The supplied function will be called when the decoder wants to know * the total length of the stream in bytes. * * \note * The callback is mandatory and must be set before initialization. * * \default \c NULL * \param decoder A decoder instance to set. * \param value See above. * \assert * \code decoder != NULL \endcode * \code value != NULL \endcode * \retval FLAC__bool * \c false if the decoder is already initialized, else \c true. */FLAC_API FLAC__bool FLAC__seekable_stream_decoder_set_length_callback(FLAC__SeekableStreamDecoder *decoder, FLAC__SeekableStreamDecoderLengthCallback value);/** Set the eof callback. * The supplied function will be called when the decoder needs to know * if the end of the stream has been reached. * * \note * The callback is mandatory and must be set before initialization. * * \default \c NULL * \param decoder A decoder instance to set. * \param value See above. * \assert * \code decoder != NULL \endcode * \code value != NULL \endcode * \retval FLAC__bool * \c false if the decoder is already initialized, else \c true. */FLAC_API FLAC__bool FLAC__seekable_stream_decoder_set_eof_callback(FLAC__SeekableStreamDecoder *decoder, FLAC__SeekableStreamDecoderEofCallback value);/** Set the write callback. * This is inherited from FLAC__StreamDecoder; see * FLAC__stream_decoder_set_write_callback(). * * \note * The callback is mandatory and must be set before initialization. * * \default \c NULL * \param decoder A decoder instance to set. * \param value See above. * \assert * \code decoder != NULL \endcode * \code value != NULL \endcode * \retval FLAC__bool * \c false if the decoder is already initialized, else \c true. */FLAC_API FLAC__bool FLAC__seekable_stream_decoder_set_write_callback(FLAC__SeekableStreamDecoder *decoder, FLAC__SeekableStreamDecoderWriteCallback value);/** Set the metadata callback. * This is inherited from FLAC__StreamDecoder; see * FLAC__stream_decoder_set_metadata_callback(). * * \note * The callback is mandatory and must be set before initialization. * * \default \c NULL * \param decoder A decoder instance to set. * \param value See above. * \assert * \code decoder != NULL \endcode * \code value != NULL \endcode * \retval FLAC__bool * \c false if the decoder is already initialized, else \c true. */FLAC_API FLAC__bool FLAC__seekable_stream_decoder_set_metadata_callback(FLAC__SeekableStreamDecoder *decoder, FLAC__SeekableStreamDecoderMetadataCallback value);/** Set the error callback. * This is inherited from FLAC__StreamDecoder; see * FLAC__stream_decoder_set_error_callback(). * * \note * The callback is mandatory and must be set before initialization. * * \default \c NULL * \param decoder A decoder instance to set. * \param value See above. * \assert * \code decoder != NULL \endcode * \code value != NULL \endcode * \retval FLAC__bool * \c false if the decoder is already initialized, else \c true. */FLAC_API FLAC__bool FLAC__seekable_stream_decoder_set_error_callback(FLAC__SeekableStreamDecoder *decoder, FLAC__SeekableStreamDecoderErrorCallback value);/** Set the client data to be passed back to callbacks. * This value will be supplied to callbacks in their \a client_data * argument. * * \default \c NULL * \param decoder A decoder instance to set. * \param value See above. * \assert * \code decoder != NULL \endcode * \retval FLAC__bool * \c false if the decoder is already initialized, else \c true. */FLAC_API FLAC__bool FLAC__seekable_stream_decoder_set_client_data(FLAC__SeekableStreamDecoder *decoder, void *value);/** This is inherited from FLAC__StreamDecoder; see * FLAC__stream_decoder_set_metadata_respond(). * * \default By default, only the \c STREAMINFO block is returned via the * metadata callback. * \param decoder A decoder instance to set. * \param type See above. * \assert * \code decoder != NULL \endcode * \a type is valid * \retval FLAC__bool * \c false if the decoder is already initialized, else \c true. */FLAC_API FLAC__bool FLAC__seekable_stream_decoder_set_metadata_respond(FLAC__SeekableStreamDecoder *decoder, FLAC__MetadataType type);/** This is inherited from FLAC__StreamDecoder; see * FLAC__stream_decoder_set_metadata_respond_application(). * * \default By default, only the \c STREAMINFO block is returned via the * metadata callback. * \param decoder A decoder instance to set. * \param id See above. * \assert * \code decoder != NULL \endcode * \code id != NULL \endcode * \retval FLAC__bool * \c false if the decoder is already initialized, else \c true. */FLAC_API FLAC__bool FLAC__seekable_stream_decoder_set_metadata_respond_application(FLAC__SeekableStreamDecoder *decoder, const FLAC__byte id[4]);/** This is inherited from FLAC__StreamDecoder; see * FLAC__stream_decoder_set_metadata_respond_all().
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -