Rework tracker-cue-sheet to avoid GStreamer dependency
Currently tracker-cue-sheet.c is built around GstTagList. This means that we cannot easily enable cue sheet support with the ffmpeg/libav backend. Also, we cannot use the disc-generic extractor when ffmpeg/libav backend is enabled.
The current API is built around a TrackerToc
struct, which contains a list of TrackerTocEntry
. Each entry has a GstTagList
with metadata about the current entry. The GStreamer extractor calls tracker_cue_sheet_parse()
or tracker_cue_sheet_guess_from_uri()
once to get a TrackerToc instance.
I propose modifying the API as follows:
- TrackerToc becomes an opaque pointer, which can refer to a private struct containing the libcue
Cd *
pointer - new function
tracker_toc_get_total_tracks()
returns the number of available tracks - new function
tracker_toc_extract_album_disc()
returns a TrackerResource(nmm:AlbumDisc) with the toplevel CUE metadata applied - new function
tracker_toc_extract_track()
returns a TrackerResource(nmm:MusicPiece) with the track-specific CUE metadata applied
It's then up to the GStreamer extractor to apply any extra metadata from the GstTagList returned by GstDiscoverer.
This code also deals with GstDiscovererToc, so some cleverness (and extra testing) is needed to organise the code neatly.