Lines Matching full:decoder

49  *  decoder.
52 * \link flac_stream_decoder stream decoder \endlink module.
55 /** \defgroup flac_decoder FLAC/ \*_decoder.h: decoder interfaces
59 * This module describes the decoder layers provided by libFLAC.
61 * The stream decoder can be used to decode complete streams either from
66 * callback, the decoder function for sample-accurate seeking within the
70 * info see the \link flac_stream_decoder stream decoder \endlink module.
73 /** \defgroup flac_stream_decoder FLAC/stream_decoder.h: stream decoder interface
78 * decoder.
80 * The stream decoder can decode native FLAC, and optionally Ogg FLAC
83 * The basic usage of this decoder is as follows:
84 * - The program creates an instance of a decoder using
97 * which flushes the input and output and resets the decoder to the
104 * functions to override the default decoder options, and call
108 * setting up the decoder to decode FLAC data from the client via
117 * \c FILE* or filename and fewer callbacks; the decoder will handle
124 * Once the decoder is initialized, your program will call one of several
127 * - FLAC__stream_decoder_process_single() - Tells the decoder to process at
129 * metadata callback or write callback, respectively, once. If the decoder
131 * - FLAC__stream_decoder_process_until_end_of_metadata() - Tells the decoder
135 * - FLAC__stream_decoder_process_until_end_of_stream() - Tells the decoder
142 * When the decoder has finished decoding (normally or through an abort),
144 * ensures the decoder is in the correct state and frees memory. Then the
149 * At any point after the stream decoder has been initialized, the client can
155 * has another way of seeking, it can flush the decoder using
159 * The stream decoder also provides MD5 signature checking. If this is
167 * attention. By default, the decoder only calls the metadata_callback for
168 * the STREAMINFO block. These functions allow you to tell the decoder
175 * use can reduce the memory requirements of the decoder. Also note the
184 * The "set" functions may only be called when the decoder is in the
200 * The decoder's state can be obtained by calling FLAC__stream_decoder_get_state().
205 /**< The decoder is ready to search for metadata. */
208 /**< The decoder is ready to or is in the process of reading metadata. */
211 /**< The decoder is ready to or is in the process of searching for the
216 /**< The decoder is ready to or is in the process of reading a frame. */
219 /**< The decoder has reached the end of the stream. */
225 /**< An error occurred while seeking. The decoder must be flushed
231 /**< The decoder was aborted by the read or write callback. */
234 /**< An error occurred allocating memory. The decoder is in an invalid
239 /**< The decoder is in the uninitialized state; one of the
277 /**< FLAC__stream_decoder_init_*() was called when the decoder was
311 /**< An unrecoverable error occurred. The decoder will return from the process call. */
331 /**< An unrecoverable error occurred. The decoder will return from the process call. */
354 /**< An unrecoverable error occurred. The decoder will return from the process call. */
377 /**< An unrecoverable error occurred. The decoder will return from the process call. */
400 /**< An unrecoverable error occurred. The decoder will return from the process call. */
416 * itself is the decoder's best guess at what happened assuming a correct
422 * could be because the decoder encountered a valid frame made by a future
434 /**< An error in the stream caused the decoder to lose synchronization. */
437 /**< The decoder encountered a corrupted frame header. */
443 /**< The decoder encountered reserved fields in use in the stream. */
446 /**< The decoder encountered a corrupted metadata block. */
466 /** The opaque structure definition for the stream decoder type.
467 * See the \link flac_stream_decoder stream decoder module \endlink
479 * called when the decoder needs more input data. The address of the
488 …* FLAC__StreamDecoderReadStatus read_cb(const FLAC__StreamDecoder *decoder, FLAC__byte buffer[], s…
506 * state should not be called on the \a decoder while in the callback.
508 * \param decoder The decoder instance calling the callback.
524 …ReadStatus (*FLAC__StreamDecoderReadCallback)(const FLAC__StreamDecoder *decoder, FLAC__byte buffe…
530 * called when the decoder needs to seek the input stream. The decoder
536 …* FLAC__StreamDecoderSeekStatus seek_cb(const FLAC__StreamDecoder *decoder, FLAC__uint64 absolute_…
549 * state should not be called on the \a decoder while in the callback.
551 * \param decoder The decoder instance calling the callback.
559 …SeekStatus (*FLAC__StreamDecoderSeekCallback)(const FLAC__StreamDecoder *decoder, FLAC__uint64 abs…
565 * called when the decoder wants to know the current position of the
571 …* FLAC__StreamDecoderTellStatus tell_cb(const FLAC__StreamDecoder *decoder, FLAC__uint64 *absolute…
587 * state should not be called on the \a decoder while in the callback.
589 * \param decoder The decoder instance calling the callback.
597 …TellStatus (*FLAC__StreamDecoderTellCallback)(const FLAC__StreamDecoder *decoder, FLAC__uint64 *ab…
603 * called when the decoder wants to know the total length of the stream
608 …* FLAC__StreamDecoderLengthStatus length_cb(const FLAC__StreamDecoder *decoder, FLAC__uint64 *stre…
625 * state should not be called on the \a decoder while in the callback.
627 * \param decoder The decoder instance calling the callback.
635 …thStatus (*FLAC__StreamDecoderLengthCallback)(const FLAC__StreamDecoder *decoder, FLAC__uint64 *st…
641 * called when the decoder needs to know if the end of the stream has
645 * FLAC__bool eof_cb(const FLAC__StreamDecoder *decoder, void *client_data)
654 * state should not be called on the \a decoder while in the callback.
656 * \param decoder The decoder instance calling the callback.
662 typedef FLAC__bool (*FLAC__StreamDecoderEofCallback)(const FLAC__StreamDecoder *decoder, void *clie…
668 * The supplied function will be called when the decoder has decoded a
669 * single audio frame. The decoder will pass the frame metadata as well
674 * state should not be called on the \a decoder while in the callback.
676 * \param decoder The decoder instance calling the callback.
690 …iteStatus (*FLAC__StreamDecoderWriteCallback)(const FLAC__StreamDecoder *decoder, const FLAC__Fram…
696 * The supplied function will be called when the decoder has decoded a
699 * These will be supplied by the decoder in the same order as they
705 * default the decoder only calls the metadata callback for the
706 * \c STREAMINFO block; you can instruct the decoder to pass or filter
710 * state should not be called on the \a decoder while in the callback.
712 * \param decoder The decoder instance calling the callback.
717 typedef void (*FLAC__StreamDecoderMetadataCallback)(const FLAC__StreamDecoder *decoder, const FLAC_…
727 * state should not be called on the \a decoder while in the callback.
729 * \param decoder The decoder instance calling the callback.
730 * \param status The error encountered by the decoder.
734 typedef void (*FLAC__StreamDecoderErrorCallback)(const FLAC__StreamDecoder *decoder, FLAC__StreamDe…
743 /** Create a new stream decoder instance. The instance is created with
752 /** Free a decoder instance. Deletes the object pointed to by \a decoder.
754 * \param decoder A pointer to an existing decoder.
756 * \code decoder != NULL \endcode
758 FLAC_API void FLAC__stream_decoder_delete(FLAC__StreamDecoder *decoder);
776 * \param decoder A decoder instance to set.
779 * \code decoder != NULL \endcode
781 * \c false if the decoder is already initialized, else \c true.
783 FLAC_API FLAC__bool FLAC__stream_decoder_set_ogg_serial_number(FLAC__StreamDecoder *decoder, long s…
785 /** Set the "MD5 signature checking" flag. If \c true, the decoder will
798 * \param decoder A decoder instance to set.
801 * \code decoder != NULL \endcode
803 * \c false if the decoder is already initialized, else \c true.
805 FLAC_API FLAC__bool FLAC__stream_decoder_set_md5_checking(FLAC__StreamDecoder *decoder, FLAC__bool …
807 /** Direct the decoder to pass on all metadata blocks of type \a type.
811 * \param decoder A decoder instance to set.
814 * \code decoder != NULL \endcode
817 * \c false if the decoder is already initialized, else \c true.
819 FLAC_API FLAC__bool FLAC__stream_decoder_set_metadata_respond(FLAC__StreamDecoder *decoder, FLAC__M…
821 /** Direct the decoder to pass on all APPLICATION metadata blocks of the
826 * \param decoder A decoder instance to set.
829 * \code decoder != NULL \endcode
832 * \c false if the decoder is already initialized, else \c true.
834 …AC__stream_decoder_set_metadata_respond_application(FLAC__StreamDecoder *decoder, const FLAC__byte…
836 /** Direct the decoder to pass on all metadata blocks of any type.
840 * \param decoder A decoder instance to set.
842 * \code decoder != NULL \endcode
844 * \c false if the decoder is already initialized, else \c true.
846 FLAC_API FLAC__bool FLAC__stream_decoder_set_metadata_respond_all(FLAC__StreamDecoder *decoder);
848 /** Direct the decoder to filter out all metadata blocks of type \a type.
852 * \param decoder A decoder instance to set.
855 * \code decoder != NULL \endcode
858 * \c false if the decoder is already initialized, else \c true.
860 FLAC_API FLAC__bool FLAC__stream_decoder_set_metadata_ignore(FLAC__StreamDecoder *decoder, FLAC__Me…
862 /** Direct the decoder to filter out all APPLICATION metadata blocks of
867 * \param decoder A decoder instance to set.
870 * \code decoder != NULL \endcode
873 * \c false if the decoder is already initialized, else \c true.
875 …LAC__stream_decoder_set_metadata_ignore_application(FLAC__StreamDecoder *decoder, const FLAC__byte…
877 /** Direct the decoder to filter out all metadata blocks of any type.
881 * \param decoder A decoder instance to set.
883 * \code decoder != NULL \endcode
885 * \c false if the decoder is already initialized, else \c true.
887 FLAC_API FLAC__bool FLAC__stream_decoder_set_metadata_ignore_all(FLAC__StreamDecoder *decoder);
889 /** Get the current decoder state.
891 * \param decoder A decoder instance to query.
893 * \code decoder != NULL \endcode
895 * The current decoder state.
897 FLAC_API FLAC__StreamDecoderState FLAC__stream_decoder_get_state(const FLAC__StreamDecoder *decoder
899 /** Get the current decoder state as a C string.
901 * \param decoder A decoder instance to query.
903 * \code decoder != NULL \endcode
905 * The decoder state as a C string. Do not modify the contents.
907 …API const char *FLAC__stream_decoder_get_resolved_state_string(const FLAC__StreamDecoder *decoder);
910 * This is the value of the setting, not whether or not the decoder is
912 * by a seek). When the decoder is reset the flag will be restored to the
915 * \param decoder A decoder instance to query.
917 * \code decoder != NULL \endcode
921 FLAC_API FLAC__bool FLAC__stream_decoder_get_md5_checking(const FLAC__StreamDecoder *decoder);
927 * \param decoder A decoder instance to query.
929 * \code decoder != NULL \endcode
933 FLAC_API FLAC__uint64 FLAC__stream_decoder_get_total_samples(const FLAC__StreamDecoder *decoder);
939 * \param decoder A decoder instance to query.
941 * \code decoder != NULL \endcode
945 FLAC_API uint32_t FLAC__stream_decoder_get_channels(const FLAC__StreamDecoder *decoder);
951 * \param decoder A decoder instance to query.
953 * \code decoder != NULL \endcode
957 …_ChannelAssignment FLAC__stream_decoder_get_channel_assignment(const FLAC__StreamDecoder *decoder);
963 * \param decoder A decoder instance to query.
965 * \code decoder != NULL \endcode
969 FLAC_API uint32_t FLAC__stream_decoder_get_bits_per_sample(const FLAC__StreamDecoder *decoder);
975 * \param decoder A decoder instance to query.
977 * \code decoder != NULL \endcode
981 FLAC_API uint32_t FLAC__stream_decoder_get_sample_rate(const FLAC__StreamDecoder *decoder);
987 * \param decoder A decoder instance to query.
989 * \code decoder != NULL \endcode
993 FLAC_API uint32_t FLAC__stream_decoder_get_blocksize(const FLAC__StreamDecoder *decoder);
995 /** Returns the decoder's current read position within the stream.
998 * there may still be undecoded bytes in the decoder's read FIFO.
1004 * \param decoder A decoder instance to query.
1007 * \code decoder != NULL \endcode
1014 FLAC_API FLAC__bool FLAC__stream_decoder_get_decode_position(const FLAC__StreamDecoder *decoder, FL…
1016 /** Return client_data from decoder.
1019 * \param decoder A decoder instance.
1024 FLAC_API const void *FLAC__stream_decoder_get_client_data(FLAC__StreamDecoder *decoder);
1026 /** Initialize the decoder instance to decode native FLAC streams.
1028 * This flavor of initialization sets up the decoder to decode from a
1037 * decoder state, which will be FLAC__STREAM_DECODER_SEARCH_FOR_METADATA
1040 * \param decoder An uninitialized decoder instance.
1050 * less efficient for the decoder.
1058 * less efficient for the decoder.
1066 * less efficient for the decoder.
1074 * less efficient for the decoder.
1085 * \code decoder != NULL \endcode
1091 FLAC__StreamDecoder *decoder,
1103 /** Initialize the decoder instance to decode Ogg FLAC streams.
1105 * This flavor of initialization sets up the decoder to decode from a
1114 * decoder state, which will be FLAC__STREAM_DECODER_SEARCH_FOR_METADATA
1121 * \param decoder An uninitialized decoder instance.
1131 * less efficient for the decoder.
1139 * less efficient for the decoder.
1147 * less efficient for the decoder.
1155 * less efficient for the decoder.
1166 * \code decoder != NULL \endcode
1172 FLAC__StreamDecoder *decoder,
1184 /** Initialize the decoder instance to decode native FLAC files.
1186 * This flavor of initialization sets up the decoder to decode from a
1193 * decoder state, which will be FLAC__STREAM_DECODER_SEARCH_FOR_METADATA
1196 * \param decoder An uninitialized decoder instance.
1199 * becomes owned by the decoder and should not be
1215 * \code decoder != NULL \endcode
1222 FLAC__StreamDecoder *decoder,
1230 /** Initialize the decoder instance to decode Ogg FLAC files.
1232 * This flavor of initialization sets up the decoder to decode from a
1239 * decoder state, which will be FLAC__STREAM_DECODER_SEARCH_FOR_METADATA
1246 * \param decoder An uninitialized decoder instance.
1249 * becomes owned by the decoder and should not be
1265 * \code decoder != NULL \endcode
1272 FLAC__StreamDecoder *decoder,
1280 /** Initialize the decoder instance to decode native FLAC files.
1282 * This flavor of initialization sets up the decoder to decode from a plain
1295 * decoder state, which will be FLAC__STREAM_DECODER_SEARCH_FOR_METADATA
1298 * \param decoder An uninitialized decoder instance.
1312 * \code decoder != NULL \endcode
1318 FLAC__StreamDecoder *decoder,
1326 /** Initialize the decoder instance to decode Ogg FLAC files.
1328 * This flavor of initialization sets up the decoder to decode from a plain
1341 * decoder state, which will be FLAC__STREAM_DECODER_SEARCH_FOR_METADATA
1348 * \param decoder An uninitialized decoder instance.
1362 * \code decoder != NULL \endcode
1368 FLAC__StreamDecoder *decoder,
1377 * Flushes the decoding buffer, releases resources, resets the decoder
1378 * settings to their defaults, and returns the decoder state to
1386 * \param decoder An uninitialized decoder instance.
1388 * \code decoder != NULL \endcode
1392 * signature does not match the one computed by the decoder; else
1395 FLAC_API FLAC__bool FLAC__stream_decoder_finish(FLAC__StreamDecoder *decoder);
1398 * The decoder's input buffer will be cleared and the state set to
1402 * \param decoder A decoder instance.
1404 * \code decoder != NULL \endcode
1410 FLAC_API FLAC__bool FLAC__stream_decoder_flush(FLAC__StreamDecoder *decoder);
1413 * The decoder's input buffer will be cleared and the state set to
1420 * If the decoder is seekable, or was initialized with
1422 * the decoder will also attempt to seek to the beginning of the file.
1427 * If the decoder was initialized with FLAC__stream_encoder_init*_stream()
1433 * \param decoder A decoder instance.
1435 * \code decoder != NULL \endcode
1442 FLAC_API FLAC__bool FLAC__stream_decoder_reset(FLAC__StreamDecoder *decoder);
1445 * This version instructs the decoder to decode a either a single metadata
1450 * As the decoder needs more input it will call the read callback.
1457 * decoder will continue to try and resync until it gets to a valid
1458 * frame, then decode one frame, then return. If the decoder points to
1466 * \param decoder An initialized decoder instance.
1468 * \code decoder != NULL \endcode
1472 * information about the decoder, check the decoder state with
1475 FLAC_API FLAC__bool FLAC__stream_decoder_process_single(FLAC__StreamDecoder *decoder);
1478 * This version instructs the decoder to decode from the current position
1483 * As the decoder needs more input it will call the read callback.
1487 * \param decoder An initialized decoder instance.
1489 * \code decoder != NULL \endcode
1493 * information about the decoder, check the decoder state with
1496 FLAC_API FLAC__bool FLAC__stream_decoder_process_until_end_of_metadata(FLAC__StreamDecoder *decoder
1499 * This version instructs the decoder to decode from the current position
1504 * As the decoder needs more input it will call the read callback.
1508 * \param decoder An initialized decoder instance.
1510 * \code decoder != NULL \endcode
1514 * information about the decoder, check the decoder state with
1517 FLAC_API FLAC__bool FLAC__stream_decoder_process_until_end_of_stream(FLAC__StreamDecoder *decoder);
1520 * This version instructs the decoder to 'skip' a single frame and stop,
1546 * \param decoder An initialized decoder instance not in a metadata
1549 * \code decoder != NULL \endcode
1552 * occurred (meaning decoding must stop), or if the decoder
1555 * information about the decoder, check the decoder state with
1558 FLAC_API FLAC__bool FLAC__stream_decoder_skip_single_frame(FLAC__StreamDecoder *decoder);
1564 * and return \c false. Furthermore, if the decoder state is
1565 * \c FLAC__STREAM_DECODER_SEEK_ERROR, then the decoder must be flushed
1569 * \param decoder A decoder instance.
1572 * \code decoder != NULL \endcode
1576 FLAC_API FLAC__bool FLAC__stream_decoder_seek_absolute(FLAC__StreamDecoder *decoder, FLAC__uint64 s…