GNOME Bugzilla – Bug 679490
[flacparse] TOC support
Last modified: 2012-07-06 10:48:47 UTC
Created attachment 218147 [details] [review] flacparse: add TOC support Needed add TOC support in flac format. First step - add TOC in flacparse. See and comment patch in attachment. Of course flac can contain several INDEX in TRACK. In my mind one TRACK - one chapter in TOC. That reason, because start time for chapter is taken from first INDEX. Stop time = start time next TRACK or lead-out track if current track last. If I'm wrong, then let me know. :)
Great, but let's use the existing bug for this. Also, please ditch the top-level 'edition' entry, and use TRACK entries rather than CHAPTER entries. *** This bug has been marked as a duplicate of bug 540891 ***
Review of attachment 218147 [details] [review]: Looks good in general, thanks :) ::: gst/audioparsers/gstflacparse.c @@ +991,3 @@ + + /* skip 4 bytes METADATA_BLOCK_HEADER + 395 bytes from CUESHEET_TRACK */ + if (!gst_byte_reader_skip (&reader, 399)) Maybe say here what these 395 bytes are (link to the spec in a comment). And the media catalog number should be put into a tag @@ +994,3 @@ + goto error; + + if (!gst_byte_reader_get_uint8 (&reader, &tracks)) Better call the variable n_tracks to make it more obvious that ti's the number of tracks @@ +1004,3 @@ + goto error; + + if (!gst_byte_reader_skip (&reader, 26)) Say what these 26 bytes are. Also the ISRC should be put in a tag I guess @@ +1012,3 @@ + /* add chapters in cuesheet edition */ + /* lead-out tack has number 170 */ + if (track_num != 170) { 255 is lead-out too
Created attachment 218167 [details] [review] flacparse: add TOC support Sebastian, thanks for you review. All fixed. For get ASCII using memcpy, maybe I wrong with this.
Created attachment 218168 [details] [review] flacparse: add TOC support Oops, wrong with allocate memory for tags. Sorry.
Still creates an edition. Still creates chapter entries. And please attach further patches to bug #540891.
Will be fixed soon and posted to bug #540891. :)