mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 09:10:36 +00:00
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.
This commit is contained in:
parent
752cf09704
commit
724c8a3711
2 changed files with 16 additions and 6 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2008-06-27 Stefan Kost <ensonic@users.sf.net>
|
||||||
|
|
||||||
|
* tests/examples/seek/seek.c:
|
||||||
|
Include config.h and check if we have X. Fixes: #540334.
|
||||||
|
|
||||||
2008-06-26 Sebastian Dröge <sebastian.droege@collabora.co.uk>
|
2008-06-26 Sebastian Dröge <sebastian.droege@collabora.co.uk>
|
||||||
|
|
||||||
Patch by: Sam Morris <sam at robots dot org to uk>
|
Patch by: Sam Morris <sam at robots dot org to uk>
|
||||||
|
|
|
@ -20,14 +20,20 @@
|
||||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
* Boston, MA 02111-1307, USA.
|
* Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <X11/Xlib.h>
|
#ifdef HAVE_X
|
||||||
#include <gdk/gdkx.h>
|
#include <gdk/gdkx.h>
|
||||||
|
#endif
|
||||||
#include <gst/interfaces/xoverlay.h>
|
#include <gst/interfaces/xoverlay.h>
|
||||||
|
|
||||||
GST_DEBUG_CATEGORY_STATIC (seek_debug);
|
GST_DEBUG_CATEGORY_STATIC (seek_debug);
|
||||||
|
@ -2090,6 +2096,7 @@ msg_buffering (GstBus * bus, GstMessage * message, GstPipeline * data)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_X
|
||||||
static GstBusSyncReply
|
static GstBusSyncReply
|
||||||
bus_sync_handler (GstBus * bus, GstMessage * message, GstPipeline * data)
|
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;
|
return GST_BUS_PASS;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static void
|
static void
|
||||||
msg_eos (GstBus * bus, GstMessage * message, GstPipeline * data)
|
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));
|
GstBus *bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
|
||||||
|
|
||||||
|
#ifdef HAVE_X
|
||||||
/* handle prepare-xwindow-id element message synchronously */
|
/* handle prepare-xwindow-id element message synchronously */
|
||||||
gst_bus_set_sync_handler (bus, (GstBusSyncHandler) bus_sync_handler,
|
gst_bus_set_sync_handler (bus, (GstBusSyncHandler) bus_sync_handler,
|
||||||
pipeline);
|
pipeline);
|
||||||
|
#endif
|
||||||
|
|
||||||
gst_bus_add_signal_watch_full (bus, G_PRIORITY_HIGH);
|
gst_bus_add_signal_watch_full (bus, G_PRIORITY_HIGH);
|
||||||
|
|
||||||
|
@ -2244,11 +2254,6 @@ main (int argc, char **argv)
|
||||||
if (!g_thread_supported ())
|
if (!g_thread_supported ())
|
||||||
g_thread_init (NULL);
|
g_thread_init (NULL);
|
||||||
|
|
||||||
if (!XInitThreads ()) {
|
|
||||||
g_print ("XInitThreads failed\n");
|
|
||||||
exit (-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
ctx = g_option_context_new ("- test seeking in gsteamer");
|
ctx = g_option_context_new ("- test seeking in gsteamer");
|
||||||
g_option_context_add_main_entries (ctx, options, NULL);
|
g_option_context_add_main_entries (ctx, options, NULL);
|
||||||
g_option_context_add_group (ctx, gst_init_get_option_group ());
|
g_option_context_add_group (ctx, gst_init_get_option_group ());
|
||||||
|
|
Loading…
Reference in a new issue