From 58bf3be7307f2636e6a59956f4ca80f162827baf Mon Sep 17 00:00:00 2001 From: Lasse Laukkanen Date: Wed, 17 Feb 2010 11:51:26 +0200 Subject: [PATCH] camerabin: don't use gst_bus_poll() when creating preview image Avoid using gst_bus_poll() as the docs recommend. Use gst_bus_timed_pop_filtered() instead. --- gst/camerabin/camerabinpreview.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gst/camerabin/camerabinpreview.c b/gst/camerabin/camerabinpreview.c index 9eb13552cf..255e1c3b48 100644 --- a/gst/camerabin/camerabinpreview.c +++ b/gst/camerabin/camerabinpreview.c @@ -204,10 +204,9 @@ gst_camerabin_preview_convert (GstCameraBin * camera, g_signal_emit_by_name (src, "push-buffer", buf, &fret); - /* TODO: do we need to use a bus poll, can we just register a callback to the bus? */ bus = gst_element_get_bus (pipeline); - msg = - gst_bus_poll (bus, GST_MESSAGE_ERROR | GST_MESSAGE_EOS, 25 * GST_SECOND); + msg = gst_bus_timed_pop_filtered (bus, (25 * GST_SECOND), + GST_MESSAGE_ERROR | GST_MESSAGE_EOS); if (msg) { switch (GST_MESSAGE_TYPE (msg)) {