📄 file_encoder.h
字号:
* \param value See above. * \assert * \code encoder != NULL \endcode * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */OggFLAC_API FLAC__bool OggFLAC__file_encoder_set_blocksize(OggFLAC__FileEncoder *encoder, unsigned value);/** This is inherited from OggFLAC__SeekableStreamEncoder; see * OggFLAC__seekable_stream_encoder_set_max_lpc_order(). * * \default \c 0 * \param encoder An encoder instance to set. * \param value See above. * \assert * \code encoder != NULL \endcode * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */OggFLAC_API FLAC__bool OggFLAC__file_encoder_set_max_lpc_order(OggFLAC__FileEncoder *encoder, unsigned value);/** This is inherited from OggFLAC__SeekableStreamEncoder; see * OggFLAC__seekable_stream_encoder_set_qlp_coeff_precision(). * * \note * In the current implementation, qlp_coeff_precision + bits_per_sample must * be less than 32. * * \default \c 0 * \param encoder An encoder instance to set. * \param value See above. * \assert * \code encoder != NULL \endcode * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */OggFLAC_API FLAC__bool OggFLAC__file_encoder_set_qlp_coeff_precision(OggFLAC__FileEncoder *encoder, unsigned value);/** This is inherited from OggFLAC__SeekableStreamEncoder; see * OggFLAC__seekable_stream_encoder_set_do_qlp_coeff_prec_search(). * * \default \c false * \param encoder An encoder instance to set. * \param value See above. * \assert * \code encoder != NULL \endcode * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */OggFLAC_API FLAC__bool OggFLAC__file_encoder_set_do_qlp_coeff_prec_search(OggFLAC__FileEncoder *encoder, FLAC__bool value);/** This is inherited from OggFLAC__SeekableStreamEncoder; see * OggFLAC__seekable_stream_encoder_set_do_escape_coding(). * * \default \c false * \param encoder An encoder instance to set. * \param value See above. * \assert * \code encoder != NULL \endcode * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */OggFLAC_API FLAC__bool OggFLAC__file_encoder_set_do_escape_coding(OggFLAC__FileEncoder *encoder, FLAC__bool value);/** This is inherited from OggFLAC__SeekableStreamEncoder; see * OggFLAC__seekable_stream_encoder_set_do_exhaustive_model_search(). * * \default \c false * \param encoder An encoder instance to set. * \param value See above. * \assert * \code encoder != NULL \endcode * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */OggFLAC_API FLAC__bool OggFLAC__file_encoder_set_do_exhaustive_model_search(OggFLAC__FileEncoder *encoder, FLAC__bool value);/** This is inherited from OggFLAC__SeekableStreamEncoder; see * OggFLAC__seekable_stream_encoder_set_min_residual_partition_order(). * * \default \c 0 * \param encoder An encoder instance to set. * \param value See above. * \assert * \code encoder != NULL \endcode * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */OggFLAC_API FLAC__bool OggFLAC__file_encoder_set_min_residual_partition_order(OggFLAC__FileEncoder *encoder, unsigned value);/** This is inherited from OggFLAC__SeekableStreamEncoder; see * OggFLAC__seekable_stream_encoder_set_max_residual_partition_order(). * * \default \c 0 * \param encoder An encoder instance to set. * \param value See above. * \assert * \code encoder != NULL \endcode * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */OggFLAC_API FLAC__bool OggFLAC__file_encoder_set_max_residual_partition_order(OggFLAC__FileEncoder *encoder, unsigned value);/** This is inherited from OggFLAC__SeekableStreamEncoder; see * OggFLAC__seekable_stream_encoder_set_rice_parameter_search_dist(). * * \default \c 0 * \param encoder An encoder instance to set. * \param value See above. * \assert * \code encoder != NULL \endcode * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */OggFLAC_API FLAC__bool OggFLAC__file_encoder_set_rice_parameter_search_dist(OggFLAC__FileEncoder *encoder, unsigned value);/** This is inherited from OggFLAC__SeekableStreamEncoder; see * OggFLAC__seekable_stream_encoder_set_total_samples_estimate(). * * \default \c 0 * \param encoder An encoder instance to set. * \param value See above. * \assert * \code encoder != NULL \endcode * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */OggFLAC_API FLAC__bool OggFLAC__file_encoder_set_total_samples_estimate(OggFLAC__FileEncoder *encoder, FLAC__uint64 value);/** This is inherited from OggFLAC__SeekableStreamEncoder; see * OggFLAC__seekable_stream_encoder_set_metadata(). * * \note The Ogg FLAC mapping requires that the VORBIS_COMMENT block be * the second metadata block of the stream. The encoder already supplies * the STREAMINFO block automatically. If \a metadata does not contain a * VORBIS_COMMENT block, the encoder will supply that too. Otherwise, if * \a metadata does contain a VORBIS_COMMENT block and it is not the * first, this function will reorder \a metadata by moving the * VORBIS_COMMENT block to the front; the relative ordering of the other * blocks will remain as they were. * * \note The Ogg FLAC mapping limits the number of metadata blocks per * stream to \c 65535. If \a num_blocks exceeds this the function will * return \c false. * * \default \c NULL, 0 * \param encoder An encoder instance to set. * \param metadata See above. * \param num_blocks See above. * \assert * \code encoder != NULL \endcode * \retval FLAC__bool * \c false if the encoder is already initialized, or if * \a num_blocks > 65535, else \c true. */OggFLAC_API FLAC__bool OggFLAC__file_encoder_set_metadata(OggFLAC__FileEncoder *encoder, FLAC__StreamMetadata **metadata, unsigned num_blocks);/** Set the output file name encode to. * * \note * The filename is mandatory and must be set before initialization. * * \note * Unlike the OggFLAC__FileDecoder, the filename does not interpret "-" for * \c stdout; writing to \c stdout is not relevant in the file encoder. * * \default \c NULL * \param encoder A encoder instance to set. * \param value The output file name. * \assert * \code encoder != NULL \endcode * \code value != NULL \endcode * \retval FLAC__bool * \c false if the encoder is already initialized, or there was a memory * allocation error, else \c true. */OggFLAC_API FLAC__bool OggFLAC__file_encoder_set_filename(OggFLAC__FileEncoder *encoder, const char *value);/** Set the progress callback. * The supplied function will be called when the encoder has finished * writing a frame. The \c total_frames_estimate argument to the callback * will be based on the value from * OggFLAC__file_encoder_set_total_samples_estimate(). * * \note * Unlike most other callbacks, the progress callback is \b not mandatory * and need not be set before initialization. * * \default \c NULL * \param encoder An encoder instance to set. * \param value See above. * \assert * \code encoder != NULL \endcode * \code value != NULL \endcode * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */OggFLAC_API FLAC__bool OggFLAC__file_encoder_set_progress_callback(OggFLAC__FileEncoder *encoder, OggFLAC__FileEncoderProgressCallback 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 encoder An encoder instance to set. * \param value See above. * \assert * \code encoder != NULL \endcode * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */OggFLAC_API FLAC__bool OggFLAC__file_encoder_set_client_data(OggFLAC__FileEncoder *encoder, void *value);/** Get the current encoder state. * * \param encoder An encoder instance to query. * \assert * \code encoder != NULL \endcode * \retval FLAC__FileEncoderState * The current encoder state. */OggFLAC_API OggFLAC__FileEncoderState OggFLAC__file_encoder_get_state(const OggFLAC__FileEncoder *encoder);/** Get the state of the underlying seekable stream encoder. * Useful when the file encoder state is * \c OggFLAC__FILE_ENCODER_SEEKABLE_STREAM_ENCODER_ERROR. * * \param encoder An encoder instance to query. * \assert * \code encoder != NULL \endcode * \retval OggFLAC__SeekableStreamEncoderState * The seekable stream encoder state. */OggFLAC_API OggFLAC__SeekableStreamEncoderState OggFLAC__file_encoder_get_seekable_stream_encoder_state(const OggFLAC__FileEncoder *encoder);/** Get the state of the underlying FLAC stream encoder. * Useful when the file encoder state is * \c OggFLAC__FILE_ENCODER_SEEKABLE_STREAM_ENCODER_ERROR * and the seekable stream encoder state is * \c OggFLAC__SEEKABLE_STREAM_ENCODER_FLAC_STREAM_ENCODER_ERROR. * * \param encoder An encoder instance to query. * \assert * \code encoder != NULL \endcode * \retval FLAC__StreamEncoderState * The seekable stream encoder state. */OggFLAC_API FLAC__StreamEncoderState OggFLAC__file_encoder_get_FLAC_stream_encoder_state(const OggFLAC__FileEncoder *encoder);/** Get the state of the underlying stream encoder's verify decoder. * Useful when the file encoder state is * \c OggFLAC__FILE_ENCODER_SEEKABLE_STREAM_ENCODER_ERROR * and the seekable stream encoder state is * \c OggFLAC__SEEKABLE_STREAM_ENCODER_FLAC_STREAM_ENCODER_ERROR * and the FLAC stream encoder state is * \c FLAC__STREAM_ENCODER_VERIFY_DECODER_ERROR. * * \param encoder An encoder instance to query. * \assert * \code encoder != NULL \endcode * \retval FLAC__StreamDecoderState * The stream encoder state. */OggFLAC_API FLAC__StreamDecoderState OggFLAC__file_encoder_get_verify_decoder_state(const OggFLAC__FileEncoder *encoder);/** Get the current encoder state as a C string. * This version automatically resolves * \c OggFLAC__FILE_ENCODER_SEEKABLE_STREAM_ENCODER_ERROR by getting the * seekable stream encoder's state. * * \param encoder A encoder instance to query. * \assert * \code encoder != NULL \endcode * \retval const char * * The encoder state as a C string. Do not modify the contents. */OggFLAC_API const char *OggFLAC__file_encoder_get_resolved_state_string(const OggFLAC__FileEncoder *encoder);/** Get relevant values about the nature of a verify decoder error. * Inherited from OggFLAC__seekable_stream_encoder_get_verify_decoder_error_stats(). * Useful when the file encoder state is * \c OggFLAC__FILE_ENCODER_SEEKABLE_STREAM_ENCODER_ERROR * and the seekable stream encoder state is * \c OggFLAC__SEEKABLE_STREAM_ENCODER_FLAC_SEEKABLE_STREAM_ENCODER_ERROR * and the FLAC seekable stream encoder state is * \c FLAC__SEEKABLE_STREAM_ENCODER_STREAM_ENCODER_ERROR * and the FLAC stream encoder state is * \c FLAC__STREAM_ENCODER_VERIFY_DECODER_ERROR. * * \param encoder An encoder instance to query. * \param absolute_sample The absolute sample number of the mismatch. * \param frame_number The number of the frame in which the mismatch occurred.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -