rygel r404 - trunk/src/rygel



Author: zeeshanak
Date: Mon Dec 29 16:09:56 2008
New Revision: 404
URL: http://svn.gnome.org/viewvc/rygel?rev=404&view=rev

Log:
Refactor get_rtp_depayloader().

Modified:
   trunk/src/rygel/rygel-gst-stream.vala

Modified: trunk/src/rygel/rygel-gst-stream.vala
==============================================================================
--- trunk/src/rygel/rygel-gst-stream.vala	(original)
+++ trunk/src/rygel/rygel-gst-stream.vala	Mon Dec 29 16:09:56 2008
@@ -125,12 +125,17 @@
             return null;
         }
 
-        dynamic Element depay = null;
-
         unowned Registry registry = Registry.get_default ();
         var features = registry.feature_filter (this.rtp_depay_filter, false);
-        foreach (PluginFeature feature in features) {
 
+        return get_best_depay (features, caps);
+    }
+
+    private dynamic Element? get_best_depay (GLib.List<PluginFeature> features,
+                                             Caps                     caps) {
+        dynamic Element depay = null;
+
+        foreach (PluginFeature feature in features) {
             var factory = (ElementFactory) feature;
             if (factory.can_sink_caps (caps)) {
                 depay = ElementFactory.make (factory.get_name (), null);



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