-
-
Notifications
You must be signed in to change notification settings - Fork 1
bindings.metadata2
Contains all the functions and objects for FLAC/metadata2 interface. Don't think this documentation is a full replacement of the FLAC's one. Only tells all available functions, and the relation to the FLAC API, with a short description. If this documents lacks a function from the FLAC API, it means that has no bounded.
Creates an instance of a Metadata Chain or returns null
if could not create it.
Deletes an instance of a Metadata Chain created by bindings.metadata2.chain_new(). Passing an invalid object could crash node or make unexpected things.
Gets the current state of the chain. You can get a string value of it with bindings.metadata2.ChainStatusString.
Reads all metadata from a FLAC file into the chain.
FLAC__metadata_chain_read_ogg()
Reads all metadata from a OGG FLAC file into the chain.
Writes all metadata in the chain into the FLAC file. Read carefully the documentation of this function about the use of usePadding
and preserverFileStats
.
FLAC__metadata_chain_merge_padding()
Merge adjacent PADDING blocks into a single one.
FLAC__metadata_chain_sort_padding()
Moves all PADDING blocks to the end of the chain, and then merge them into a single block.
Tries to create a new Metadata Iterator and returns a Buffer
if succeeded, or null
if it failed.
FLAC__metadata_iterator_delete()
Deletes an instance of a Metadata Iterator created by bindings.metadata2.iterator_new(). Passing an invalid object could crash node or make unexpected things.
FLAC__metadata_iterator_init()
Initializes the iterator with the contents of the chain. But previously you must called any read functions (bindings.metadata2.chain_read() or bindings.metadata2.chain_read_ogg()).
FLAC__metadata_iterator_next()
Points the iterator to the next block, if there's more.
FLAC__metadata_iterator_prev()
Points the iterator to the previous block, if it's not in the beginning.
FLAC__metadata_iterator_get_block_type()
Get the type of the metadata block at the current position. The value can be converted to string using bindings.metadata.MetadataTypeString.
FLAC__metadata_iterator_get_block()
Returns the current metadata block. You can convert the reference to an js Object using bindings.metadata.convertToJsObject. But any changes you make on the js object will not be reflected in the chain, so you must save it with bindings.metadata2.iterator_set_block().
FLAC__metadata_iterator_set_block()
Replaces the current block by the one passed in metadata
. The object you pass must be created by this API, either by bindings.metadata2.iterator_get_block() or any functions in bindings.metadata section.
FLAC__metadata_iterator_delete_block()
Removes the current block (either by delete it or by replacing it with padding), and points to the previous block. The metadata block you pass must be created by the bindings.metadata functions or get by bindings.metadata2.iterator_get_block().
FLAC__metadata_iterator_insert_block_before()
Insert a new block before the current block. The metadata block you pass must be created by the bindings.metadata functions or get by bindings.metadata2.iterator_get_block().
FLAC__metadata_iterator_insert_block_after()
Insert a new block after the current block. The metadata block you pass must be created by the bindings.metadata functions or get by bindings.metadata2.iterator_get_block().
Given a String, returns the number value for the enum value for that string.
Given a Number, converts it into a String representation of the Chain Status.