chocolate42 / flaccid

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Option to preserve metadata from flac input. Requires appropriate FLAC__stream_decoder_set_metadata_*() calls and grabbing relevant metadata blocks from metadata callback.

chocolate42 opened this issue · comments

  • Want to preserve FLAC__METADATA_TYPE_APPLICATION, FLAC__METADATA_TYPE_VORBIS_COMMENT, FLAC__METADATA_TYPE_CUESHEET, FLAC__METADATA_TYPE_PICTURE, FLAC__METADATA_TYPE_UNDEFINED
  • Metadata callback doesn't return the raw block, instead returning formatted structs per metadata type. It looks like the only solution is to recreate the block from those structs? edit: Could have libflac also return the raw block, but as libflac reads piecemeal and never has the raw block itself it's as much if not more of a pain to do that way.

https://xiph.org/flac/api/group__flac__format.html

  • Split current input_fopen function into _init and _metadata, or move seektable+metadata_writing into it and rename into something more appropriate
  • If output* is in input* struct then we can write preserved metadata blocks as they are encountered, by far the cleanest way to do it as some metadata blocks can be present multiple times
  • is_last flag needs to work with/without seektable and with/without preserved metadata