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 662748 - tracker plugin: support multiple resources in a larger file
tracker plugin: support multiple resources in a larger file
Status: RESOLVED FIXED
Product: grilo
Classification: Other
Component: plugins
git master
Other Linux
: Normal enhancement
: ---
Assigned To: grilo-maint
grilo-maint
Depends on:
Blocks:
 
 
Reported: 2011-10-26 09:38 UTC by Sam Thursfield
Modified: 2012-04-03 16:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
core: Add GRL_METADATA_KEY_START_TIME (4.07 KB, patch)
2011-10-26 09:39 UTC, Sam Thursfield
committed Details | Review
tracker: Support GRL_METADATA_KEY_START_TIME (1.11 KB, patch)
2011-10-26 09:39 UTC, Sam Thursfield
committed Details | Review
tracker: Don't assume InformationElement == DataObject (2.83 KB, patch)
2011-10-26 09:39 UTC, Sam Thursfield
committed Details | Review

Description Sam Thursfield 2011-10-26 09:38:37 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
Comment 1 Sam Thursfield 2011-10-26 09:39:23 UTC
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.
Comment 2 Sam Thursfield 2011-10-26 09:39:45 UTC
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.
Comment 3 Sam Thursfield 2011-10-26 09:39:55 UTC
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.
Comment 4 Simon Pena 2011-10-27 08:03:46 UTC
Hi, thanks for these patches. We'll be reviewing them soon.
Comment 5 Bastien Nocera 2012-03-27 15:19:43 UTC
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.
Comment 6 Juan A. Suarez Romero 2012-03-27 15:43:06 UTC
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.
Comment 7 Sam Thursfield 2012-03-27 16:11:01 UTC
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.
Comment 8 Juan A. Suarez Romero 2012-03-27 16:28:49 UTC
(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.
Comment 9 Juan A. Suarez Romero 2012-04-03 16:00:08 UTC
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.
Comment 10 Juan A. Suarez Romero 2012-04-03 16:00:55 UTC
Review of attachment 200012 [details] [review]:

I've merged both parches in Tracker plugin
Comment 11 Juan A. Suarez Romero 2012-04-03 16:01:19 UTC
Review of attachment 200013 [details] [review]:

I've merged both parches in Tracker plugin
Comment 12 Juan A. Suarez Romero 2012-04-03 16:03:01 UTC
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(-)