[rygel] core: Check for prop itself rather than element
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] core: Check for prop itself rather than element
- Date: Sun, 9 May 2010 23:38:42 +0000 (UTC)
commit 138a335ba4f6751bc699af1e9565371c2af56911
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Mon May 10 02:24:23 2010 +0300
core: Check for prop itself rather than element
Before setting the tcp_timeout property of GstRTSPSrc, check if the
property exists rather than if the source element is a GstRTSPSrc.
src/rygel/rygel-media-item.vala | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/rygel/rygel-media-item.vala b/src/rygel/rygel-media-item.vala
index ffbcb77..010c54c 100644
--- a/src/rygel/rygel-media-item.vala
+++ b/src/rygel/rygel-media-item.vala
@@ -90,7 +90,8 @@ public class Rygel.MediaItem : MediaObject {
src = Element.make_from_uri (URIType.SRC, this.uris.get (0), null);
}
- if (src != null && src.get_type ().name () == "GstRTSPSrc") {
+ if (src != null &&
+ src.get_class ().find_property ("tcp-timeout") != null) {
// For rtspsrc since some RTSP sources takes a while to start
// transmitting
src.tcp_timeout = (int64) 60000000;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]