Hi Guys,
I want to pass the Gtk window pointer for a wx::Panel to render a
GStreamer video on.
In c++, it looks like this:
GdkWindow* window = gtk_widget_get_window(widget);
wxASSERT(window);
gst_video_overlay_set_window_handle( GST_VIDEO_OVERLAY(be->m_xoverlay),
GDK_WINDOW_XID(window)
);
In wxPerl, it should look like this:
my $g_window_handle = $self->GetHandle;
$message->src->set_window_handle($g_window_handle);
My $g_window_handle is not a pointer but a number as explained below
(from the doc):
vir tual WXWidget wxWindow::GetHandle() const
Returns the platform-specific handle of the physical window.
Cast it to an appropriate handle, such as HWND for Windows,
Widget for Motif or GtkWidget for GTK.
wxPerl Note: This method will return an integer in wxPerl.
Instead I got this error:
The program 'GStreamer_test_6.pl' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadWindow (invalid Window parameter)'.
(Details: serial 17 error_code 3 request_code 3 minor_code 0)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the --sync command line
option to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error()
function.)
I guess I need to convert the pointer, or use a different method.
What do people think?
Regards
Steve.