[tracker/dlna-mime] NMM: Add property nmm:dlnaMime for dlna specific mimetypes tracker-extract-gstreamer: Add support fo
- From: Mikael Ottela <mottela 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: Thu, 18 Aug 2011 14:38:44 +0000 (UTC)
commit 027948c297d2278fbb0cdd7931780dfcdbd02dce
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 | 7 +++++++
src/tracker-extract/tracker-extract-gstreamer.c | 9 +++++++++
2 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/data/ontologies/38-nmm.ontology b/data/ontologies/38-nmm.ontology
index 732881e..379576a 100644
--- a/data/ontologies/38-nmm.ontology
+++ b/data/ontologies/38-nmm.ontology
@@ -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 219bd3e..94f5b47 100644
--- a/src/tracker-extract/tracker-extract-gstreamer.c
+++ b/src/tracker-extract/tracker-extract-gstreamer.c
@@ -143,6 +143,7 @@ typedef struct {
GUPnPDLNADiscoverer *discoverer;
GUPnPDLNAInformation *dlna_info;
const gchar *dlna_profile;
+ const gchar *dlna_mime;
#endif
#if defined(GSTREAMER_BACKEND_DISCOVERER) || \
@@ -868,6 +869,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 */
}
@@ -934,6 +942,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]