media-export: Set dlna_profile on MediaExportItem
authorArun Raghavan <arun.raghavan@collabora.co.uk>
Wed, 21 Jul 2010 13:45:58 +0000 (14:45 +0100)
committerZeeshan Ali (Khattak) <zeeshanak@gnome.org>
Wed, 21 Jul 2010 19:23:30 +0000 (22:23 +0300)
Now that we have a DLNA profile/mime guessed by GUPnPDLNADiscoverer, we
can start using these if available (the fallback is to use the mime type
detected by glib).

src/plugins/media-export/rygel-media-export-item.vala
src/plugins/media-export/rygel-media-export-metadata-extractor.vala

index 8c341ec..6f5163b 100644 (file)
@@ -30,6 +30,8 @@ using Gst;
 public class Rygel.MediaExport.MediaExportItem : Rygel.MediaItem {
     private const string TAG_WIDTH = MetadataExtractor.TAG_RYGEL_WIDTH;
     private const string TAG_HEIGHT = MetadataExtractor.TAG_RYGEL_HEIGHT;
+    private const string
+    TAG_DLNA_PROFILE = MetadataExtractor.TAG_RYGEL_DLNA_PROFILE;
 
     public static MediaExportItem? create_from_taglist (MediaContainer parent,
                                                   File           file,
@@ -169,7 +171,7 @@ public class Rygel.MediaExport.MediaExportItem : Rygel.MediaItem {
             this.date = tv.to_iso8601 ();
         }
 
-
+        tag_list.get_string (TAG_DLNA_PROFILE, out this.dlna_profile);
         tag_list.get_string (MetadataExtractor.TAG_RYGEL_MIME,
                              out this.mime_type);
 
index 6e24de4..0263f73 100644 (file)
@@ -41,6 +41,7 @@ public class Rygel.MediaExport.MetadataExtractor: GLib.Object {
     public const string TAG_RYGEL_HEIGHT = "rygel-height";
     public const string TAG_RYGEL_DEPTH = "rygel-depth";
     public const string TAG_RYGEL_MTIME = "rygel-mtime";
+    public const string TAG_RYGEL_DLNA_PROFILE = "rygel-dlna-profile";
 
     /* Signals */
     public signal void extraction_done (File file, Gst.TagList tag_list);
@@ -81,6 +82,7 @@ public class Rygel.MediaExport.MetadataExtractor: GLib.Object {
         this.register_custom_tag (TAG_RYGEL_HEIGHT, typeof (int));
         this.register_custom_tag (TAG_RYGEL_DEPTH, typeof (int));
         this.register_custom_tag (TAG_RYGEL_MTIME, typeof (uint64));
+        this.register_custom_tag (TAG_RYGEL_DLNA_PROFILE, typeof (string));
 
         this.file_hash = new HashMap<string, File> ();