[tracker/dlna-mime] NMM: Add property nmm:dlnaMime for dlna specific mimetypes tracker-extract-gstreamer: Add support fo
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/dlna-mime] NMM: Add property nmm:dlnaMime for dlna specific mimetypes tracker-extract-gstreamer: Add support fo
- Date: Fri, 19 Aug 2011 12:07:12 +0000 (UTC)
commit 182198b14adf113d62e0cd1d6a4d531821f7357e
Author: Mikael Ottela <mikael ottela ixonos com>
Date: Thu Aug 18 15:52:13 2011 +0300
NMM: Add property nmm:dlnaMime for dlna specific mimetypes
tracker-extract-gstreamer: Add support for dlnaMime
Fixes NB#246131, DLNA mime-types needed
data/ontologies/38-nmm.ontology | 9 ++++++++-
src/tracker-extract/tracker-extract-gstreamer.c | 9 +++++++++
2 files changed, 17 insertions(+), 1 deletions(-)
---
diff --git a/data/ontologies/38-nmm.ontology b/data/ontologies/38-nmm.ontology
index 732881e..ea3e6be 100644
--- a/data/ontologies/38-nmm.ontology
+++ b/data/ontologies/38-nmm.ontology
@@ -13,7 +13,7 @@
nmm: a tracker:Namespace, tracker:Ontology ;
tracker:prefix "nmm" ;
- nao:lastModified "2011-06-10T16:59:00Z" .
+ nao:lastModified "2011-08-19T13:05:00Z" .
nmm:MusicPiece a rdfs:Class ;
rdfs:label "Music" ;
@@ -530,6 +530,13 @@ nmm:dlnaProfile a rdf:Property ;
rdfs:domain nfo:Media ;
rdfs:range xsd:string .
+nmm:dlnaMime a rdf:Property ;
+ rdfs:label "DLNA mimetype" ;
+ rdfs:comment "Mimetypes as defined for DLNA (occasional differences compared to xdg-mime)" ;
+ nrl:maxCardinality 1 ;
+ rdfs:domain nfo:Media ;
+ rdfs:range xsd:string .
+
nmm:uPnPShared a rdf:Property ;
rdfs:label "uPnP shared" ;
rdfs:comment "Tells the uPnP MediaServer (e.g. Rygel) whether to export/share the resource or not" ;
diff --git a/src/tracker-extract/tracker-extract-gstreamer.c b/src/tracker-extract/tracker-extract-gstreamer.c
index c4311ab..ce240fa 100644
--- a/src/tracker-extract/tracker-extract-gstreamer.c
+++ b/src/tracker-extract/tracker-extract-gstreamer.c
@@ -131,6 +131,7 @@ typedef struct {
GUPnPDLNADiscoverer *discoverer;
GUPnPDLNAInformation *dlna_info;
const gchar *dlna_profile;
+ const gchar *dlna_mime;
#endif
#if defined(GSTREAMER_BACKEND_DISCOVERER) || \
@@ -854,6 +855,13 @@ common_extract_stream_metadata (MetadataExtractor *extractor,
} else {
g_debug ("No DLNA profile for file '%s'", uri);
}
+
+ if (extractor->dlna_mime) {
+ tracker_sparql_builder_predicate (metadata, "nmm:dlnaMime");
+ tracker_sparql_builder_object_string (metadata, extractor->dlna_mime);
+ } else {
+ g_debug ("No DLNA mime for file '%s'", uri);
+ }
#endif /* GSTREAMER_BACKEND_GUPNP_DLNA */
}
@@ -920,6 +928,7 @@ discoverer_init_and_run (MetadataExtractor *extractor,
/* Get DLNA profile */
extractor->dlna_profile = gupnp_dlna_information_get_name (extractor->dlna_info);
+ extractor->dlna_mime = gupnp_dlna_information_get_mime (extractor->dlna_info);
info = (GstDiscovererInfo *) gupnp_dlna_information_get_info (extractor->dlna_info);
#else /* GSTREAMER_BACKEND_GUPNP_DLNA */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]