After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 679490 - [flacparse] TOC support
[flacparse] TOC support
Status: RESOLVED DUPLICATE of bug 540891
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal enhancement
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-07-06 04:08 UTC by Anton Belka
Modified: 2012-07-06 10:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
flacparse: add TOC support (5.89 KB, patch)
2012-07-06 04:08 UTC, Anton Belka
reviewed Details | Review
flacparse: add TOC support (7.00 KB, patch)
2012-07-06 10:26 UTC, Anton Belka
none Details | Review
flacparse: add TOC support (7.05 KB, patch)
2012-07-06 10:28 UTC, Anton Belka
none Details | Review

Description Anton Belka 2012-07-06 04:08:55 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. :)
Comment 1 Tim-Philipp Müller 2012-07-06 07:44:47 UTC
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 ***
Comment 2 Sebastian Dröge (slomo) 2012-07-06 08:05:14 UTC
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
Comment 3 Anton Belka 2012-07-06 10:26:08 UTC
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.
Comment 4 Anton Belka 2012-07-06 10:28:43 UTC
Created attachment 218168 [details] [review]
flacparse: add TOC support

Oops, wrong with allocate memory for tags. Sorry.
Comment 5 Tim-Philipp Müller 2012-07-06 10:32:10 UTC
Still creates an edition. Still creates chapter entries. And please attach further patches to bug #540891.
Comment 6 Anton Belka 2012-07-06 10:48:47 UTC
Will be fixed soon and posted to bug #540891. :)