cannam@86: cannam@86:
cannam@86:cannam@86: The general usage of this interface is:
cannam@86:
cannam@86:
cannam@86: Do not modify the is_last, length, or type fields of returned FLAC__StreamMetadata objects. These are managed automatically.
cannam@86: If any of the modification functions (FLAC__metadata_simple_iterator_set_block(), FLAC__metadata_simple_iterator_delete_block(), FLAC__metadata_simple_iterator_insert_block_after(), etc.) return false
, you should delete the iterator as it may no longer be valid.
cannam@86:
cannam@86:
cannam@86:
|
cannam@86:
cannam@86: cannam@86: | cannam@86:
cannam@86:
cannam@86: cannam@86: The opaque structure definition for the level 1 iterator type. See the metadata level 1 module for a detailed description. |
cannam@86:
cannam@86:
cannam@86:
|
cannam@86:
cannam@86: cannam@86: | cannam@86:
cannam@86:
cannam@86: cannam@86: Status type for FLAC__Metadata_SimpleIterator. cannam@86: The iterator's current status can be obtained by calling FLAC__metadata_simple_iterator_status().
|
cannam@86:
cannam@86:
cannam@86:
|
cannam@86:
cannam@86: cannam@86: | cannam@86:
cannam@86:
cannam@86: cannam@86: Create a new iterator instance. cannam@86:
|
cannam@86:
cannam@86:
cannam@86:
|
cannam@86:
cannam@86: cannam@86: | cannam@86:
cannam@86:
cannam@86: cannam@86: Free an iterator instance. Deletes the object pointed to by iterator. cannam@86:
|
cannam@86:
cannam@86:
cannam@86:
|
cannam@86:
cannam@86: cannam@86: | cannam@86:
cannam@86:
cannam@86:
cannam@86: Get the current status of the iterator. Call this after a function returns cannam@86:
|
cannam@86:
cannam@86:
cannam@86:
|
cannam@86:
cannam@86: cannam@86: | cannam@86:
cannam@86:
cannam@86: cannam@86: Initialize the iterator to point to the first metadata block in the given FLAC file. cannam@86:
|
cannam@86:
cannam@86:
cannam@86:
|
cannam@86:
cannam@86: cannam@86: | cannam@86:
cannam@86:
cannam@86:
cannam@86: Returns cannam@86:
|
cannam@86:
cannam@86:
cannam@86:
|
cannam@86:
cannam@86: cannam@86: | cannam@86:
cannam@86:
cannam@86:
cannam@86: Moves the iterator forward one metadata block, returning cannam@86:
|
cannam@86:
cannam@86:
cannam@86:
|
cannam@86:
cannam@86: cannam@86: | cannam@86:
cannam@86:
cannam@86:
cannam@86: Moves the iterator backward one metadata block, returning cannam@86:
|
cannam@86:
cannam@86:
cannam@86:
|
cannam@86:
cannam@86: cannam@86: | cannam@86:
cannam@86:
cannam@86: cannam@86: Returns a flag telling if the current metadata block is the last. cannam@86:
|
cannam@86:
cannam@86:
cannam@86:
|
cannam@86:
cannam@86: cannam@86: | cannam@86:
cannam@86:
cannam@86: cannam@86: 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. cannam@86:
|
cannam@86:
cannam@86:
cannam@86:
|
cannam@86:
cannam@86: cannam@86: | cannam@86:
cannam@86:
cannam@86: cannam@86: 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. cannam@86:
|
cannam@86:
cannam@86:
cannam@86:
|
cannam@86:
cannam@86: cannam@86: | cannam@86:
cannam@86:
cannam@86: cannam@86: 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. cannam@86:
|
cannam@86:
cannam@86:
cannam@86:
|
cannam@86:
cannam@86: cannam@86: | cannam@86:
cannam@86:
cannam@86:
cannam@86: Get the application ID of the cannam@86:
|
cannam@86:
cannam@86:
cannam@86:
|
cannam@86:
cannam@86: cannam@86: | cannam@86:
cannam@86:
cannam@86: cannam@86: 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. cannam@86: You must call FLAC__metadata_object_delete() on the returned object when you are finished with it. cannam@86:
|
cannam@86:
cannam@86:
cannam@86:
|
cannam@86:
cannam@86: cannam@86: | cannam@86:
cannam@86:
cannam@86: cannam@86: Write a block back to the FLAC file. This function tries to be as efficient as possible; how the block is actually written is shown by the following: cannam@86: Existing block is a STREAMINFO block and the new block is a STREAMINFO block: the new block is written in place. Make sure you know what you're doing when changing the values of a STREAMINFO block.
cannam@86: Existing block is a STREAMINFO block and the new block is a not a STREAMINFO block: this is an error since the first block must be a STREAMINFO block. Returns
cannam@86: Existing block is not a STREAMINFO block and the new block is a STREAMINFO block: this is an error since there may be only one STREAMINFO block. Returns cannam@86: Existing block and new block are the same length: the existing block will be replaced by the new block, written in place.
cannam@86: Existing block is longer than new block: if use_padding is
cannam@86: Existing block is shorter than new block: if use_padding is cannam@86: After writing the block, the iterator will remain in the same place, i.e. pointing to the new block. cannam@86:
|
cannam@86:
cannam@86:
cannam@86:
|
cannam@86:
cannam@86: cannam@86: | cannam@86:
cannam@86:
cannam@86: cannam@86: This is similar to FLAC__metadata_simple_iterator_set_block() except that instead of writing over an existing block, it appends a block after the existing block. use_padding is again used to tell the function to try an expand into following padding in an attempt to avoid rewriting the entire file.
cannam@86: This function will fail and return cannam@86: After writing the block, the iterator will be pointing to the new block. cannam@86:
|
cannam@86:
cannam@86:
cannam@86:
|
cannam@86:
cannam@86: cannam@86: | cannam@86:
cannam@86:
cannam@86:
cannam@86: Deletes the block at the current position. This will cause the entire FLAC file to be rewritten, unless use_padding is cannam@86: You may not delete the STREAMINFO block. cannam@86:
|
cannam@86:
cannam@86:
cannam@86:
|
cannam@86:
cannam@86: cannam@86: | cannam@86:
cannam@86:
cannam@86: cannam@86: Maps a FLAC__Metadata_SimpleIteratorStatus to a C string. cannam@86: Using a FLAC__Metadata_SimpleIteratorStatus as the index to this array will give the string equivalent. The contents should not be modified. |
cannam@86: