rygel r713 - trunk/src/rygel
- From: zeeshanak svn gnome org
- To: svn-commits-list gnome org
- Subject: rygel r713 - trunk/src/rygel
- Date: Sat, 21 Mar 2009 13:56:19 +0000 (UTC)
Author: zeeshanak
Date: Sat Mar 21 13:56:18 2009
New Revision: 713
URL: http://svn.gnome.org/viewvc/rygel?rev=713&view=rev
Log:
No need to keep check_pad_compatible static.
Just inline it in both classes for now, we'll move it to common
baseclass when we have that.
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:56:18 2009
@@ -78,11 +78,11 @@
// Check which encoder to use
if (!audio_enc_pad.is_linked () &&
- MP3Transcoder.pads_compatible (new_pad, audio_enc_pad)) {
+ this.pads_compatible (new_pad, audio_enc_pad)) {
encoder = this.audio_enc;
enc_pad = audio_enc_pad;
} else if (!video_enc_pad.is_linked () &&
- MP3Transcoder.pads_compatible (new_pad, video_enc_pad)) {
+ this.pads_compatible (new_pad, video_enc_pad)) {
encoder = this.video_enc;
enc_pad = video_enc_pad;
} else {
@@ -144,6 +144,12 @@
return bin;
}
+ private bool pads_compatible (Pad pad1, Pad pad2) {
+ Caps intersection = pad1.get_caps ().intersect (pad2.get_caps ());
+
+ return !intersection.is_empty ();
+ }
+
private void post_error (Error error) {
Message msg = new Message.error (this, error, error.message);
this.post_message (msg);
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:56:18 2009
@@ -66,8 +66,7 @@
private void decodebin_pad_added (Element decodebin,
Pad new_pad) {
Pad enc_pad = this.audio_enc.get_pad (AUDIO_SINK_PAD);
- if (enc_pad.is_linked () ||
- !MP3Transcoder.pads_compatible (new_pad, enc_pad)) {
+ if (enc_pad.is_linked () || !this.pads_compatible (new_pad, enc_pad)) {
return;
}
@@ -134,7 +133,7 @@
return bin;
}
- internal static bool pads_compatible (Pad pad1, Pad pad2) {
+ private bool pads_compatible (Pad pad1, Pad pad2) {
Caps intersection = pad1.get_caps ().intersect (pad2.get_caps ());
return !intersection.is_empty ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]