rygel r752 - trunk/src/rygel



Author: zeeshanak
Date: Sat Mar 28 00:45:01 2009
New Revision: 752
URL: http://svn.gnome.org/viewvc/rygel?rev=752&view=rev

Log:
Implementations override Transcoder.create_resource.

Modified:
   trunk/src/rygel/rygel-l16-transcoder.vala
   trunk/src/rygel/rygel-mp2ts-transcoder.vala
   trunk/src/rygel/rygel-transcoder.vala

Modified: trunk/src/rygel/rygel-l16-transcoder.vala
==============================================================================
--- trunk/src/rygel/rygel-l16-transcoder.vala	(original)
+++ trunk/src/rygel/rygel-l16-transcoder.vala	Sat Mar 28 00:45:01 2009
@@ -55,15 +55,27 @@
             return;
         }
 
-        var res = this.create_resource (item,
-                                        this.mime_type,
-                                        this.dlna_profile,
+        resources.add (this.create_resource (item,
+                                             this.mime_type,
+                                             this.dlna_profile,
+                                             manager));
+    }
+
+    public override DIDLLiteResource create_resource (
+                                        MediaItem        item,
+                                        string           mime_type,
+                                        string           dlna_profile,
+                                        TranscodeManager manager)
+                                        throws Error {
+        var res = base.create_resource (item,
+                                        mime_type,
+                                        dlna_profile,
                                         manager);
         res.sample_freq = L16Transcoder.FREQUENCY;
         res.n_audio_channels = L16Transcoder.CHANNELS;
         res.bits_per_sample = L16Transcoder.WIDTH;
 
-        resources.add (res);
+        return res;
     }
 }
 

Modified: trunk/src/rygel/rygel-mp2ts-transcoder.vala
==============================================================================
--- trunk/src/rygel/rygel-mp2ts-transcoder.vala	(original)
+++ trunk/src/rygel/rygel-mp2ts-transcoder.vala	Sat Mar 28 00:45:01 2009
@@ -58,14 +58,26 @@
             return;
         }
 
-        var res = this.create_resource (item,
-                                        this.mime_type,
-                                        PROFILES[this.profile],
+        resources.add (this.create_resource (item,
+                                             this.mime_type,
+                                             PROFILES[this.profile],
+                                             manager));
+    }
+
+    public override DIDLLiteResource create_resource (
+                                        MediaItem        item,
+                                        string           mime_type,
+                                        string           dlna_profile,
+                                        TranscodeManager manager)
+                                        throws Error {
+        var res = base.create_resource (item,
+                                        mime_type,
+                                        dlna_profile,
                                         manager);
         res.width = WIDTH[profile];
         res.height = HEIGHT[profile];
 
-        resources.add (res);
+        return res;
     }
 }
 

Modified: trunk/src/rygel/rygel-transcoder.vala
==============================================================================
--- trunk/src/rygel/rygel-transcoder.vala	(original)
+++ trunk/src/rygel/rygel-transcoder.vala	Sat Mar 28 00:45:01 2009
@@ -42,11 +42,12 @@
                                         throws Error;
 
 
-    public DIDLLiteResource create_resource (MediaItem        item,
-                                             string           mime_type,
-                                             string           dlna_profile,
-                                             TranscodeManager manager)
-                                             throws Error {
+    public virtual DIDLLiteResource create_resource (
+                                        MediaItem        item,
+                                        string           mime_type,
+                                        string           dlna_profile,
+                                        TranscodeManager manager)
+                                        throws Error {
         string protocol;
         var uri = manager.create_uri_for_item (item,
                                                dlna_profile,



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