[tracker/tracker-store] Added nfo:Audio to nmm:MusicPiece instances, compilation warning fixes
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: svn-commits-list gnome org
- Subject: [tracker/tracker-store] Added nfo:Audio to nmm:MusicPiece instances, compilation warning fixes
- Date: Mon, 29 Jun 2009 11:05:10 +0000 (UTC)
commit 01211d99860904eb24d5379bbab6872278d61bd5
Author: Philip Van Hoof <philip codeminded be>
Date: Mon Jun 29 13:04:40 2009 +0200
Added nfo:Audio to nmm:MusicPiece instances, compilation warning fixes
src/tracker-extract/tracker-extract-gstreamer.c | 4 ++++
src/tracker-extract/tracker-extract-libxine.c | 11 +++++++----
src/tracker-extract/tracker-extract-mp3.c | 8 ++++++--
src/tracker-extract/tracker-extract-mplayer.c | 9 +++++++--
src/tracker-extract/tracker-extract-totem.c | 8 ++++++--
src/tracker-extract/tracker-extract-vorbis.c | 8 ++++++--
6 files changed, 36 insertions(+), 12 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-gstreamer.c b/src/tracker-extract/tracker-extract-gstreamer.c
index 57c9432..067569c 100644
--- a/src/tracker-extract/tracker-extract-gstreamer.c
+++ b/src/tracker-extract/tracker-extract-gstreamer.c
@@ -942,6 +942,10 @@ extract_gstreamer_audio (const gchar *uri, TrackerSparqlBuilder *metadata)
RDF_TYPE,
NMM_PREFIX "MusicPiece");
+ tracker_statement_list_insert (metadata, uri,
+ RDF_TYPE,
+ NFO_PREFIX "Audio");
+
tracker_extract_gstreamer (uri, metadata, EXTRACT_MIME_AUDIO);
}
diff --git a/src/tracker-extract/tracker-extract-libxine.c b/src/tracker-extract/tracker-extract-libxine.c
index 08e7a8a..3582f0b 100644
--- a/src/tracker-extract/tracker-extract-libxine.c
+++ b/src/tracker-extract/tracker-extract-libxine.c
@@ -39,8 +39,8 @@
/* Take an absolute path to a file and fill a hashtable with metadata.
*/
-void
-tracker_extract_xine (gchar *uri, TrackerSparqlBuilder *metadata)
+static void
+tracker_extract_xine (const gchar *uri, TrackerSparqlBuilder *metadata)
{
xine_t *xine_base;
xine_audio_port_t *audio_port;
@@ -156,8 +156,11 @@ tracker_extract_xine (gchar *uri, TrackerSparqlBuilder *metadata)
}
} else if (has_audio) {
tracker_statement_list_insert (metadata, uri,
- RDF_TYPE,
- NMM_PREFIX "MusicPiece");
+ RDF_TYPE,
+ NMM_PREFIX "MusicPiece");
+ tracker_statement_list_insert (metadata, uri,
+ RDF_TYPE,
+ NFO_PREFIX "Audio");
} else {
tracker_statement_list_insert (metadata, uri,
RDF_TYPE,
diff --git a/src/tracker-extract/tracker-extract-mp3.c b/src/tracker-extract/tracker-extract-mp3.c
index bdb08b0..162fbf5 100644
--- a/src/tracker-extract/tracker-extract-mp3.c
+++ b/src/tracker-extract/tracker-extract-mp3.c
@@ -1769,8 +1769,12 @@ extract_mp3 (const gchar *uri,
g_free (id3v1_buffer);
tracker_statement_list_insert (metadata, uri,
- RDF_TYPE,
- NMM_PREFIX "MusicPiece");
+ RDF_TYPE,
+ NMM_PREFIX "MusicPiece");
+
+ tracker_statement_list_insert (metadata, uri,
+ RDF_TYPE,
+ NFO_PREFIX "Audio");
/* Get other embedded tags */
audio_offset = parse_id3v2 (buffer, buffer_size, uri, metadata, &filedata);
diff --git a/src/tracker-extract/tracker-extract-mplayer.c b/src/tracker-extract/tracker-extract-mplayer.c
index 5c2d8a7..cceb4ee 100644
--- a/src/tracker-extract/tracker-extract-mplayer.c
+++ b/src/tracker-extract/tracker-extract-mplayer.c
@@ -29,6 +29,7 @@
#include <libtracker-common/tracker-ontology.h>
#include <libtracker-common/tracker-os-dependant.h>
#include <libtracker-common/tracker-statement-list.h>
+#include <libtracker-common/tracker-utils.h>
#include "tracker-main.h"
@@ -272,8 +273,12 @@ extract_mplayer (const gchar *uri,
} else if (has_audio) {
tracker_statement_list_insert (metadata, uri,
- RDF_TYPE,
- NMM_PREFIX "MusicPiece");
+ RDF_TYPE,
+ NMM_PREFIX "MusicPiece");
+
+ tracker_statement_list_insert (metadata, uri,
+ RDF_TYPE,
+ NFO_PREFIX "Audio");
if (tmp_metadata_video) {
ForeachCopyInfo info = { metadata, uri };
diff --git a/src/tracker-extract/tracker-extract-totem.c b/src/tracker-extract/tracker-extract-totem.c
index 253c703..484b2a1 100644
--- a/src/tracker-extract/tracker-extract-totem.c
+++ b/src/tracker-extract/tracker-extract-totem.c
@@ -26,6 +26,7 @@
#include <libtracker-common/tracker-os-dependant.h>
#include <libtracker-common/tracker-statement-list.h>
#include <libtracker-common/tracker-ontology.h>
+#include <libtracker-common/tracker-utils.h>
#include "tracker-main.h"
@@ -112,8 +113,11 @@ extract_totem (const gchar *uri,
NMM_PREFIX "Video");
} else {
tracker_statement_list_insert (metadata, uri,
- RDF_TYPE,
- NMM_PREFIX "MusicPiece");
+ RDF_TYPE,
+ NMM_PREFIX "MusicPiece");
+ tracker_statement_list_insert (metadata, uri,
+ RDF_TYPE,
+ NFO_PREFIX "Audio");
}
}
}
diff --git a/src/tracker-extract/tracker-extract-vorbis.c b/src/tracker-extract/tracker-extract-vorbis.c
index a6c78c2..ac322a2 100644
--- a/src/tracker-extract/tracker-extract-vorbis.c
+++ b/src/tracker-extract/tracker-extract-vorbis.c
@@ -163,8 +163,12 @@ extract_vorbis (const char *uri,
if ((comment = ov_comment (&vf, -1)) != NULL) {
tracker_statement_list_insert (metadata, uri,
- RDF_TYPE,
- NMM_PREFIX "MusicPiece");
+ RDF_TYPE,
+ NMM_PREFIX "MusicPiece");
+
+ tracker_statement_list_insert (metadata, uri,
+ RDF_TYPE,
+ NFO_PREFIX "Audio");
for (i = 0; tags[i].name != NULL; i++) {
gchar *str;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]