media-export,engine-gst: Port to new GUPnP-DLNA
[profile/ivi/rygel.git] / src / media-engines / gstreamer / rygel-gst-media-engine.vala
index de7bfe8..a2d8722 100644 (file)
@@ -40,11 +40,17 @@ public class Rygel.GstMediaEngine : Rygel.MediaEngine {
         Gst.init (ref args);
         gst_preset_set_app_dir (PRESET_DIR);
 
-        var discoverer = new GUPnPDLNA.Discoverer ((ClockTime) SECOND,
-                                                   true,
-                                                   false);
+        /* Get the possible DLNA profiles
+         * to add to the list of DLNA profiles supported by
+         * this media engine, for get_dlna_profiles():
+         */
+        var discoverer = new GUPnPDLNA.ProfileGuesser (true, false);
         foreach (var profile in discoverer.list_profiles ()) {
             var p = new DLNAProfile (profile.name, profile.mime);
+
+            /* TODO: Check that we (via GStreamer) really support this profile
+             * instead of just claiming to support everything.
+             */
             this.dlna_profiles.prepend (p);
         }
         this.dlna_profiles.prepend (new DLNAProfile ("DIDL_S", "text/xml"));
@@ -54,6 +60,11 @@ public class Rygel.GstMediaEngine : Rygel.MediaEngine {
         var transcoding = true;
         var transcoder_list = new ArrayList<string> ();
 
+        /* Allow some transcoders to be disabled by the Rygel Server configuration.
+         * For instance, some DLNA Renderers might incorrectly prefer inferior transcoded formats,
+         * sometimes even preferring transcoded formats over the original data,
+         * so this forces them to use other formats.
+         */
         var config = MetaConfig.get_default ();
         try {
             transcoding = config.get_transcoding ();