rygel r705 - trunk/src/rygel



Author: zeeshanak
Date: Sat Mar 21 13:55:39 2009
New Revision: 705
URL: http://svn.gnome.org/viewvc/rygel?rev=705&view=rev

Log:
MP3Transcoder.create_encoder can be dictated names for pads.

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

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 21 13:55:39 2009
@@ -41,7 +41,9 @@
                                     "Required element '%s' missing", DECODEBIN);
         }
 
-        this.audio_enc = MP3Transcoder.create_encoder (MP3Profile.LAYER2);
+        this.audio_enc = MP3Transcoder.create_encoder (MP3Profile.LAYER2,
+                                                       null,
+                                                       null);
 
         this.video_enc = ElementFactory.make (VIDEO_ENCODER, VIDEO_ENCODER);
         if (video_enc == null) {

Modified: trunk/src/rygel/rygel-mp3-transcoder.vala
==============================================================================
--- trunk/src/rygel/rygel-mp3-transcoder.vala	(original)
+++ trunk/src/rygel/rygel-mp3-transcoder.vala	Sat Mar 21 13:55:39 2009
@@ -48,7 +48,9 @@
                                     "Required element '%s' missing", DECODEBIN);
         }
 
-        this.audio_enc = MP3Transcoder.create_encoder (this.layer);
+        this.audio_enc = MP3Transcoder.create_encoder (this.layer,
+                                                       AUDIO_SRC_PAD,
+                                                       null);
 
         this.add_many (src, decodebin, this.audio_enc);
         src.link (decodebin);
@@ -78,7 +80,10 @@
        this.audio_enc.sync_state_with_parent ();
    }
 
-   internal static Element create_encoder (MP3Profile layer) throws Error {
+   internal static Element create_encoder (MP3Profile layer,
+                                           string?    src_pad_name,
+                                           string?    sink_pad_name)
+                                           throws Error {
        var convert = ElementFactory.make (AUDIO_CONVERT, AUDIO_CONVERT);
        if (convert == null) {
            throw new LiveResponseError.MISSING_PLUGIN (
@@ -117,11 +122,11 @@
        encoder.link (parser);
 
        var pad = convert.get_static_pad ("sink");
-       var ghost = new GhostPad (null, pad);
+       var ghost = new GhostPad (sink_pad_name, pad);
        bin.add_pad (ghost);
 
        pad = parser.get_static_pad ("src");
-       ghost = new GhostPad (AUDIO_SRC_PAD, pad);
+       ghost = new GhostPad (src_pad_name, pad);
        bin.add_pad (ghost);
 
        return bin;



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