summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorCarsten Kroll <car@ximidi.com>2011-08-22 14:19:06 +0200
committerAndoni Morales Alastruey <ylatuya@gmail.com>2012-05-08 17:35:36 +0200
commit985a9af30976254943b06c58dd6763eac14a363a (patch)
treed05fc6da75da192737f830b11183c482b01075fe /sys
parent7034d6400cd73a18a6beaf1ae007c606e08e50bf (diff)
d3dvideosink: redraw last buffer when new window handle has been set.
Diffstat (limited to 'sys')
-rw-r--r--sys/d3dvideosink/d3dvideosink.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/d3dvideosink/d3dvideosink.c b/sys/d3dvideosink/d3dvideosink.c
index 4c8352551..96d6e1729 100644
--- a/sys/d3dvideosink/d3dvideosink.c
+++ b/sys/d3dvideosink/d3dvideosink.c
@@ -187,7 +187,7 @@ static void gst_d3dvideosink_log_warning (const gchar * file,
const gchar * function, gint line, const gchar * format, va_list args);
static void gst_d3dvideosink_log_error (const gchar * file,
const gchar * function, gint line, const gchar * format, va_list args);
-
+static void gst_d3dvideosink_set_window_for_renderer (GstD3DVideoSink * sink);
static DirectXInitParams directx_init_params = {
gst_d3dvideosink_log_debug, gst_d3dvideosink_log_warning,
gst_d3dvideosink_log_error
@@ -1057,7 +1057,8 @@ gst_d3dvideosink_set_window_handle (GstXOverlay * overlay, guintptr window_id)
/* Save our window id */
sink->window_handle = hWnd;
-
+ gst_d3dvideosink_set_window_for_renderer(sink);
+
if (init_swap_chain)
gst_d3dvideosink_initialize_swap_chain (sink);
}
@@ -1066,7 +1067,9 @@ gst_d3dvideosink_set_window_handle (GstXOverlay * overlay, guintptr window_id)
GST_DEBUG ("Direct3D window id successfully changed for sink %p to %p", sink,
hWnd);
GST_D3DVIDEOSINK_SWAP_CHAIN_UNLOCK (sink);
- GST_D3DVIDEOSINK_SHARED_D3D_DEV_UNLOCK return;
+ GST_D3DVIDEOSINK_SHARED_D3D_DEV_UNLOCK
+ gst_d3dvideosink_update(sink);
+ return;
/*error:*/
/* GST_DEBUG("Error attempting to change the window id for sink %d to %d", sink, hWnd); */
/* GST_D3DVIDEOSINK_SWAP_CHAIN_UNLOCK(sink); */