cannam@86: cannam@86:
cannam@86:cannam@86: Currently Ogg FLAC is supported for read only, via FLAC__metadata_chain_read_ogg() but a subsequent FLAC__metadata_chain_write() will fail.
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: The metadata objects returned by FLAC__metadata_iterator_get_block() are owned by the chain; do not FLAC__metadata_object_delete() them. In the same way, blocks passed to FLAC__metadata_iterator_set_block() become owned by the chain and they will be deleted when the chain is deleted.
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 2 chain type. |
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 2 iterator type. |
cannam@86:
cannam@86:
cannam@86:
|
cannam@86:
cannam@86: cannam@86: | cannam@86:
cannam@86:
cannam@86: cannam@86:
|
cannam@86:
cannam@86:
cannam@86:
|
cannam@86:
cannam@86: cannam@86: | cannam@86:
cannam@86:
cannam@86: cannam@86: Create a new chain instance. cannam@86:
|
cannam@86:
cannam@86:
cannam@86:
|
cannam@86:
cannam@86: cannam@86: | cannam@86:
cannam@86:
cannam@86: cannam@86: Free a chain instance. Deletes the object pointed to by chain. 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 chain. 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: Read all metadata from a FLAC file into the chain. cannam@86:
|
cannam@86:
cannam@86:
cannam@86:
|
cannam@86:
cannam@86: cannam@86: | cannam@86:
cannam@86:
cannam@86: cannam@86: Read all metadata from an Ogg FLAC file into the chain. cannam@86:
|
cannam@86:
cannam@86:
cannam@86:
|
cannam@86:
cannam@86: cannam@86: | cannam@86:
cannam@86:
cannam@86: cannam@86: Read all metadata from a FLAC stream into the chain via I/O callbacks.
cannam@86: The handle need only be open for reading, but must be seekable. The equivalent minimum stdio fopen() file mode is cannam@86:
|
cannam@86:
cannam@86:
cannam@86:
|
cannam@86:
cannam@86: cannam@86: | cannam@86:
cannam@86:
cannam@86: cannam@86: Read all metadata from an Ogg FLAC stream into the chain via I/O callbacks.
cannam@86: The handle need only be open for reading, but must be seekable. The equivalent minimum stdio fopen() file mode is cannam@86:
|
cannam@86:
cannam@86:
cannam@86:
|
cannam@86:
cannam@86: cannam@86: | cannam@86:
cannam@86:
cannam@86: cannam@86: Checks if writing the given chain would require the use of a temporary file, or if it could be written in place. cannam@86: Under certain conditions, padding can be utilized so that writing edited metadata back to the FLAC file does not require rewriting the entire file. If rewriting is required, then a temporary workfile is required. When writing metadata using callbacks, you must check this function to know whether to call FLAC__metadata_chain_write_with_callbacks() or FLAC__metadata_chain_write_with_callbacks_and_tempfile(). When writing with FLAC__metadata_chain_write(), the temporary file is handled internally. cannam@86:
|
cannam@86:
cannam@86:
cannam@86:
|
cannam@86:
cannam@86: cannam@86: | cannam@86:
cannam@86:
cannam@86: cannam@86: Write all metadata out to the FLAC file. This function tries to be as efficient as possible; how the metadata is actually written is shown by the following: cannam@86: If the current chain is the same size as the existing metadata, the new data is written in place.
cannam@86: If the current chain is longer than the existing metadata, and use_padding is
cannam@86: If the current chain is shorter than the existing metadata, and use_padding is
cannam@86: If preserve_file_stats is cannam@86: For this write function to be used, the chain must have been read with FLAC__metadata_chain_read()/FLAC__metadata_chain_read_ogg(), not FLAC__metadata_chain_read_with_callbacks()/FLAC__metadata_chain_read_ogg_with_callbacks(). cannam@86:
|
cannam@86:
cannam@86:
cannam@86:
|
cannam@86:
cannam@86: cannam@86: | cannam@86:
cannam@86:
cannam@86: cannam@86: Write all metadata out to a FLAC stream via callbacks. cannam@86: (See FLAC__metadata_chain_write() for the details on how padding is used to write metadata in place if possible.)
cannam@86: The handle must be open for updating and be seekable. The equivalent minimum stdio fopen() file mode is
cannam@86: For this write function to be used, the chain must have been read with FLAC__metadata_chain_read_with_callbacks()/FLAC__metadata_chain_read_ogg_with_callbacks(), not FLAC__metadata_chain_read()/FLAC__metadata_chain_read_ogg(). Also, FLAC__metadata_chain_check_if_tempfile_needed() must have returned cannam@86:
|
cannam@86:
cannam@86:
cannam@86:
|
cannam@86:
cannam@86: cannam@86: | cannam@86:
cannam@86:
cannam@86: cannam@86: Write all metadata out to a FLAC stream via callbacks. cannam@86: (See FLAC__metadata_chain_write() for the details on how padding is used to write metadata in place if possible.) cannam@86: This version of the write-with-callbacks function must be used when FLAC__metadata_chain_check_if_tempfile_needed() returns true. In this function, you must supply an I/O handle corresponding to the FLAC file to edit, and a temporary handle to which the new FLAC file will be written. It is the caller's job to move this temporary FLAC file on top of the original FLAC file to complete the metadata edit.
cannam@86: The handle must be open for reading and be seekable. The equivalent minimum stdio fopen() file mode is
cannam@86: The temp_handle must be open for writing. The equivalent minimum stdio fopen() file mode is
cannam@86: For this write function to be used, the chain must have been read with FLAC__metadata_chain_read_with_callbacks()/FLAC__metadata_chain_read_ogg_with_callbacks(), not FLAC__metadata_chain_read()/FLAC__metadata_chain_read_ogg(). Also, FLAC__metadata_chain_check_if_tempfile_needed() must have returned cannam@86:
|
cannam@86:
cannam@86:
cannam@86:
|
cannam@86:
cannam@86: cannam@86: | cannam@86:
cannam@86:
cannam@86: cannam@86: Merge adjacent PADDING blocks into a single block. cannam@86:
|
cannam@86:
cannam@86:
cannam@86:
|
cannam@86:
cannam@86: cannam@86: | cannam@86:
cannam@86:
cannam@86: cannam@86: This function will move all PADDING blocks to the end on the metadata, then merge them into a single block. cannam@86:
|
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: Initialize the iterator to point to the first metadata block in the given chain. 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: Get the type of the metadata block at the current position. 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 in place but must write the chain before the changes are reflected to the FLAC file. You do not need to call FLAC__metadata_iterator_set_block() to reflect the changes; the pointer returned by FLAC__metadata_iterator_get_block() points directly into the chain. cannam@86:
|
cannam@86:
cannam@86:
cannam@86:
|
cannam@86:
cannam@86: cannam@86: | cannam@86:
cannam@86:
cannam@86: cannam@86: Set the metadata block at the current position, replacing the existing block. The new block passed in becomes owned by the chain and it will be deleted when the chain is deleted. cannam@86:
|
cannam@86:
cannam@86:
cannam@86:
|
cannam@86:
cannam@86: cannam@86: | cannam@86:
cannam@86:
cannam@86:
cannam@86: Removes the current block from the chain. If replace_with_padding is cannam@86:
|
cannam@86:
cannam@86:
cannam@86:
|
cannam@86:
cannam@86: cannam@86: | cannam@86:
cannam@86:
cannam@86: cannam@86: Insert a new block before the current block. You cannot insert a block before the first STREAMINFO block. You cannot insert a STREAMINFO block as there can be only one, the one that already exists at the head when you read in a chain. The chain takes ownership of the new block and it will be deleted when the chain is deleted. The iterator will be left 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: Insert a new block after the current block. You cannot insert a STREAMINFO block as there can be only one, the one that already exists at the head when you read in a chain. The chain takes ownership of the new block and it will be deleted when the chain is deleted. The iterator will be left 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: Maps a FLAC__Metadata_ChainStatus to a C string. cannam@86: Using a FLAC__Metadata_ChainStatus as the index to this array will give the string equivalent. The contents should not be modified. |
cannam@86: