[rygel/wip/upload-profiles: 3/3] media-export: Limit upload support



commit c4eac6335aa6c28ad9c7ec33e0b46cc4bc438cbb
Author: Jens Georg <jensg openismus com>
Date:   Fri Aug 9 14:31:55 2013 +0200

    media-export: Limit upload support
    
    We try to filter profiles we know are problematic to handle such as
     - LPCM (raw binary blob)
     - MPEG_PS_* which need some ifo file handling/changing we don't support

 .../media-export/rygel-media-export-plugin.vala    |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/src/plugins/media-export/rygel-media-export-plugin.vala 
b/src/plugins/media-export/rygel-media-export-plugin.vala
index db05fdc..1b206df 100644
--- a/src/plugins/media-export/rygel-media-export-plugin.vala
+++ b/src/plugins/media-export/rygel-media-export-plugin.vala
@@ -119,4 +119,24 @@ public class Rygel.MediaExport.Plugin : Rygel.MediaServerPlugin {
               PluginCapabilities.UPLOAD |
               PluginCapabilities.TRACK_CHANGES);
     }
+
+    public override void constructed () {
+        base.constructed ();
+
+        var profiles = new GLib.List<DLNAProfile> ();
+
+        // Filter profiles we don't support
+        foreach (var profile in this.supported_profiles) {
+            if (profile.name.has_prefix ("MPEG_PS") ||
+                profile.name == "LPCM") {
+                continue;
+            }
+
+            profiles.prepend (profile);
+        }
+
+        profiles.reverse ();
+
+        this.upload_profiles = profiles;
+    }
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]