mirror of
https://github.com/claunia/flac.git
synced 2025-12-16 18:54:26 +00:00
add FLAC__metadata_simple_iterator_get_block_offset(), FLAC__metadata_simple_iterator_get_block_length(), FLAC__metadata_simple_iterator_is_last()
This commit is contained in:
@@ -1018,8 +1018,11 @@ namespace FLAC {
|
||||
|
||||
bool next(); ///< See FLAC__metadata_simple_iterator_next().
|
||||
bool prev(); ///< See FLAC__metadata_simple_iterator_prev().
|
||||
bool is_last() const; ///< See FLAC__metadata_simple_iterator_is_last().
|
||||
|
||||
off_t get_block_offset() const; ///< See FLAC__metadata_simple_iterator_get_block_offset().
|
||||
::FLAC__MetadataType get_block_type() const; ///< See FLAC__metadata_simple_iterator_get_block_type().
|
||||
unsigned get_block_length() const; ///< See FLAC__metadata_simple_iterator_get_block_length().
|
||||
Prototype *get_block(); ///< See FLAC__metadata_simple_iterator_get_block().
|
||||
bool set_block(Prototype *block, bool use_padding = true); ///< See FLAC__metadata_simple_iterator_set_block().
|
||||
bool insert_block_after(Prototype *block, bool use_padding = true); ///< See FLAC__metadata_simple_iterator_insert_block_after().
|
||||
|
||||
@@ -443,6 +443,38 @@ FLAC_API FLAC__bool FLAC__metadata_simple_iterator_next(FLAC__Metadata_SimpleIte
|
||||
*/
|
||||
FLAC_API FLAC__bool FLAC__metadata_simple_iterator_prev(FLAC__Metadata_SimpleIterator *iterator);
|
||||
|
||||
/*@@@@add to tests*/
|
||||
/** Returns a flag telling if the current metadata block is the last.
|
||||
*
|
||||
* \param iterator A pointer to an existing initialized iterator.
|
||||
* \assert
|
||||
* \code iterator != NULL \endcode
|
||||
* \a iterator has been successfully initialized with
|
||||
* FLAC__metadata_simple_iterator_init()
|
||||
* \retval FLAC__bool
|
||||
* \c true if the current metadata block is the last in the file,
|
||||
* else \c false.
|
||||
*/
|
||||
FLAC_API FLAC__bool FLAC__metadata_simple_iterator_is_last(const FLAC__Metadata_SimpleIterator *iterator);
|
||||
|
||||
/*@@@@add to tests*/
|
||||
/** Get the offset of the metadata block at the current position. This
|
||||
* avoids reading the actual block data which can save time for large
|
||||
* blocks.
|
||||
*
|
||||
* \param iterator A pointer to an existing initialized iterator.
|
||||
* \assert
|
||||
* \code iterator != NULL \endcode
|
||||
* \a iterator has been successfully initialized with
|
||||
* FLAC__metadata_simple_iterator_init()
|
||||
* \retval off_t
|
||||
* The offset of the metadata block at the current iterator position.
|
||||
* This is the byte offset relative to the beginning of the file of
|
||||
* the current metadata block's header.
|
||||
*/
|
||||
|
||||
FLAC_API off_t FLAC__metadata_simple_iterator_get_block_offset(const FLAC__Metadata_SimpleIterator *iterator);
|
||||
|
||||
/** Get the type of the metadata block at the current position. This
|
||||
* avoids reading the actual block data which can save time for large
|
||||
* blocks.
|
||||
@@ -458,6 +490,25 @@ FLAC_API FLAC__bool FLAC__metadata_simple_iterator_prev(FLAC__Metadata_SimpleIte
|
||||
|
||||
FLAC_API FLAC__MetadataType FLAC__metadata_simple_iterator_get_block_type(const FLAC__Metadata_SimpleIterator *iterator);
|
||||
|
||||
/*@@@@add to tests*/
|
||||
/** Get the length of the metadata block at the current position. This
|
||||
* avoids reading the actual block data which can save time for large
|
||||
* blocks.
|
||||
*
|
||||
* \param iterator A pointer to an existing initialized iterator.
|
||||
* \assert
|
||||
* \code iterator != NULL \endcode
|
||||
* \a iterator has been successfully initialized with
|
||||
* FLAC__metadata_simple_iterator_init()
|
||||
* \retval unsigned
|
||||
* The length of the metadata block at the current iterator position.
|
||||
* The is same length as that in the
|
||||
* <a href="http://flac.sourceforge.net/format.html#metadata_block_header">metadata block header</a>,
|
||||
* i.e. the length of the metadata body that follows the header.
|
||||
*/
|
||||
|
||||
FLAC_API unsigned FLAC__metadata_simple_iterator_get_block_length(const FLAC__Metadata_SimpleIterator *iterator);
|
||||
|
||||
/** Get the metadata block at the current position. You can modify the
|
||||
* block but must use FLAC__metadata_simple_iterator_set_block() to
|
||||
* write it back to the FLAC file.
|
||||
|
||||
Reference in New Issue
Block a user