Hi Guys,

I'm having difficulty rendering a GStreamer video onto a wxPerl panel.

According to the doc it should be something like this:

my $video_panel=Wx::Panel->new($i_main_menu, wxID_ANY, wxDefaultPositi +on, [800,600],); (... lots of code goes here and the full executable version is here:
http://stackoverflow.com/questions/23547043/gtk-window-pointer-for-a-wxpanel-to-render-a-gstreamer-video
) my $g_window = $video_panel->GetHandle; $message->src->set_window_handle($g_window);
But I don't get a pointer from GetHandle just an integer as explained here (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.
and then it errors like this:
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 asynchronousl +y; 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 integer to some sort of pointer object that GStreamer recognises.

Does anyone have any idea what the correct code should look like?

Regards

Steve.


In reply to How to pass a Wx::Panel handle to GStreamer to render a video. by Steve_BZ

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.