[461/906] xoverlay: require base from git and update to new API

This commit is contained in:
Stefan Kost 2010-09-16 15:00:29 +03:00 committed by Matthew Waters
parent b9c68baddc
commit ac138f74a1
4 changed files with 14 additions and 13 deletions

View file

@ -110,8 +110,8 @@ static GstFlowReturn gst_glimage_sink_render (GstBaseSink * bsink,
GstBuffer * buf);
static void gst_glimage_sink_xoverlay_init (GstXOverlayClass * iface);
static void gst_glimage_sink_set_xwindow_id (GstXOverlay * overlay,
gulong window_id);
static void gst_glimage_sink_set_window_handle (GstXOverlay * overlay,
guintptr id);
static void gst_glimage_sink_expose (GstXOverlay * overlay);
static gboolean gst_glimage_sink_interface_supported (GstImplementsInterface *
iface, GType type);
@ -643,15 +643,16 @@ gst_glimage_sink_render (GstBaseSink * bsink, GstBuffer * buf)
static void
gst_glimage_sink_xoverlay_init (GstXOverlayClass * iface)
{
iface->set_xwindow_id = gst_glimage_sink_set_xwindow_id;
iface->set_window_handle = gst_glimage_sink_set_window_handle;
iface->expose = gst_glimage_sink_expose;
}
static void
gst_glimage_sink_set_xwindow_id (GstXOverlay * overlay, gulong window_id)
gst_glimage_sink_set_window_handle (GstXOverlay * overlay, guintptr id)
{
GstGLImageSink *glimage_sink = GST_GLIMAGE_SINK (overlay);
gulong window_id = (gulong) id;
g_return_if_fail (GST_IS_GLIMAGE_SINK (overlay));

View file

@ -106,7 +106,7 @@ create_window (GstBus * bus, GstMessage * message, gpointer data)
g_debug ("CREATING WINDOW");
gst_x_overlay_set_xwindow_id (GST_X_OVERLAY (GST_MESSAGE_SRC (message)),
gst_x_overlay_set_window_handle (GST_X_OVERLAY (GST_MESSAGE_SRC (message)),
actor->win);
clutter_threads_add_idle ((GSourceFunc) create_actor, actor);

View file

@ -86,7 +86,7 @@ create_window (GstBus * bus, GstMessage * message, gpointer data)
if (count < N_ACTORS) {
g_message ("adding actor %d", count);
gst_x_overlay_set_xwindow_id (GST_X_OVERLAY (GST_MESSAGE_SRC (message)),
gst_x_overlay_set_window_handle (GST_X_OVERLAY (GST_MESSAGE_SRC (message)),
actor[count]->win);
clutter_threads_add_idle ((GSourceFunc) create_actor, actor[count]);
count++;

View file

@ -32,20 +32,20 @@
void
gst_x_overlay_set_gtk_window (GstXOverlay *xoverlay, GtkWidget *window)
gst_x_overlay_set_gtk_window (GstXOverlay * xoverlay, GtkWidget * window)
{
#if defined(GDK_WINDOWING_WIN32)
gst_x_overlay_set_xwindow_id (xoverlay, (gulong)GDK_WINDOW_HWND(window->window));
gst_x_overlay_set_window_handle (xoverlay,
(gulong) GDK_WINDOW_HWND (window->window));
#elif defined(GDK_WINDOWING_QUARTZ)
gst_x_overlay_set_xwindow_id (xoverlay,
(gulong)gdk_quartz_window_get_nswindow (window->window));
gst_x_overlay_set_window_handle (xoverlay,
(gulong) gdk_quartz_window_get_nswindow (window->window));
#elif defined(GDK_WINDOWING_X11)
gst_x_overlay_set_xwindow_id (xoverlay, GDK_WINDOW_XWINDOW(window->window));
gst_x_overlay_set_window_handle (xoverlay,
GDK_WINDOW_XWINDOW (window->window));
#else
#error unimplemented GTK backend
#endif
}