[tracker] tracker-extract: Fixed OGG contact SPARQL generation, use preupdate
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] tracker-extract: Fixed OGG contact SPARQL generation, use preupdate
- Date: Wed, 31 Mar 2010 19:40:37 +0000 (UTC)
commit e632cca4d333ce3dfe133bd249d05d130e18acc8
Author: Martyn Russell <martyn lanedo com>
Date: Wed Mar 31 19:56:09 2010 +0100
tracker-extract: Fixed OGG contact SPARQL generation, use preupdate
src/tracker-extract/tracker-extract-vorbis.c | 355 +++++++++++++-------------
1 files changed, 183 insertions(+), 172 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-vorbis.c b/src/tracker-extract/tracker-extract-vorbis.c
index b3d0af3..c69aaa6 100644
--- a/src/tracker-extract/tracker-extract-vorbis.c
+++ b/src/tracker-extract/tracker-extract-vorbis.c
@@ -34,24 +34,46 @@
#include <libtracker-extract/tracker-extract.h>
-static void extract_vorbis (const char *uri,
- TrackerSparqlBuilder *preupdate,
- TrackerSparqlBuilder *metadata);
-
-
typedef struct {
gchar *creator;
-} VorbisNeedsMergeData;
+} MergeData;
typedef struct {
- gchar *title,*artist,*album,*albumartist, *trackcount, *tracknumber,
- *DiscNo, *Performer, *TrackGain, *TrackPeakGain, *AlbumGain,
- *AlbumPeakGain, *date, *comment, *genre, *Codec, *CodecVersion,
- *Samplerate ,*Channels, *MBAlbumID, *MBArtistID, *MBAlbumArtistID,
- *MBTrackID, *Lyrics, *Copyright, *License, *Organization, *Location,
- *Publisher;
+ gchar *title;
+ gchar *artist;
+ gchar *album;
+ gchar *album_artist;
+ gchar *track_count;
+ gchar *track_number;
+ gchar *disc_number;
+ gchar *performer;
+ gchar *track_gain;
+ gchar *track_peak_gain;
+ gchar *album_gain;
+ gchar *album_peak_gain;
+ gchar *date;
+ gchar *comment;
+ gchar *genre;
+ gchar *codec;
+ gchar *codec_version;
+ gchar *sample_rate;
+ gchar *channels;
+ gchar *mb_album_id;
+ gchar *mb_artist_id;
+ gchar *mb_album_artist_id;
+ gchar *mb_track_id;
+ gchar *lyrics;
+ gchar *copyright;
+ gchar *license;
+ gchar *organization;
+ gchar *location;
+ gchar *publisher;
} VorbisData;
+static void extract_vorbis (const char *uri,
+ TrackerSparqlBuilder *preupdate,
+ TrackerSparqlBuilder *metadata);
+
static TrackerExtractData extract_data[] = {
{ "audio/x-vorbis+ogg", extract_vorbis },
{ "application/ogg", extract_vorbis },
@@ -80,16 +102,15 @@ extract_vorbis (const char *uri,
TrackerSparqlBuilder *preupdate,
TrackerSparqlBuilder *metadata)
{
- FILE *f;
+ VorbisData vd = { 0 };
+ MergeData md = { 0 };
+ FILE *f;
+ gchar *filename;
OggVorbis_File vf;
vorbis_comment *comment;
- vorbis_info *vi;
- unsigned int bitrate;
- gint time;
- gchar *filename;
- VorbisData vorbis_data = { 0 };
- VorbisNeedsMergeData merge_data = { 0 };
- gchar *artist_uri = NULL, *album_uri = NULL;
+ vorbis_info *vi;
+ unsigned int bitrate;
+ gint time;
filename = g_filename_from_uri (uri, NULL, NULL);
f = tracker_file_open (filename, "r", FALSE);
@@ -104,293 +125,292 @@ extract_vorbis (const char *uri,
return;
}
+ tracker_sparql_builder_predicate (metadata, "a");
+ tracker_sparql_builder_object (metadata, "nmm:MusicPiece");
+ tracker_sparql_builder_object (metadata, "nfo:Audio");
+
if ((comment = ov_comment (&vf, -1)) != NULL) {
gchar *date;
- vorbis_data.title = ogg_get_comment (comment, "title");
- vorbis_data.artist = ogg_get_comment (comment, "artist");
- vorbis_data.album = ogg_get_comment (comment, "album");
- vorbis_data.albumartist = ogg_get_comment (comment, "albumartist");
- vorbis_data.trackcount = ogg_get_comment (comment, "trackcount");
- vorbis_data.tracknumber = ogg_get_comment (comment, "tracknumber");
- vorbis_data.DiscNo = ogg_get_comment (comment, "DiscNo");
- vorbis_data.Performer = ogg_get_comment (comment, "Performer");
- vorbis_data.TrackGain = ogg_get_comment (comment, "TrackGain");
- vorbis_data.TrackPeakGain = ogg_get_comment (comment, "TrackPeakGain");
- vorbis_data.AlbumGain = ogg_get_comment (comment, "AlbumGain");
- vorbis_data.AlbumPeakGain = ogg_get_comment (comment, "AlbumPeakGain");
+
+ vd.title = ogg_get_comment (comment, "title");
+ vd.artist = ogg_get_comment (comment, "artist");
+ vd.album = ogg_get_comment (comment, "album");
+ vd.album_artist = ogg_get_comment (comment, "albumartist");
+ vd.track_count = ogg_get_comment (comment, "trackcount");
+ vd.track_number = ogg_get_comment (comment, "tracknumber");
+ vd.disc_number = ogg_get_comment (comment, "DiscNo");
+ vd.performer = ogg_get_comment (comment, "Performer");
+ vd.track_gain = ogg_get_comment (comment, "TrackGain");
+ vd.track_peak_gain = ogg_get_comment (comment, "TrackPeakGain");
+ vd.album_gain = ogg_get_comment (comment, "AlbumGain");
+ vd.album_peak_gain = ogg_get_comment (comment, "AlbumPeakGain");
+
date = ogg_get_comment (comment, "date");
- vorbis_data.date = tracker_date_guess (date);
+ vd.date = tracker_date_guess (date);
g_free (date);
- vorbis_data.comment = ogg_get_comment (comment, "comment");
- vorbis_data.genre = ogg_get_comment (comment, "genre");
- vorbis_data.Codec = ogg_get_comment (comment, "Codec");
- vorbis_data.CodecVersion = ogg_get_comment (comment, "CodecVersion");
- vorbis_data.Samplerate = ogg_get_comment (comment, "SampleRate");
- vorbis_data.Channels = ogg_get_comment (comment, "Channels");
- vorbis_data.MBAlbumID = ogg_get_comment (comment, "MBAlbumID");
- vorbis_data.MBArtistID = ogg_get_comment (comment, "MBArtistID");
- vorbis_data.MBAlbumArtistID = ogg_get_comment (comment, "MBAlbumArtistID");
- vorbis_data.MBTrackID = ogg_get_comment (comment, "MBTrackID");
- vorbis_data.Lyrics = ogg_get_comment (comment, "Lyrics");
- vorbis_data.Copyright = ogg_get_comment (comment, "Copyright");
- vorbis_data.License = ogg_get_comment (comment, "License");
- vorbis_data.Organization = ogg_get_comment (comment, "Organization");
- vorbis_data.Location = ogg_get_comment (comment, "Location");
- vorbis_data.Publisher = ogg_get_comment (comment, "Publisher");
+
+ vd.comment = ogg_get_comment (comment, "comment");
+ vd.genre = ogg_get_comment (comment, "genre");
+ vd.codec = ogg_get_comment (comment, "Codec");
+ vd.codec_version = ogg_get_comment (comment, "CodecVersion");
+ vd.sample_rate = ogg_get_comment (comment, "SampleRate");
+ vd.channels = ogg_get_comment (comment, "Channels");
+ vd.mb_album_id = ogg_get_comment (comment, "MBAlbumID");
+ vd.mb_artist_id = ogg_get_comment (comment, "MBArtistID");
+ vd.mb_album_artist_id = ogg_get_comment (comment, "MBAlbumArtistID");
+ vd.mb_track_id = ogg_get_comment (comment, "MBTrackID");
+ vd.lyrics = ogg_get_comment (comment, "Lyrics");
+ vd.copyright = ogg_get_comment (comment, "Copyright");
+ vd.license = ogg_get_comment (comment, "License");
+ vd.organization = ogg_get_comment (comment, "Organization");
+ vd.location = ogg_get_comment (comment, "Location");
+ vd.publisher = ogg_get_comment (comment, "Publisher");
vorbis_comment_clear (comment);
}
- merge_data.creator = tracker_coalesce (3, vorbis_data.artist,
- vorbis_data.albumartist,
- vorbis_data.Performer);
+ md.creator = tracker_coalesce (3, vd.artist, vd.album_artist, vd.performer);
- if (merge_data.creator) {
- artist_uri = tracker_uri_printf_escaped ("urn:artist:%s", merge_data.creator);
+ if (md.creator) {
+ gchar *uri = tracker_uri_printf_escaped ("urn:artist:%s", md.creator);
tracker_sparql_builder_insert_open (preupdate, NULL);
-
- tracker_sparql_builder_subject_iri (preupdate, artist_uri);
+ tracker_sparql_builder_subject_iri (preupdate, uri);
tracker_sparql_builder_predicate (preupdate, "a");
tracker_sparql_builder_object (preupdate, "nmm:Artist");
tracker_sparql_builder_predicate (preupdate, "nmm:artistName");
- tracker_sparql_builder_object_unvalidated (preupdate, merge_data.creator);
-
+ tracker_sparql_builder_object_unvalidated (preupdate, md.creator);
tracker_sparql_builder_insert_close (preupdate);
+ g_free (md.creator);
- g_free (merge_data.creator);
+ tracker_sparql_builder_predicate (metadata, "nmm:performer");
+ tracker_sparql_builder_object_iri (metadata, uri);
+ g_free (uri);
}
- if (vorbis_data.album) {
- album_uri = tracker_uri_printf_escaped ("urn:album:%s", vorbis_data.album);
+ if (vd.album) {
+ gchar *uri = tracker_uri_printf_escaped ("urn:album:%s", vd.album);
tracker_sparql_builder_insert_open (preupdate, NULL);
-
- tracker_sparql_builder_subject_iri (preupdate, album_uri);
+ tracker_sparql_builder_subject_iri (preupdate, uri);
tracker_sparql_builder_predicate (preupdate, "a");
tracker_sparql_builder_object (preupdate, "nmm:MusicAlbum");
tracker_sparql_builder_predicate (preupdate, "nmm:albumTitle");
- tracker_sparql_builder_object_unvalidated (preupdate, vorbis_data.album);
-
+ tracker_sparql_builder_object_unvalidated (preupdate, vd.album);
tracker_sparql_builder_insert_close (preupdate);
+ g_free (vd.album);
- if (vorbis_data.trackcount) {
+ if (vd.track_count) {
tracker_sparql_builder_delete_open (preupdate, NULL);
- tracker_sparql_builder_subject_iri (preupdate, album_uri);
+ tracker_sparql_builder_subject_iri (preupdate, uri);
tracker_sparql_builder_predicate (preupdate, "nmm:albumTrackCount");
tracker_sparql_builder_object_variable (preupdate, "unknown");
tracker_sparql_builder_delete_close (preupdate);
tracker_sparql_builder_where_open (preupdate);
- tracker_sparql_builder_subject_iri (preupdate, album_uri);
+ tracker_sparql_builder_subject_iri (preupdate, uri);
tracker_sparql_builder_predicate (preupdate, "nmm:albumTrackCount");
tracker_sparql_builder_object_variable (preupdate, "unknown");
tracker_sparql_builder_where_close (preupdate);
tracker_sparql_builder_insert_open (preupdate, NULL);
- tracker_sparql_builder_subject_iri (preupdate, album_uri);
+ tracker_sparql_builder_subject_iri (preupdate, uri);
tracker_sparql_builder_predicate (preupdate, "nmm:albumTrackCount");
- tracker_sparql_builder_object_unvalidated (preupdate, vorbis_data.trackcount);
+ tracker_sparql_builder_object_unvalidated (preupdate, vd.track_count);
tracker_sparql_builder_insert_close (preupdate);
}
- if (vorbis_data.AlbumGain) {
+ if (vd.album_gain) {
tracker_sparql_builder_delete_open (preupdate, NULL);
- tracker_sparql_builder_subject_iri (preupdate, album_uri);
+ tracker_sparql_builder_subject_iri (preupdate, uri);
tracker_sparql_builder_predicate (preupdate, "nmm:albumGain");
tracker_sparql_builder_object_variable (preupdate, "unknown");
tracker_sparql_builder_delete_close (preupdate);
tracker_sparql_builder_where_open (preupdate);
- tracker_sparql_builder_subject_iri (preupdate, album_uri);
+ tracker_sparql_builder_subject_iri (preupdate, uri);
tracker_sparql_builder_predicate (preupdate, "nmm:albumGain");
tracker_sparql_builder_object_variable (preupdate, "unknown");
tracker_sparql_builder_where_close (preupdate);
tracker_sparql_builder_insert_open (preupdate, NULL);
- tracker_sparql_builder_subject_iri (preupdate, album_uri);
+ tracker_sparql_builder_subject_iri (preupdate, uri);
tracker_sparql_builder_predicate (preupdate, "nmm:albumGain");
- tracker_sparql_builder_object_double (preupdate, atof (vorbis_data.AlbumGain));
+ tracker_sparql_builder_object_double (preupdate, atof (vd.album_gain));
tracker_sparql_builder_insert_close (preupdate);
}
- if (vorbis_data.AlbumPeakGain) {
+ if (vd.album_peak_gain) {
tracker_sparql_builder_delete_open (preupdate, NULL);
- tracker_sparql_builder_subject_iri (preupdate, album_uri);
+ tracker_sparql_builder_subject_iri (preupdate, uri);
tracker_sparql_builder_predicate (preupdate, "nmm:albumPeakGain");
tracker_sparql_builder_object_variable (preupdate, "unknown");
tracker_sparql_builder_delete_close (preupdate);
tracker_sparql_builder_where_open (preupdate);
- tracker_sparql_builder_subject_iri (preupdate, album_uri);
+ tracker_sparql_builder_subject_iri (preupdate, uri);
tracker_sparql_builder_predicate (preupdate, "nmm:albumPeakGain");
tracker_sparql_builder_object_variable (preupdate, "unknown");
tracker_sparql_builder_where_close (preupdate);
tracker_sparql_builder_insert_open (preupdate, NULL);
- tracker_sparql_builder_subject_iri (preupdate, album_uri);
+ tracker_sparql_builder_subject_iri (preupdate, uri);
tracker_sparql_builder_predicate (preupdate, "nmm:albumPeakGain");
- tracker_sparql_builder_object_double (preupdate, atof (vorbis_data.AlbumPeakGain));
+ tracker_sparql_builder_object_double (preupdate, atof (vd.album_peak_gain));
tracker_sparql_builder_insert_close (preupdate);
}
- if (vorbis_data.DiscNo) {
+ if (vd.disc_number) {
tracker_sparql_builder_delete_open (preupdate, NULL);
- tracker_sparql_builder_subject_iri (preupdate, album_uri);
+ tracker_sparql_builder_subject_iri (preupdate, uri);
tracker_sparql_builder_predicate (preupdate, "nmm:setNumber");
tracker_sparql_builder_object_variable (preupdate, "unknown");
tracker_sparql_builder_delete_close (preupdate);
tracker_sparql_builder_where_open (preupdate);
- tracker_sparql_builder_subject_iri (preupdate, album_uri);
+ tracker_sparql_builder_subject_iri (preupdate, uri);
tracker_sparql_builder_predicate (preupdate, "nmm:setNumber");
tracker_sparql_builder_object_variable (preupdate, "unknown");
tracker_sparql_builder_where_close (preupdate);
tracker_sparql_builder_insert_open (preupdate, NULL);
- tracker_sparql_builder_subject_iri (preupdate, album_uri);
+ tracker_sparql_builder_subject_iri (preupdate, uri);
tracker_sparql_builder_predicate (preupdate, "nmm:setNumber");
- tracker_sparql_builder_object_int64 (preupdate, atoi (vorbis_data.DiscNo));
+ tracker_sparql_builder_object_int64 (preupdate, atoi (vd.disc_number));
tracker_sparql_builder_insert_close (preupdate);
}
- g_free (vorbis_data.album);
- }
-
- g_free (vorbis_data.trackcount);
- g_free (vorbis_data.AlbumPeakGain);
- g_free (vorbis_data.AlbumGain);
- g_free (vorbis_data.DiscNo);
- tracker_sparql_builder_predicate (metadata, "a");
- tracker_sparql_builder_object (metadata, "nmm:MusicPiece");
- tracker_sparql_builder_object (metadata, "nfo:Audio");
-
- tracker_sparql_builder_predicate (metadata, "nmm:performer");
- tracker_sparql_builder_object_unvalidated (metadata, artist_uri);
+ tracker_sparql_builder_predicate (metadata, "nmm:musicAlbum");
+ tracker_sparql_builder_object_iri (metadata, uri);
+ g_free (uri);
+ }
- tracker_sparql_builder_predicate (metadata, "nmm:musicAlbum");
- tracker_sparql_builder_object_unvalidated (metadata, album_uri);
+ g_free (vd.track_count);
+ g_free (vd.album_peak_gain);
+ g_free (vd.album_gain);
+ g_free (vd.disc_number);
- if (vorbis_data.title) {
+ if (vd.title) {
tracker_sparql_builder_predicate (metadata, "nie:title");
- tracker_sparql_builder_object_unvalidated (metadata, vorbis_data.title);
- g_free (vorbis_data.title);
+ tracker_sparql_builder_object_unvalidated (metadata, vd.title);
+ g_free (vd.title);
}
- if (vorbis_data.tracknumber) {
+ if (vd.track_number) {
tracker_sparql_builder_predicate (metadata, "nmm:trackNumber");
- tracker_sparql_builder_object_unvalidated (metadata, vorbis_data.tracknumber);
- g_free (vorbis_data.tracknumber);
+ tracker_sparql_builder_object_unvalidated (metadata, vd.track_number);
+ g_free (vd.track_number);
}
- if (vorbis_data.TrackGain) {
- /* tracker_statement_list_insert (metadata, uri, _PREFIX "", vorbis_data.); */
- g_free (vorbis_data.TrackGain);
+ if (vd.track_gain) {
+ /* TODO */
+ g_free (vd.track_gain);
}
- if (vorbis_data.TrackPeakGain) {
- /* tracker_statement_list_insert (metadata, uri, _PREFIX "", vorbis_data.); */
- g_free (vorbis_data.TrackPeakGain);
+
+ if (vd.track_peak_gain) {
+ /* TODO */
+ g_free (vd.track_peak_gain);
}
- if (vorbis_data.comment) {
+ if (vd.comment) {
tracker_sparql_builder_predicate (metadata, "nie:comment");
- tracker_sparql_builder_object_unvalidated (metadata, vorbis_data.comment);
- g_free (vorbis_data.comment);
+ tracker_sparql_builder_object_unvalidated (metadata, vd.comment);
+ g_free (vd.comment);
}
- if (vorbis_data.date) {
+ if (vd.date) {
tracker_sparql_builder_predicate (metadata, "nie:contentCreated");
- tracker_sparql_builder_object_unvalidated (metadata, vorbis_data.date);
- g_free (vorbis_data.date);
+ tracker_sparql_builder_object_unvalidated (metadata, vd.date);
+ g_free (vd.date);
}
- if (vorbis_data.genre) {
+ if (vd.genre) {
tracker_sparql_builder_predicate (metadata, "nfo:genre");
- tracker_sparql_builder_object_unvalidated (metadata, vorbis_data.genre);
- g_free (vorbis_data.genre);
+ tracker_sparql_builder_object_unvalidated (metadata, vd.genre);
+ g_free (vd.genre);
}
- if (vorbis_data.Codec) {
+ if (vd.codec) {
tracker_sparql_builder_predicate (metadata, "nfo:codec");
- tracker_sparql_builder_object_unvalidated (metadata, vorbis_data.Codec);
- g_free (vorbis_data.Codec);
+ tracker_sparql_builder_object_unvalidated (metadata, vd.codec);
+ g_free (vd.codec);
}
- if (vorbis_data.CodecVersion) {
- /* tracker_statement_list_insert (metadata, uri, _PREFIX "", vorbis_data.); */
- g_free (vorbis_data.CodecVersion);
+ if (vd.codec_version) {
+ /* TODO */
+ g_free (vd.codec_version);
}
- if (vorbis_data.Samplerate) {
+ if (vd.sample_rate) {
tracker_sparql_builder_predicate (metadata, "nfo:sampleRate");
- tracker_sparql_builder_object_unvalidated (metadata, vorbis_data.Samplerate);
- g_free (vorbis_data.Samplerate);
+ tracker_sparql_builder_object_unvalidated (metadata, vd.sample_rate);
+ g_free (vd.sample_rate);
}
- if (vorbis_data.Channels) {
+ if (vd.channels) {
tracker_sparql_builder_predicate (metadata, "nfo:channels");
- tracker_sparql_builder_object_unvalidated (metadata, vorbis_data.Channels);
- g_free (vorbis_data.Channels);
+ tracker_sparql_builder_object_unvalidated (metadata, vd.channels);
+ g_free (vd.channels);
}
- if (vorbis_data.MBAlbumID) {
- /* tracker_statement_list_insert (metadata, uri, _PREFIX "", vorbis_data.MBAlbumID); */
- g_free (vorbis_data.MBAlbumID);
+ if (vd.mb_album_id) {
+ /* TODO */
+ g_free (vd.mb_album_id);
}
- if (vorbis_data.MBArtistID) {
- /* tracker_statement_list_insert (metadata, uri, _PREFIX "", vorbis_data.MBArtistID); */
- g_free (vorbis_data.MBArtistID);
+ if (vd.mb_artist_id) {
+ /* TODO */
+ g_free (vd.mb_artist_id);
}
- if (vorbis_data.MBAlbumArtistID) {
- /* tracker_statement_list_insert (metadata, uri, _PREFIX "", vorbis_data.MBAlbumArtistID); */
- g_free (vorbis_data.MBAlbumArtistID);
+ if (vd.mb_album_artist_id) {
+ /* TODO */
+ g_free (vd.mb_album_artist_id);
}
- if (vorbis_data.MBTrackID) {
- /* tracker_statement_list_insert (metadata, uri, _PREFIX "", vorbis_data.MBTrackID); */
- g_free (vorbis_data.MBTrackID);
+ if (vd.mb_track_id) {
+ /* TODO */
+ g_free (vd.mb_track_id);
}
- if (vorbis_data.Lyrics) {
+ if (vd.lyrics) {
tracker_sparql_builder_predicate (metadata, "nie:plainTextContent");
- tracker_sparql_builder_object_unvalidated (metadata, vorbis_data.Lyrics);
- g_free (vorbis_data.Lyrics);
+ tracker_sparql_builder_object_unvalidated (metadata, vd.lyrics);
+ g_free (vd.lyrics);
}
- if (vorbis_data.Copyright) {
+ if (vd.copyright) {
tracker_sparql_builder_predicate (metadata, "nie:copyright");
- tracker_sparql_builder_object_unvalidated (metadata, vorbis_data.Copyright);
- g_free (vorbis_data.Copyright);
+ tracker_sparql_builder_object_unvalidated (metadata, vd.copyright);
+ g_free (vd.copyright);
}
- if (vorbis_data.License) {
+ if (vd.license) {
tracker_sparql_builder_predicate (metadata, "nie:license");
- tracker_sparql_builder_object_unvalidated (metadata, vorbis_data.License);
- g_free (vorbis_data.License);
+ tracker_sparql_builder_object_unvalidated (metadata, vd.license);
+ g_free (vd.license);
}
- if (vorbis_data.Organization) {
- /* tracker_statement_list_insert (metadata, uri, _PREFIX "", vorbis_data.Organization); */
- g_free (vorbis_data.Organization);
+ if (vd.organization) {
+ /* TODO */
+ g_free (vd.organization);
}
- if (vorbis_data.Location) {
- /* tracker_statement_list_insert (metadata, uri, _PREFIX "", vorbis_data.Location); */
- g_free (vorbis_data.Location);
+ if (vd.location) {
+ /* TODO */
+ g_free (vd.location);
}
- if (vorbis_data.Publisher) {
+ if (vd.publisher) {
tracker_sparql_builder_predicate (metadata, "dc:publisher");
tracker_sparql_builder_object_blank_open (metadata);
@@ -398,9 +418,9 @@ extract_vorbis (const char *uri,
tracker_sparql_builder_object (metadata, "nco:Contact");
tracker_sparql_builder_predicate (metadata, "nco:fullname");
- tracker_sparql_builder_object_unvalidated (metadata, vorbis_data.Publisher);
+ tracker_sparql_builder_object_unvalidated (metadata, vd.publisher);
tracker_sparql_builder_object_blank_close (metadata);
- g_free (vorbis_data.Publisher);
+ g_free (vd.publisher);
}
if ((vi = ov_info (&vf, 0)) != NULL ) {
@@ -408,12 +428,6 @@ extract_vorbis (const char *uri,
tracker_sparql_builder_predicate (metadata, "nfo:averageBitrate");
tracker_sparql_builder_object_int64 (metadata, (gint64) bitrate);
-
- /*
- tracker_statement_list_insert_with_int (metadata, uri, "Audio.CodecVersion", vi->version);
- tracker_statement_list_insert_with_int (metadata, uri, NFO_PREFIX "channels", vi->channels);
- tracker_statement_list_insert_with_int (metadata, uri, NFO_PREFIX "sampleRate", vi->rate);
- */
}
/* Duration */
@@ -424,9 +438,6 @@ extract_vorbis (const char *uri,
/* NOTE: This calls fclose on the file */
ov_clear (&vf);
-
- g_free (artist_uri);
- g_free (album_uri);
}
TrackerExtractData *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]