diff options
author | Christopher James Halse Rogers <chrishr@src.gnome.org> | 2010-02-28 16:00:10 +1100 |
---|---|---|
committer | Christopher James Halse Rogers <chrishr@src.gnome.org> | 2010-02-28 16:00:10 +1100 |
commit | 6ac24e09c97382e94c8cd74941bc76fdbcd24366 (patch) | |
tree | cd946274e11e0f6f9c1246b92fce32ad4eb97578 /libbanshee | |
parent | 5fd1e52eed45b9cf55de3967bbe7bc7334ca4112 (diff) | |
parent | 424a345b1cbde80b9bfb15b32580d224df576507 (diff) |
Merge branch 'master' into gapless-ng
Diffstat (limited to 'libbanshee')
-rw-r--r-- | libbanshee/banshee-player-private.h | 1 | ||||
-rw-r--r-- | libbanshee/banshee-player-video.c | 28 | ||||
-rw-r--r-- | libbanshee/libbanshee.cproj | 3 |
3 files changed, 25 insertions, 7 deletions
diff --git a/libbanshee/banshee-player-private.h b/libbanshee/banshee-player-private.h index 104dc5df4..20a2d1ca6 100644 --- a/libbanshee/banshee-player-private.h +++ b/libbanshee/banshee-player-private.h @@ -127,6 +127,7 @@ struct BansheePlayer { #ifdef GDK_WINDOWING_X11 GstXOverlay *xoverlay; GdkWindow *video_window; + XID video_window_xid; #endif // Visualization State diff --git a/libbanshee/banshee-player-video.c b/libbanshee/banshee-player-video.c index 21bc0ce73..cb36fd6b1 100644 --- a/libbanshee/banshee-player-video.c +++ b/libbanshee/banshee-player-video.c @@ -111,7 +111,7 @@ bp_video_bus_element_sync_message (GstBus *bus, GstMessage *message, BansheePlay g_mutex_unlock (player->mutex); if (found_xoverlay) { - gst_x_overlay_set_xwindow_id (player->xoverlay, GDK_WINDOW_XWINDOW (player->video_window)); + gst_x_overlay_set_xwindow_id (player->xoverlay, player->video_window_xid); } #endif @@ -223,8 +223,6 @@ bp_video_get_display_context (BansheePlayer *player) P_INVOKE void bp_video_window_expose (BansheePlayer *player, GdkWindow *window, gboolean direct) { - XID window_id; - g_return_if_fail (IS_BANSHEE_PLAYER (player)); if (direct && player->xoverlay != NULL && GST_IS_X_OVERLAY (player->xoverlay)) { @@ -242,14 +240,32 @@ bp_video_window_expose (BansheePlayer *player, GdkWindow *window, gboolean direc gst_object_ref (player->xoverlay); g_mutex_unlock (player->mutex); - window_id = GDK_WINDOW_XWINDOW (window); - - gst_x_overlay_set_xwindow_id (player->xoverlay, window_id); + gst_x_overlay_set_xwindow_id (player->xoverlay, player->video_window_xid); gst_x_overlay_expose (player->xoverlay); gst_object_unref (player->xoverlay); } +// MUST be called from the GTK main thread; calling it in OnRealized will do the right thing. +P_INVOKE void +bp_video_window_realize (BansheePlayer *player, GdkWindow *window) +{ + g_return_if_fail (IS_BANSHEE_PLAYER (player)); + +// Code commented out - this requires including gtk/gtk.h for GTK_CHECK_VERSION, which requires too many +// buildsystem changes for the benefit of a single debug message in the failure case. +// +//#if GTK_CHECK_VERSION(2,18,0) +// //Explicitly create the native window. GDK_WINDOW_XWINDOW will call this +// //function anyway, but this way we can raise a more useful message should it fail. +// if (!gdk_window_ensure_native (window)) { +// banshee_log (BANSHEE_LOG_TYPE_ERROR, "player-video", "Couldn't create native window needed for GstXOverlay!"); +// } +//#endif + + player->video_window_xid = GDK_WINDOW_XID (window); +} + #else /* GDK_WINDOWING_X11 */ P_INVOKE BpVideoDisplayContextType diff --git a/libbanshee/libbanshee.cproj b/libbanshee/libbanshee.cproj index 99316869e..a98b09019 100644 --- a/libbanshee/libbanshee.cproj +++ b/libbanshee/libbanshee.cproj @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> @@ -11,6 +11,7 @@ <Language>C</Language> <Target>Bin</Target> <SchemaVersion>2.0</SchemaVersion> + <ReleaseVersion>1.3</ReleaseVersion> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> |