summaryrefslogtreecommitdiff
path: root/gst-libs/gst/gl/win32
diff options
context:
space:
mode:
authorSebastian Dröge <slomo@circular-chaos.org>2013-07-15 15:58:04 +0200
committerMatthew Waters <ystreet00@gmail.com>2014-03-15 18:36:58 +0100
commit2b6e54d41622e9fc3cd130d007130787db7778e8 (patch)
tree31408a21a95055a5ca62c9225958d40a8ab2e84b /gst-libs/gst/gl/win32
parent7dba9d0dce025df6d1e3364cb32bbe6c7ca939ed (diff)
downloadgstreamer-plugins-bad-2b6e54d41622e9fc3cd130d007130787db7778e8.tar.gz
[752/906] glwindow: Add destroy notifies for the data of the callbacks
And actually call the close callback when the window is closed.
Diffstat (limited to 'gst-libs/gst/gl/win32')
-rw-r--r--gst-libs/gst/gl/win32/gstglwindow_win32.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/gst-libs/gst/gl/win32/gstglwindow_win32.c b/gst-libs/gst/gl/win32/gstglwindow_win32.c
index 7817f31ef..3b0fc2fc9 100644
--- a/gst-libs/gst/gl/win32/gstglwindow_win32.c
+++ b/gst-libs/gst/gl/win32/gstglwindow_win32.c
@@ -79,8 +79,7 @@ void gst_gl_window_win32_draw_unlocked (GstGLWindow * window, guint width,
guint height);
void gst_gl_window_win32_draw (GstGLWindow * window, guint width, guint height);
void gst_gl_window_win32_run (GstGLWindow * window);
-void gst_gl_window_win32_quit (GstGLWindow * window, GstGLWindowCB callback,
- gpointer data);
+void gst_gl_window_win32_quit (GstGLWindow * window);
void gst_gl_window_win32_send_message (GstGLWindow * window,
GstGLWindowCB callback, gpointer data);
@@ -384,8 +383,7 @@ gst_gl_window_win32_run (GstGLWindow * window)
/* Thread safe */
void
-gst_gl_window_win32_quit (GstGLWindow * window, GstGLWindowCB callback,
- gpointer data)
+gst_gl_window_win32_quit (GstGLWindow * window)
{
GstGLWindowWin32 *window_win32;
@@ -394,7 +392,7 @@ gst_gl_window_win32_quit (GstGLWindow * window, GstGLWindowCB callback,
if (window_win32 && window_win32->internal_win_id) {
LRESULT res =
PostMessage (window_win32->internal_win_id, WM_GST_GL_WINDOW_QUIT,
- (WPARAM) data, (LPARAM) callback);
+ (WPARAM) 0, (LPARAM) 0);
GST_DEBUG ("end loop requested");
g_return_if_fail (SUCCEEDED (res));
}
@@ -526,13 +524,9 @@ window_proc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
case WM_GST_GL_WINDOW_QUIT:
{
HWND parent_id = 0;
- GstGLWindowCB destroy_cb = (GstGLWindowCB) lParam;
GST_DEBUG ("WM_GST_GL_WINDOW_QUIT\n");
- if (destroy_cb)
- destroy_cb ((gpointer) wParam);
-
parent_id = window_win32->parent_win_id;
if (parent_id) {
WNDPROC parent_proc = GetProp (parent_id, "gl_window_parent_proc");