GNOME Bugzilla – Bug 662748
tracker plugin: support multiple resources in a larger file
Last modified: 2012-04-03 16:03:01 UTC
Tracker 0.12.4 gained support for extracting each track from a single .FLAC file + CUE sheet. The offset of each track inside the file is returned in the nfo:audioOffset property. These patches add - support for situations where the nie:InformationElement (logical resource) and nie:DataObject (the file in which it is stored) are different resources. - GRL_METADATA_KEY_START_TIME, which maps to nfo:audioOffset
Created attachment 200011 [details] [review] core: Add GRL_METADATA_KEY_START_TIME This is used to specify the start offset of a logical resource inside a larger container, such as a track in a single-file rip of an entire CD.
Created attachment 200012 [details] [review] tracker: Support GRL_METADATA_KEY_START_TIME Indicates the offset of a logical resource inside the file that contains it.
Created attachment 200013 [details] [review] tracker: Don't assume InformationElement == DataObject Support situations where multiple logical resources are contained in one physical file. This allows us to support multiple audio files contained in one .FLAC file and indexed with a cue sheet, for example.
Hi, thanks for these patches. We'll be reviewing them soon.
I'm assuming this is missing a similar END_TIME property, no? Otherwise, you'll play a full album, a full album starting with track #2, etc.
Yes. I had commented this with Simon (IIRC), but I don't know why I didn't write it here. I see here two options: adding the END_TIME, as you mentioned, or relying on GRL_METADATA_KEY_LENGTH to know when to stop.
Can you see any issues with relying on GRL_METADATA_KEY_LENGTH? The invidual tracks are marked inside Tracker just using nie:audioOffset and nie:length, so it should all work fine at that end.
(In reply to comment #7) > Can you see any issues with relying on GRL_METADATA_KEY_LENGTH? The invidual > tracks are marked inside Tracker just using nie:audioOffset and nie:length, so > it should all work fine at that end. Actually, no issues I can figure out. I think we can start with the START_TIME and LENGTH. If we see later any issue, we can always add the END_TIME.
Review of attachment 200011 [details] [review]: I have added also the relationship with URL key: though it is not the case with the Tracker plugin (it doesn't handle multi-valued media), in theory it is possible to have the "track" in different files with different offsets. So better let's add the relationship.
Review of attachment 200012 [details] [review]: I've merged both parches in Tracker plugin
Review of attachment 200013 [details] [review]: I've merged both parches in Tracker plugin
Pushed in master and in 0.1.x branch. commit b0a56c0015d5c032848262b1efcc380b7303ab2e Author: Sam Thursfield <sam.thursfield@codethink.co.uk> Date: Tue Oct 25 17:36:57 2011 +0100 core: Add GRL_METADATA_KEY_START_TIME This is used to specify the start offset of a logical resource inside a larger container, such as a track in a single-file rip of an entire CD. https://bugzilla.gnome.org/show_bug.cgi?id=662748 Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com> doc/grilo/grilo-sections.txt | 2 ++ src/data/grl-media.c | 13 +++++++++++++ src/data/grl-media.h | 2 ++ src/grl-metadata-key.c | 14 ++++++++++++++ src/grl-metadata-key.h | 1 + 5 files changed, 32 insertions(+), 0 deletions(-) commit 05d14b13fa3deb1e02da77fb4bd6b871dedd6907 Author: Sam Thursfield <sam.thursfield@codethink.co.uk> Date: Tue Oct 25 18:44:47 2011 +0100 tracker: Support GRL_METADATA_KEY_START_TIME Indicates the offset of a logical resource inside the file that contains it. Support situations where multiple logical resources are contained in one physical file. This allows us to support multiple audio files contained in one .FLAC file and indexed with a cue sheet, for example. https://bugzilla.gnome.org/show_bug.cgi?id=662748 src/media/tracker/grl-tracker-media-api.c | 6 ++++-- src/media/tracker/grl-tracker-utils.c | 11 ++++++++--- 2 files changed, 12 insertions(+), 5 deletions(-)