• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/ap/gpl/minidlna/flac-1.2.1/include/FLAC/

Lines Matching refs:encoder

49  *  encoder.
52 * \link flac_stream_encoder stream encoder \endlink module.
55 /** \defgroup flac_encoder FLAC/ \*_encoder.h: encoder interfaces
59 * This module describes the encoder layers provided by libFLAC.
61 * The stream encoder can be used to encode complete streams either to the
65 * If the client also supplies a seek callback, the encoder will also
71 * \link flac_stream_encoder stream encoder \endlink module.
74 /** \defgroup flac_stream_encoder FLAC/stream_encoder.h: stream encoder interface
79 * encoder.
81 * The stream encoder can encode to native FLAC, and optionally Ogg FLAC
84 * The basic usage of this encoder is as follows:
85 * - The program creates an instance of an encoder using
111 * subsequently calls the callbacks when there is encoder data ready
114 * which causes the encoder to encode any data still in its input pipe,
116 * seeking is possible, and finally reset the encoder to the
121 * In more detail, the stream encoder functions similarly to the
128 * Unlike the decoders, the stream encoder has many options that can
142 * setting up the encoder to encode FLAC data to the client via
149 * encoder to go back after encoding is finished to write back
155 * filename or open \c FILE*; the encoder will handle all the callbacks
170 * encoder in one of two ways:
174 * the encoder, each of the same length. The samples need not be
190 * FLAC__stream_encoder_finish(), which causes the encoder to encode any
198 * the encoder to write a PADDING block of the correct size, so that
212 * after the first encoding pass, the encoder will try to seek back to the
218 * The "set" functions may only be called when the encoder is in the
234 * The encoder's state can be obtained by calling FLAC__stream_encoder_get_state().
236 * If the encoder gets into any other state besides \c FLAC__STREAM_ENCODER_OK
243 /**< The encoder is in the normal OK state and samples can be processed. */
246 /**< The encoder is in the uninitialized state; one of the
298 /**< General failure to set up encoder; call FLAC__stream_encoder_get_state() for cause. */
309 /**< The encoder has an invalid setting for number of channels. */
312 /**< The encoder has an invalid setting for bits-per-sample.
313 * FLAC supports 4-32 bps but the reference encoder currently supports
318 /**< The encoder has an invalid setting for the input sample rate. */
321 /**< The encoder has an invalid setting for the block size. */
324 /**< The encoder has an invalid setting for the maximum LPC order. */
327 /**< The encoder has an invalid setting for the precision of the quantized linear predictor coefficients. */
333 /**< The encoder is bound to the <A HREF="../format.html#subset">Subset</A> but other settings violate it. */
336 /**< The metadata input to the encoder is invalid, in one of the following ways:
345 /**< FLAC__stream_encoder_init_*() was called when the encoder was
394 /**< An unrecoverable error occurred. The encoder will return from the process call. */
460 /** The opaque structure definition for the stream encoder type.
461 * See the \link flac_stream_encoder stream encoder module \endlink
473 * The supplied function will be called when the encoder needs to read back
474 * encoded data. This happens during the metadata callback, when the encoder
484 * FLAC__StreamEncoderReadStatus read_cb(const FLAC__StreamEncoder *encoder, FLAC__byte buffer[], size_t *bytes, void *client_data)
502 * state should not be called on the \a encoder while in the callback.
504 * \param encoder The encoder instance calling the callback.
518 typedef FLAC__StreamEncoderReadStatus (*FLAC__StreamEncoderReadCallback)(const FLAC__StreamEncoder *encoder, FLAC__byte buffer[], size_t *bytes, void *client_data);
524 * by the encoder anytime there is raw encoded data ready to write. It may
543 * state should not be called on the \a encoder while in the callback.
545 * \param encoder The encoder instance calling the callback.
556 typedef FLAC__StreamEncoderWriteStatus (*FLAC__StreamEncoderWriteCallback)(const FLAC__StreamEncoder *encoder, const FLAC__byte buffer[], size_t bytes, unsigned samples, unsigned current_frame, void *client_data);
562 * when the encoder needs to seek the output stream. The encoder will pass
567 * FLAC__StreamEncoderSeekStatus seek_cb(const FLAC__StreamEncoder *encoder, FLAC__uint64 absolute_byte_offset, void *client_data)
580 * state should not be called on the \a encoder while in the callback.
582 * \param encoder The encoder instance calling the callback.
590 typedef FLAC__StreamEncoderSeekStatus (*FLAC__StreamEncoderSeekCallback)(const FLAC__StreamEncoder *encoder, FLAC__uint64 absolute_byte_offset, void *client_data);
596 * when the encoder needs to know the current position of the output stream.
600 * which the encoder is writing. If you are buffering the output, make
604 * can use lseek(fd, SEEK_CUR, 0). The encoder may later seek back to
609 * FLAC__StreamEncoderTellStatus tell_cb(const FLAC__StreamEncoder *encoder, FLAC__uint64 *absolute_byte_offset, void *client_data)
625 * state should not be called on the \a encoder while in the callback.
627 * \param encoder The encoder instance calling the callback.
635 typedef FLAC__StreamEncoderTellStatus (*FLAC__StreamEncoderTellCallback)(const FLAC__StreamEncoder *encoder, FLAC__uint64 *absolute_byte_offset, void *client_data);
647 * state should not be called on the \a encoder while in the callback.
649 * \param encoder The encoder instance calling the callback.
654 typedef void (*FLAC__StreamEncoderMetadataCallback)(const FLAC__StreamEncoder *encoder, const FLAC__StreamMetadata *metadata, void *client_data);
660 * The supplied function will be called when the encoder has finished
666 * state should not be called on the \a encoder while in the callback.
668 * \param encoder The encoder instance calling the callback.
677 typedef void (*FLAC__StreamEncoderProgressCallback)(const FLAC__StreamEncoder *encoder, FLAC__uint64 bytes_written, FLAC__uint64 samples_written, unsigned frames_written, unsigned total_frames_estimate, void *client_data);
686 /** Create a new stream encoder instance. The instance is created with
695 /** Free an encoder instance. Deletes the object pointed to by \a encoder.
697 * \param encoder A pointer to an existing encoder.
699 * \code encoder != NULL \endcode
701 FLAC_API void FLAC__stream_encoder_delete(FLAC__StreamEncoder *encoder);
720 * \param encoder An encoder instance to set.
723 * \code encoder != NULL \endcode
725 * \c false if the encoder is already initialized, else \c true.
727 FLAC_API FLAC__bool FLAC__stream_encoder_set_ogg_serial_number(FLAC__StreamEncoder *encoder, long serial_number);
729 /** Set the "verify" flag. If \c true, the encoder will verify it's own
736 * \param encoder An encoder instance to set.
739 * \code encoder != NULL \endcode
741 * \c false if the encoder is already initialized, else \c true.
743 FLAC_API FLAC__bool FLAC__stream_encoder_set_verify(FLAC__StreamEncoder *encoder, FLAC__bool value);
746 * the encoder will comply with the Subset and will check the
754 * \param encoder An encoder instance to set.
757 * \code encoder != NULL \endcode
759 * \c false if the encoder is already initialized, else \c true.
761 FLAC_API FLAC__bool FLAC__stream_encoder_set_streamable_subset(FLAC__StreamEncoder *encoder, FLAC__bool value);
766 * \param encoder An encoder instance to set.
769 * \code encoder != NULL \endcode
771 * \c false if the encoder is already initialized, else \c true.
773 FLAC_API FLAC__bool FLAC__stream_encoder_set_channels(FLAC__StreamEncoder *encoder, unsigned value);
778 * Do not feed the encoder data that is wider than the value you
782 * \param encoder An encoder instance to set.
785 * \code encoder != NULL \endcode
787 * \c false if the encoder is already initialized, else \c true.
789 FLAC_API FLAC__bool FLAC__stream_encoder_set_bits_per_sample(FLAC__StreamEncoder *encoder, unsigned value);
794 * \param encoder An encoder instance to set.
797 * \code encoder != NULL \endcode
799 * \c false if the encoder is already initialized, else \c true.
801 FLAC_API FLAC__bool FLAC__stream_encoder_set_sample_rate(FLAC__StreamEncoder *encoder, unsigned value);
806 * the encoder expends to compress the file. A higher level usually
857 * \param encoder An encoder instance to set.
860 * \code encoder != NULL \endcode
862 * \c false if the encoder is already initialized, else \c true.
864 FLAC_API FLAC__bool FLAC__stream_encoder_set_compression_level(FLAC__StreamEncoder *encoder, unsigned value);
868 * The number of samples to use per frame. Use \c 0 to let the encoder
872 * \param encoder An encoder instance to set.
875 * \code encoder != NULL \endcode
877 * \c false if the encoder is already initialized, else \c true.
879 FLAC_API FLAC__bool FLAC__stream_encoder_set_blocksize(FLAC__StreamEncoder *encoder, unsigned value);
886 * \param encoder An encoder instance to set.
889 * \code encoder != NULL \endcode
891 * \c false if the encoder is already initialized, else \c true.
893 FLAC_API FLAC__bool FLAC__stream_encoder_set_do_mid_side_stereo(FLAC__StreamEncoder *encoder, FLAC__bool value);
902 * \param encoder An encoder instance to set.
905 * \code encoder != NULL \endcode
907 * \c false if the encoder is already initialized, else \c true.
909 FLAC_API FLAC__bool FLAC__stream_encoder_set_loose_mid_side_stereo(FLAC__StreamEncoder *encoder, FLAC__bool value);
911 /** Sets the apodization function(s) the encoder will use when windowing
936 * is empty the encoder defaults to \c "tukey(0.5)".
939 * encoder will try each of them separately and choose the window that
942 * Note that each function specified causes the encoder to occupy a
946 * \param encoder An encoder instance to set.
949 * \code encoder != NULL \endcode
952 * \c false if the encoder is already initialized, else \c true.
954 FLAC_API FLAC__bool FLAC__stream_encoder_set_apodization(FLAC__StreamEncoder *encoder, const char *specification);
959 * \param encoder An encoder instance to set.
962 * \code encoder != NULL \endcode
964 * \c false if the encoder is already initialized, else \c true.
966 FLAC_API FLAC__bool FLAC__stream_encoder_set_max_lpc_order(FLAC__StreamEncoder *encoder, unsigned value);
969 * coefficients, or \c 0 to let the encoder select it based on the
977 * \param encoder An encoder instance to set.
980 * \code encoder != NULL \endcode
982 * \c false if the encoder is already initialized, else \c true.
984 FLAC_API FLAC__bool FLAC__stream_encoder_set_qlp_coeff_precision(FLAC__StreamEncoder *encoder, unsigned value);
991 * \param encoder An encoder instance to set.
994 * \code encoder != NULL \endcode
996 * \c false if the encoder is already initialized, else \c true.
998 FLAC_API FLAC__bool FLAC__stream_encoder_set_do_qlp_coeff_prec_search(FLAC__StreamEncoder *encoder, FLAC__bool value);
1003 * \param encoder An encoder instance to set.
1006 * \code encoder != NULL \endcode
1008 * \c false if the encoder is already initialized, else \c true.
1010 FLAC_API FLAC__bool FLAC__stream_encoder_set_do_escape_coding(FLAC__StreamEncoder *encoder, FLAC__bool value);
1012 /** Set to \c false to let the encoder estimate the best model order
1014 * encoder to evaluate all order models and select the best.
1017 * \param encoder An encoder instance to set.
1020 * \code encoder != NULL \endcode
1022 * \c false if the encoder is already initialized, else \c true.
1024 FLAC_API FLAC__bool FLAC__stream_encoder_set_do_exhaustive_model_search(FLAC__StreamEncoder *encoder, FLAC__bool value);
1035 * Otherwise, set a min and max order, and the encoder will search
1040 * \param encoder An encoder instance to set.
1043 * \code encoder != NULL \endcode
1045 * \c false if the encoder is already initialized, else \c true.
1047 FLAC_API FLAC__bool FLAC__stream_encoder_set_min_residual_partition_order(FLAC__StreamEncoder *encoder, unsigned value);
1058 * Otherwise, set a min and max order, and the encoder will search
1063 * \param encoder An encoder instance to set.
1066 * \code encoder != NULL \endcode
1068 * \c false if the encoder is already initialized, else \c true.
1070 FLAC_API FLAC__bool FLAC__stream_encoder_set_max_residual_partition_order(FLAC__StreamEncoder *encoder, unsigned value);
1075 * \param encoder An encoder instance to set.
1078 * \code encoder != NULL \endcode
1080 * \c false if the encoder is already initialized, else \c true.
1082 FLAC_API FLAC__bool FLAC__stream_encoder_set_rice_parameter_search_dist(FLAC__StreamEncoder *encoder, unsigned value);
1091 * \param encoder An encoder instance to set.
1094 * \code encoder != NULL \endcode
1096 * \c false if the encoder is already initialized, else \c true.
1098 FLAC_API FLAC__bool FLAC__stream_encoder_set_total_samples_estimate(FLAC__StreamEncoder *encoder, FLAC__uint64 value);
1103 * the encoder may need to change the \a is_last flag inside them, and
1104 * in some cases update seek point offsets. Otherwise, the encoder will
1109 * The encoder stores only copies of the pointers in the \a metadata array;
1118 * By default the encoder does not create a SEEKTABLE. If one is supplied
1135 * then while it is encoding the encoder will fill the stream offsets in
1144 * The encoder instance \b will modify the first \c SEEKTABLE block
1158 * the second metadata block of the stream. The encoder already supplies
1160 * VORBIS_COMMENT block, the encoder will supply that too. Otherwise, if
1171 * \param encoder An encoder instance to set.
1175 * \code encoder != NULL \endcode
1177 * \c false if the encoder is already initialized, else \c true.
1178 * \c false if the encoder is already initialized, or if
1181 FLAC_API FLAC__bool FLAC__stream_encoder_set_metadata(FLAC__StreamEncoder *encoder, FLAC__StreamMetadata **metadata, unsigned num_blocks);
1183 /** Get the current encoder state.
1185 * \param encoder An encoder instance to query.
1187 * \code encoder != NULL \endcode
1189 * The current encoder state.
1191 FLAC_API FLAC__StreamEncoderState FLAC__stream_encoder_get_state(const FLAC__StreamEncoder *encoder);
1194 * Useful when the stream encoder state is
1197 * \param encoder An encoder instance to query.
1199 * \code encoder != NULL \endcode
1203 FLAC_API FLAC__StreamDecoderState FLAC__stream_encoder_get_verify_decoder_state(const FLAC__StreamEncoder *encoder);
1205 /** Get the current encoder state as a C string.
1210 * \param encoder A encoder instance to query.
1212 * \code encoder != NULL \endcode
1214 * The encoder state as a C string. Do not modify the contents.
1216 FLAC_API const char *FLAC__stream_encoder_get_resolved_state_string(const FLAC__StreamEncoder *encoder);
1219 * Useful when the stream encoder state is
1224 * \param encoder An encoder instance to query.
1233 * \code encoder != NULL \endcode
1235 FLAC_API void FLAC__stream_encoder_get_verify_decoder_error_stats(const FLAC__StreamEncoder *encoder, FLAC__uint64 *absolute_sample, unsigned *frame_number, unsigned *channel, unsigned *sample, FLAC__int32 *expected, FLAC__int32 *got);
1239 * \param encoder An encoder instance to query.
1241 * \code encoder != NULL \endcode
1245 FLAC_API FLAC__bool FLAC__stream_encoder_get_verify(const FLAC__StreamEncoder *encoder);
1249 * \param encoder An encoder instance to query.
1251 * \code encoder != NULL \endcode
1255 FLAC_API FLAC__bool FLAC__stream_encoder_get_streamable_subset(const FLAC__StreamEncoder *encoder);
1259 * \param encoder An encoder instance to query.
1261 * \code encoder != NULL \endcode
1265 FLAC_API unsigned FLAC__stream_encoder_get_channels(const FLAC__StreamEncoder *encoder);
1269 * \param encoder An encoder instance to query.
1271 * \code encoder != NULL \endcode
1275 FLAC_API unsigned FLAC__stream_encoder_get_bits_per_sample(const FLAC__StreamEncoder *encoder);
1279 * \param encoder An encoder instance to query.
1281 * \code encoder != NULL \endcode
1285 FLAC_API unsigned FLAC__stream_encoder_get_sample_rate(const FLAC__StreamEncoder *encoder);
1289 * \param encoder An encoder instance to query.
1291 * \code encoder != NULL \endcode
1295 FLAC_API unsigned FLAC__stream_encoder_get_blocksize(const FLAC__StreamEncoder *encoder);
1299 * \param encoder An encoder instance to query.
1301 * \code encoder != NULL \endcode
1305 FLAC_API FLAC__bool FLAC__stream_encoder_get_do_mid_side_stereo(const FLAC__StreamEncoder *encoder);
1309 * \param encoder An encoder instance to query.
1311 * \code encoder != NULL \endcode
1315 FLAC_API FLAC__bool FLAC__stream_encoder_get_loose_mid_side_stereo(const FLAC__StreamEncoder *encoder);
1319 * \param encoder An encoder instance to query.
1321 * \code encoder != NULL \endcode
1325 FLAC_API unsigned FLAC__stream_encoder_get_max_lpc_order(const FLAC__StreamEncoder *encoder);
1329 * \param encoder An encoder instance to query.
1331 * \code encoder != NULL \endcode
1335 FLAC_API unsigned FLAC__stream_encoder_get_qlp_coeff_precision(const FLAC__StreamEncoder *encoder);
1339 * \param encoder An encoder instance to query.
1341 * \code encoder != NULL \endcode
1345 FLAC_API FLAC__bool FLAC__stream_encoder_get_do_qlp_coeff_prec_search(const FLAC__StreamEncoder *encoder);
1349 * \param encoder An encoder instance to query.
1351 * \code encoder != NULL \endcode
1355 FLAC_API FLAC__bool FLAC__stream_encoder_get_do_escape_coding(const FLAC__StreamEncoder *encoder);
1359 * \param encoder An encoder instance to query.
1361 * \code encoder != NULL \endcode
1365 FLAC_API FLAC__bool FLAC__stream_encoder_get_do_exhaustive_model_search(const FLAC__StreamEncoder *encoder);
1369 * \param encoder An encoder instance to query.
1371 * \code encoder != NULL \endcode
1375 FLAC_API unsigned FLAC__stream_encoder_get_min_residual_partition_order(const FLAC__StreamEncoder *encoder);
1379 * \param encoder An encoder instance to query.
1381 * \code encoder != NULL \endcode
1385 FLAC_API unsigned FLAC__stream_encoder_get_max_residual_partition_order(const FLAC__StreamEncoder *encoder);
1389 * \param encoder An encoder instance to query.
1391 * \code encoder != NULL \endcode
1395 FLAC_API unsigned FLAC__stream_encoder_get_rice_parameter_search_dist(const FLAC__StreamEncoder *encoder);
1398 * The encoder merely mimics back the value given to
1402 * \param encoder An encoder instance to set.
1404 * \code encoder != NULL \endcode
1408 FLAC_API FLAC__uint64 FLAC__stream_encoder_get_total_samples_estimate(const FLAC__StreamEncoder *encoder);
1410 /** Initialize the encoder instance to encode native FLAC streams.
1412 * This flavor of initialization sets up the encoder to encode to a
1427 * \param encoder An uninitialized encoder instance.
1432 * supported. The encoder uses seeking to go back
1441 * less efficient for the encoder.
1451 * less efficient for the encoder.
1455 * this function is not necessary as the encoder
1466 * \code encoder != NULL \endcode
1471 FLAC_API FLAC__StreamEncoderInitStatus FLAC__stream_encoder_init_stream(FLAC__StreamEncoder *encoder, FLAC__StreamEncoderWriteCallback write_callback, FLAC__StreamEncoderSeekCallback seek_callback, FLAC__StreamEncoderTellCallback tell_callback, FLAC__StreamEncoderMetadataCallback metadata_callback, void *client_data);
1473 /** Initialize the encoder instance to encode Ogg FLAC streams.
1475 * This flavor of initialization sets up the encoder to encode to a FLAC
1490 * \param encoder An uninitialized encoder instance.
1500 * supported. The encoder uses seeking to go back
1509 * less efficient for the encoder.
1519 * less efficient for the encoder.
1523 * this function is not necessary as the encoder
1534 * \code encoder != NULL \endcode
1539 FLAC_API FLAC__StreamEncoderInitStatus FLAC__stream_encoder_init_ogg_stream(FLAC__StreamEncoder *encoder, FLAC__StreamEncoderReadCallback read_callback, FLAC__StreamEncoderWriteCallback write_callback, FLAC__StreamEncoderSeekCallback seek_callback, FLAC__StreamEncoderTellCallback tell_callback, FLAC__StreamEncoderMetadataCallback metadata_callback, void *client_data);
1541 /** Initialize the encoder instance to encode native FLAC files.
1543 * This flavor of initialization sets up the encoder to encode to a
1552 * \param encoder An uninitialized encoder instance.
1555 * becomes owned by the encoder and should not be
1568 * \code encoder != NULL \endcode
1574 FLAC_API FLAC__StreamEncoderInitStatus FLAC__stream_encoder_init_FILE(FLAC__StreamEncoder *encoder, FILE *file, FLAC__StreamEncoderProgressCallback progress_callback, void *client_data);
1576 /** Initialize the encoder instance to encode Ogg FLAC files.
1578 * This flavor of initialization sets up the encoder to encode to a
1587 * \param encoder An uninitialized encoder instance.
1590 * becomes owned by the encoder and should not be
1603 * \code encoder != NULL \endcode
1609 FLAC_API FLAC__StreamEncoderInitStatus FLAC__stream_encoder_init_ogg_FILE(FLAC__StreamEncoder *encoder, FILE *file, FLAC__StreamEncoderProgressCallback progress_callback, void *client_data);
1611 /** Initialize the encoder instance to encode native FLAC files.
1613 * This flavor of initialization sets up the encoder to encode to a plain
1624 * \param encoder An uninitialized encoder instance.
1636 * \code encoder != NULL \endcode
1641 FLAC_API FLAC__StreamEncoderInitStatus FLAC__stream_encoder_init_file(FLAC__StreamEncoder *encoder, const char *filename, FLAC__StreamEncoderProgressCallback progress_callback, void *client_data);
1643 /** Initialize the encoder instance to encode Ogg FLAC files.
1645 * This flavor of initialization sets up the encoder to encode to a plain
1656 * \param encoder An uninitialized encoder instance.
1668 * \code encoder != NULL \endcode
1673 FLAC_API FLAC__StreamEncoderInitStatus FLAC__stream_encoder_init_ogg_file(FLAC__StreamEncoder *encoder, const char *filename, FLAC__StreamEncoderProgressCallback progress_callback, void *client_data);
1676 * Flushes the encoding buffer, releases resources, resets the encoder
1677 * settings to their defaults, and returns the encoder state to
1691 * \param encoder An uninitialized encoder instance.
1693 * \code encoder != NULL \endcode
1701 FLAC_API FLAC__bool FLAC__stream_encoder_finish(FLAC__StreamEncoder *encoder);
1717 * \param encoder An initialized encoder instance in the OK state.
1721 * \code encoder != NULL \endcode
1722 * \code FLAC__stream_encoder_get_state(encoder) == FLAC__STREAM_ENCODER_OK \endcode
1725 * encoder state with FLAC__stream_encoder_get_state() to see what
1728 FLAC_API FLAC__bool FLAC__stream_encoder_process(FLAC__StreamEncoder *encoder, const FLAC__int32 * const buffer[], unsigned samples);
1746 * \param encoder An initialized encoder instance in the OK state.
1753 * \code encoder != NULL \endcode
1754 * \code FLAC__stream_encoder_get_state(encoder) == FLAC__STREAM_ENCODER_OK \endcode
1757 * encoder state with FLAC__stream_encoder_get_state() to see what
1760 FLAC_API FLAC__bool FLAC__stream_encoder_process_interleaved(FLAC__StreamEncoder *encoder, const FLAC__int32 buffer[], unsigned samples);