• Home
  • Raw
  • Download

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
430 /**< An error in the stream caused the decoder to lose synchronization. */
433 /**< The decoder encountered a corrupted frame header. */
439 /**< The decoder encountered reserved fields in use in the stream. */
459 /** The opaque structure definition for the stream decoder type.
460 * See the \link flac_stream_decoder stream decoder module \endlink
472 * called when the decoder needs more input data. The address of the
481 …* FLAC__StreamDecoderReadStatus read_cb(const FLAC__StreamDecoder *decoder, FLAC__byte buffer[], s…
499 * state should not be called on the \a decoder while in the callback.
501 * \param decoder The decoder instance calling the callback.
517 …ReadStatus (*FLAC__StreamDecoderReadCallback)(const FLAC__StreamDecoder *decoder, FLAC__byte buffe…
523 * called when the decoder needs to seek the input stream. The decoder
529 …* FLAC__StreamDecoderSeekStatus seek_cb(const FLAC__StreamDecoder *decoder, FLAC__uint64 absolute_…
542 * state should not be called on the \a decoder while in the callback.
544 * \param decoder The decoder instance calling the callback.
552 …SeekStatus (*FLAC__StreamDecoderSeekCallback)(const FLAC__StreamDecoder *decoder, FLAC__uint64 abs…
558 * called when the decoder wants to know the current position of the
564 …* FLAC__StreamDecoderTellStatus tell_cb(const FLAC__StreamDecoder *decoder, FLAC__uint64 *absolute…
580 * state should not be called on the \a decoder while in the callback.
582 * \param decoder The decoder instance calling the callback.
590 …TellStatus (*FLAC__StreamDecoderTellCallback)(const FLAC__StreamDecoder *decoder, FLAC__uint64 *ab…
596 * called when the decoder wants to know the total length of the stream
601 …* FLAC__StreamDecoderLengthStatus length_cb(const FLAC__StreamDecoder *decoder, FLAC__uint64 *stre…
618 * state should not be called on the \a decoder while in the callback.
620 * \param decoder The decoder instance calling the callback.
628 …thStatus (*FLAC__StreamDecoderLengthCallback)(const FLAC__StreamDecoder *decoder, FLAC__uint64 *st…
634 * called when the decoder needs to know if the end of the stream has
638 * FLAC__bool eof_cb(const FLAC__StreamDecoder *decoder, void *client_data)
647 * state should not be called on the \a decoder while in the callback.
649 * \param decoder The decoder instance calling the callback.
655 typedef FLAC__bool (*FLAC__StreamDecoderEofCallback)(const FLAC__StreamDecoder *decoder, void *clie…
661 * The supplied function will be called when the decoder has decoded a
662 * single audio frame. The decoder will pass the frame metadata as well
667 * state should not be called on the \a decoder while in the callback.
669 * \param decoder The decoder instance calling the callback.
683 …iteStatus (*FLAC__StreamDecoderWriteCallback)(const FLAC__StreamDecoder *decoder, const FLAC__Fram…
689 * The supplied function will be called when the decoder has decoded a
692 * These will be supplied by the decoder in the same order as they
698 * default the decoder only calls the metadata callback for the
699 * \c STREAMINFO block; you can instruct the decoder to pass or filter
703 * state should not be called on the \a decoder while in the callback.
705 * \param decoder The decoder instance calling the callback.
710 typedef void (*FLAC__StreamDecoderMetadataCallback)(const FLAC__StreamDecoder *decoder, const FLAC_…
720 * state should not be called on the \a decoder while in the callback.
722 * \param decoder The decoder instance calling the callback.
723 * \param status The error encountered by the decoder.
727 typedef void (*FLAC__StreamDecoderErrorCallback)(const FLAC__StreamDecoder *decoder, FLAC__StreamDe…
736 /** Create a new stream decoder instance. The instance is created with
745 /** Free a decoder instance. Deletes the object pointed to by \a decoder.
747 * \param decoder A pointer to an existing decoder.
749 * \code decoder != NULL \endcode
751 FLAC_API void FLAC__stream_decoder_delete(FLAC__StreamDecoder *decoder);
769 * \param decoder A decoder instance to set.
772 * \code decoder != NULL \endcode
774 * \c false if the decoder is already initialized, else \c true.
776 FLAC_API FLAC__bool FLAC__stream_decoder_set_ogg_serial_number(FLAC__StreamDecoder *decoder, long s…
778 /** Set the "MD5 signature checking" flag. If \c true, the decoder will
791 * \param decoder A decoder instance to set.
794 * \code decoder != NULL \endcode
796 * \c false if the decoder is already initialized, else \c true.
798 FLAC_API FLAC__bool FLAC__stream_decoder_set_md5_checking(FLAC__StreamDecoder *decoder, FLAC__bool …
800 /** Direct the decoder to pass on all metadata blocks of type \a type.
804 * \param decoder A decoder instance to set.
807 * \code decoder != NULL \endcode
810 * \c false if the decoder is already initialized, else \c true.
812 FLAC_API FLAC__bool FLAC__stream_decoder_set_metadata_respond(FLAC__StreamDecoder *decoder, FLAC__M…
814 /** Direct the decoder to pass on all APPLICATION metadata blocks of the
819 * \param decoder A decoder instance to set.
822 * \code decoder != NULL \endcode
825 * \c false if the decoder is already initialized, else \c true.
827 …AC__stream_decoder_set_metadata_respond_application(FLAC__StreamDecoder *decoder, const FLAC__byte…
829 /** Direct the decoder to pass on all metadata blocks of any type.
833 * \param decoder A decoder instance to set.
835 * \code decoder != NULL \endcode
837 * \c false if the decoder is already initialized, else \c true.
839 FLAC_API FLAC__bool FLAC__stream_decoder_set_metadata_respond_all(FLAC__StreamDecoder *decoder);
841 /** Direct the decoder to filter out all metadata blocks of type \a type.
845 * \param decoder A decoder instance to set.
848 * \code decoder != NULL \endcode
851 * \c false if the decoder is already initialized, else \c true.
853 FLAC_API FLAC__bool FLAC__stream_decoder_set_metadata_ignore(FLAC__StreamDecoder *decoder, FLAC__Me…
855 /** Direct the decoder to filter out all APPLICATION metadata blocks of
860 * \param decoder A decoder instance to set.
863 * \code decoder != NULL \endcode
866 * \c false if the decoder is already initialized, else \c true.
868 …LAC__stream_decoder_set_metadata_ignore_application(FLAC__StreamDecoder *decoder, const FLAC__byte…
870 /** Direct the decoder to filter out all metadata blocks of any type.
874 * \param decoder A decoder instance to set.
876 * \code decoder != NULL \endcode
878 * \c false if the decoder is already initialized, else \c true.
880 FLAC_API FLAC__bool FLAC__stream_decoder_set_metadata_ignore_all(FLAC__StreamDecoder *decoder);
882 /** Get the current decoder state.
884 * \param decoder A decoder instance to query.
886 * \code decoder != NULL \endcode
888 * The current decoder state.
890 FLAC_API FLAC__StreamDecoderState FLAC__stream_decoder_get_state(const FLAC__StreamDecoder *decoder
892 /** Get the current decoder state as a C string.
894 * \param decoder A decoder instance to query.
896 * \code decoder != NULL \endcode
898 * The decoder state as a C string. Do not modify the contents.
900 …API const char *FLAC__stream_decoder_get_resolved_state_string(const FLAC__StreamDecoder *decoder);
903 * This is the value of the setting, not whether or not the decoder is
905 * by a seek). When the decoder is reset the flag will be restored to the
908 * \param decoder A decoder instance to query.
910 * \code decoder != NULL \endcode
914 FLAC_API FLAC__bool FLAC__stream_decoder_get_md5_checking(const FLAC__StreamDecoder *decoder);
920 * \param decoder A decoder instance to query.
922 * \code decoder != NULL \endcode
926 FLAC_API FLAC__uint64 FLAC__stream_decoder_get_total_samples(const FLAC__StreamDecoder *decoder);
932 * \param decoder A decoder instance to query.
934 * \code decoder != NULL \endcode
938 FLAC_API uint32_t FLAC__stream_decoder_get_channels(const FLAC__StreamDecoder *decoder);
944 * \param decoder A decoder instance to query.
946 * \code decoder != NULL \endcode
950 …_ChannelAssignment FLAC__stream_decoder_get_channel_assignment(const FLAC__StreamDecoder *decoder);
956 * \param decoder A decoder instance to query.
958 * \code decoder != NULL \endcode
962 FLAC_API uint32_t FLAC__stream_decoder_get_bits_per_sample(const FLAC__StreamDecoder *decoder);
968 * \param decoder A decoder instance to query.
970 * \code decoder != NULL \endcode
974 FLAC_API uint32_t FLAC__stream_decoder_get_sample_rate(const FLAC__StreamDecoder *decoder);
980 * \param decoder A decoder instance to query.
982 * \code decoder != NULL \endcode
986 FLAC_API uint32_t FLAC__stream_decoder_get_blocksize(const FLAC__StreamDecoder *decoder);
988 /** Returns the decoder's current read position within the stream.
991 * there may still be undecoded bytes in the decoder's read FIFO.
997 * \param decoder A decoder instance to query.
1000 * \code decoder != NULL \endcode
1007 FLAC_API FLAC__bool FLAC__stream_decoder_get_decode_position(const FLAC__StreamDecoder *decoder, FL…
1009 /** Initialize the decoder instance to decode native FLAC streams.
1011 * This flavor of initialization sets up the decoder to decode from a
1020 * decoder state, which will be FLAC__STREAM_DECODER_SEARCH_FOR_METADATA
1023 * \param decoder An uninitialized decoder instance.
1033 * less efficient for the decoder.
1041 * less efficient for the decoder.
1049 * less efficient for the decoder.
1057 * less efficient for the decoder.
1068 * \code decoder != NULL \endcode
1074 FLAC__StreamDecoder *decoder,
1086 /** Initialize the decoder instance to decode Ogg FLAC streams.
1088 * This flavor of initialization sets up the decoder to decode from a
1097 * decoder state, which will be FLAC__STREAM_DECODER_SEARCH_FOR_METADATA
1104 * \param decoder An uninitialized decoder instance.
1114 * less efficient for the decoder.
1122 * less efficient for the decoder.
1130 * less efficient for the decoder.
1138 * less efficient for the decoder.
1149 * \code decoder != NULL \endcode
1155 FLAC__StreamDecoder *decoder,
1167 /** Initialize the decoder instance to decode native FLAC files.
1169 * This flavor of initialization sets up the decoder to decode from a
1176 * decoder state, which will be FLAC__STREAM_DECODER_SEARCH_FOR_METADATA
1179 * \param decoder An uninitialized decoder instance.
1182 * becomes owned by the decoder and should not be
1198 * \code decoder != NULL \endcode
1205 FLAC__StreamDecoder *decoder,
1213 /** Initialize the decoder instance to decode Ogg FLAC files.
1215 * This flavor of initialization sets up the decoder to decode from a
1222 * decoder state, which will be FLAC__STREAM_DECODER_SEARCH_FOR_METADATA
1229 * \param decoder An uninitialized decoder instance.
1232 * becomes owned by the decoder and should not be
1248 * \code decoder != NULL \endcode
1255 FLAC__StreamDecoder *decoder,
1263 /** Initialize the decoder instance to decode native FLAC files.
1265 * This flavor of initialization sets up the decoder to decode from a plain
1274 * decoder state, which will be FLAC__STREAM_DECODER_SEARCH_FOR_METADATA
1277 * \param decoder An uninitialized decoder instance.
1291 * \code decoder != NULL \endcode
1297 FLAC__StreamDecoder *decoder,
1305 /** Initialize the decoder instance to decode Ogg FLAC files.
1307 * This flavor of initialization sets up the decoder to decode from a plain
1316 * decoder state, which will be FLAC__STREAM_DECODER_SEARCH_FOR_METADATA
1323 * \param decoder An uninitialized decoder instance.
1337 * \code decoder != NULL \endcode
1343 FLAC__StreamDecoder *decoder,
1352 * Flushes the decoding buffer, releases resources, resets the decoder
1353 * settings to their defaults, and returns the decoder state to
1361 * \param decoder An uninitialized decoder instance.
1363 * \code decoder != NULL \endcode
1367 * signature does not match the one computed by the decoder; else
1370 FLAC_API FLAC__bool FLAC__stream_decoder_finish(FLAC__StreamDecoder *decoder);
1373 * The decoder's input buffer will be cleared and the state set to
1377 * \param decoder A decoder instance.
1379 * \code decoder != NULL \endcode
1385 FLAC_API FLAC__bool FLAC__stream_decoder_flush(FLAC__StreamDecoder *decoder);
1388 * The decoder's input buffer will be cleared and the state set to
1395 * If the decoder is seekable, or was initialized with
1397 * the decoder will also attempt to seek to the beginning of the file.
1402 * If the decoder was initialized with FLAC__stream_encoder_init*_stream()
1408 * \param decoder A decoder instance.
1410 * \code decoder != NULL \endcode
1417 FLAC_API FLAC__bool FLAC__stream_decoder_reset(FLAC__StreamDecoder *decoder);
1420 * This version instructs the decoder to decode a either a single metadata
1425 * As the decoder needs more input it will call the read callback.
1432 * decoder will continue to try and resync until it gets to a valid
1433 * frame, then decode one frame, then return. If the decoder points to
1441 * \param decoder An initialized decoder instance.
1443 * \code decoder != NULL \endcode
1447 * information about the decoder, check the decoder state with
1450 FLAC_API FLAC__bool FLAC__stream_decoder_process_single(FLAC__StreamDecoder *decoder);
1453 * This version instructs the decoder to decode from the current position
1458 * As the decoder needs more input it will call the read callback.
1462 * \param decoder An initialized decoder instance.
1464 * \code decoder != NULL \endcode
1468 * information about the decoder, check the decoder state with
1471 FLAC_API FLAC__bool FLAC__stream_decoder_process_until_end_of_metadata(FLAC__StreamDecoder *decoder
1474 * This version instructs the decoder to decode from the current position
1479 * As the decoder needs more input it will call the read callback.
1483 * \param decoder An initialized decoder instance.
1485 * \code decoder != NULL \endcode
1489 * information about the decoder, check the decoder state with
1492 FLAC_API FLAC__bool FLAC__stream_decoder_process_until_end_of_stream(FLAC__StreamDecoder *decoder);
1495 * This version instructs the decoder to 'skip' a single frame and stop,
1521 * \param decoder An initialized decoder instance not in a metadata
1524 * \code decoder != NULL \endcode
1527 * occurred (meaning decoding must stop), or if the decoder
1530 * information about the decoder, check the decoder state with
1533 FLAC_API FLAC__bool FLAC__stream_decoder_skip_single_frame(FLAC__StreamDecoder *decoder);
1539 * and return \c false. Furthermore, if the decoder state is
1540 * \c FLAC__STREAM_DECODER_SEEK_ERROR, then the decoder must be flushed
1544 * \param decoder A decoder instance.
1547 * \code decoder != NULL \endcode
1551 FLAC_API FLAC__bool FLAC__stream_decoder_seek_absolute(FLAC__StreamDecoder *decoder, FLAC__uint64 s…
1553 /** Return client_data from decoder.
1556 * \param decoder A decoder instance.
1561 FLAC_API const void *FLAC__get_decoder_client_data(FLAC__StreamDecoder *decoder);