diff options
author | Nicolas Dufresne <nicolas.dufresne@collabora.com> | 2011-07-12 07:44:42 +0800 |
---|---|---|
committer | Sjoerd Simons <sjoerd.simons@collabora.co.uk> | 2011-11-08 04:07:19 +0800 |
commit | ae85ed785b30347012be35042da0b37714d13e04 (patch) | |
tree | 18e858346f7a7f36455192e1d006fa3df97079a6 /src/empathy-video-src.c | |
parent | 32aef7685fde0d06b37e381323dd172d41664c75 (diff) | |
download | gsoc2013-empathy-ae85ed785b30347012be35042da0b37714d13e04.tar gsoc2013-empathy-ae85ed785b30347012be35042da0b37714d13e04.tar.gz gsoc2013-empathy-ae85ed785b30347012be35042da0b37714d13e04.tar.bz2 gsoc2013-empathy-ae85ed785b30347012be35042da0b37714d13e04.tar.lz gsoc2013-empathy-ae85ed785b30347012be35042da0b37714d13e04.tar.xz gsoc2013-empathy-ae85ed785b30347012be35042da0b37714d13e04.tar.zst gsoc2013-empathy-ae85ed785b30347012be35042da0b37714d13e04.zip |
Ignore dynamic framerate if videomaxrate is missing
Diffstat (limited to 'src/empathy-video-src.c')
-rw-r--r-- | src/empathy-video-src.c | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/src/empathy-video-src.c b/src/empathy-video-src.c index 12d77d8f9..9d0ee02c6 100644 --- a/src/empathy-video-src.c +++ b/src/empathy-video-src.c @@ -59,6 +59,7 @@ struct _EmpathyGstVideoSrcPrivate guint width; guint height; guint framerate; + gboolean has_videomaxrate; }; #define EMPATHY_GST_VIDEO_SRC_GET_PRIVATE(o) \ @@ -142,6 +143,11 @@ empathy_video_src_init (EmpathyGstVideoSrc *obj) { g_message ("Couldn't add \"videomaxrate\" (gst-plugins-bad missing?)"); element = element_back; + priv->has_videomaxrate = TRUE; + } + else + { + priv->has_videomaxrate = TRUE; } gst_caps_set_simple (caps, @@ -405,16 +411,19 @@ empathy_video_src_set_framerate (GstElement *src, EmpathyGstVideoSrcPrivate *priv = EMPATHY_GST_VIDEO_SRC_GET_PRIVATE (src); GstCaps *caps; - g_return_if_fail (priv->capsfilter != NULL); + if (priv->has_videomaxrate) + { + g_return_if_fail (priv->capsfilter != NULL); - g_object_get (priv->capsfilter, "caps", &caps, NULL); - caps = gst_caps_make_writable (caps); + g_object_get (priv->capsfilter, "caps", &caps, NULL); + caps = gst_caps_make_writable (caps); - gst_caps_set_simple (caps, - "framerate", GST_TYPE_FRACTION, framerate, 1, - NULL); + gst_caps_set_simple (caps, + "framerate", GST_TYPE_FRACTION, framerate, 1, + NULL); - g_object_set (priv->capsfilter, "caps", caps, NULL); + g_object_set (priv->capsfilter, "caps", caps, NULL); + } } void |