rygel r708 - trunk/src/rygel



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

Log:
Don't trust get_compatible_pad() in MP3Transcoder either.

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

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:54 2009
@@ -35,6 +35,7 @@
    private const string AUDIO_PARSER = "mp3parse";
 
    private const string AUDIO_SRC_PAD = "audio-src-pad";
+   private const string AUDIO_SINK_PAD = "audio-sink-pad";
 
    private dynamic Element audio_enc;
    private MP3Profile layer;
@@ -50,7 +51,7 @@
 
         this.audio_enc = MP3Transcoder.create_encoder (this.layer,
                                                        AUDIO_SRC_PAD,
-                                                       null);
+                                                       AUDIO_SINK_PAD);
 
         this.add_many (src, decodebin, this.audio_enc);
         src.link (decodebin);
@@ -64,8 +65,8 @@
 
    private void decodebin_pad_added (Element decodebin,
                                      Pad     new_pad) {
-       Pad enc_pad = this.audio_enc.get_compatible_pad (new_pad, null);
-       if (enc_pad == null) {
+       Pad enc_pad = this.audio_enc.get_pad (AUDIO_SINK_PAD);
+       if (enc_pad.is_linked () || !new_pad.can_link (enc_pad)) {
            return;
        }
 



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