From: Stefan Kost Date: Fri, 27 Jun 2008 07:42:07 +0000 (+0000) Subject: tests/examples/seek/seek.c: Include config.h and check if we have X. Fixes: #540334. X-Git-Tag: 1.19.3~511^2~10369 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=724c8a3711c6b1947c448138e13e214d9e9268a7;p=platform%2Fupstream%2Fgstreamer.git tests/examples/seek/seek.c: Include config.h and check if we have X. Fixes: #540334. Original commit message from CVS: * tests/examples/seek/seek.c: Include config.h and check if we have X. Fixes: #540334. --- diff --git a/ChangeLog b/ChangeLog index 0f8cb50..2d39b52 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-06-27 Stefan Kost + + * tests/examples/seek/seek.c: + Include config.h and check if we have X. Fixes: #540334. + 2008-06-26 Sebastian Dröge Patch by: Sam Morris diff --git a/tests/examples/seek/seek.c b/tests/examples/seek/seek.c index 757455a..a03b5fc 100644 --- a/tests/examples/seek/seek.c +++ b/tests/examples/seek/seek.c @@ -20,14 +20,20 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include #include #include -#include +#ifdef HAVE_X #include +#endif #include GST_DEBUG_CATEGORY_STATIC (seek_debug); @@ -2090,6 +2096,7 @@ msg_buffering (GstBus * bus, GstMessage * message, GstPipeline * data) } } +#ifdef HAVE_X static GstBusSyncReply bus_sync_handler (GstBus * bus, GstMessage * message, GstPipeline * data) { @@ -2112,6 +2119,7 @@ bus_sync_handler (GstBus * bus, GstMessage * message, GstPipeline * data) } return GST_BUS_PASS; } +#endif static void msg_eos (GstBus * bus, GstMessage * message, GstPipeline * data) @@ -2134,9 +2142,11 @@ connect_bus_signals (GstElement * pipeline) { GstBus *bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline)); +#ifdef HAVE_X /* handle prepare-xwindow-id element message synchronously */ gst_bus_set_sync_handler (bus, (GstBusSyncHandler) bus_sync_handler, pipeline); +#endif gst_bus_add_signal_watch_full (bus, G_PRIORITY_HIGH); @@ -2244,11 +2254,6 @@ main (int argc, char **argv) if (!g_thread_supported ()) g_thread_init (NULL); - if (!XInitThreads ()) { - g_print ("XInitThreads failed\n"); - exit (-1); - } - ctx = g_option_context_new ("- test seeking in gsteamer"); g_option_context_add_main_entries (ctx, options, NULL); g_option_context_add_group (ctx, gst_init_get_option_group ());