<div class="gmail_quote">2010/3/2 Tristan Matthews <span dir="ltr"><<a href="mailto:tristan@sat.qc.ca">tristan@sat.qc.ca</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="gmail_quote">2010/3/2 Jan Schmidt <span dir="ltr"><<a href="mailto:thaytan@noraisin.net" target="_blank">thaytan@noraisin.net</a>></span><div class="im">Here's my code:<br></div><div><br>bool handleBusMsg(GstMessage *message)<br>
{<br> if (!gst_structure_has_name(message->structure, "prepare-xwindow-id"))<br> return false;<br><br> gdk_threads_enter();<br> gst_x_overlay_set_xwindow_id(GST_X_OVERLAY(GST_MESSAGE_SRC(message)), getXWindow());<br>
gdk_threads_leave();<br>}<br><br></div></div></blockquote><div><br>I should add, getXWindow() returns the xid which has been provided by Application A (the destination), and that this code lives in Application B (the source).<br>
<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="gmail_quote"><div> Thanks,<br><font color="#888888"> Tristan<br><br></font></div>
<div><div></div><div class="h5"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
- Jan.<br>
<div><br>
On Sat, 2010-02-27 at 17:23 -0800, yiliang wrote:<br>
</div><div>> Hi,<br>
><br>
> I have 2 applications. One application (application A) creates a window, and<br>
> sends the window ID to another application (application B). application B<br>
> has a gstreamer video pipeline that uses xvimagesink to display the video as<br>
> overlay in the window using the window ID provided by application A. I am<br>
> sorry if it sounds a little confusing. This is to separate UI from pipeline.<br>
><br>
> Following function is used to configure xvimagesink with window ID:<br>
><br>
> gst_x_overlay_set_xwindow_id(GST_X_OVERLAY(xvimagesink), winId);<br>
><br>
> Most of time it works fine, but sometimes I encounter the following problem,<br>
> and the application B is terminated:<br>
><br>
> X Error of failed request: BadWindow (invalid Window parameter)<br>
> Major opcode of failed request: 3 (X_GetWindowAttributes)<br>
> Resource id in failed request: 0x400016f<br>
> Serial number of failed request: 32<br>
> Current serial number in output stream: 33<br>
><br>
> After some debugging, I found the error was generated in function<br>
> gst_xvimagesink_set_xwindow_id() when it called the following function:<br>
><br>
> XGetWindowAttributes<br>
><br>
> Could anyone give some hint how to fix this problem?<br>
><br>
> Thanks,<br>
> Yiliang<br>
><br>
<br>
<br>
--<br>
</div><font color="#888888">Jan Schmidt <<a href="mailto:thaytan@noraisin.net" target="_blank">thaytan@noraisin.net</a>><br>
</font><div><div></div><div><br>
<br>
------------------------------------------------------------------------------<br>
Download Intel&#174; Parallel Studio Eval<br>
Try the new software tools for yourself. Speed compiling, find bugs<br>
proactively, and fine-tune applications for parallel performance.<br>
See why Intel Parallel Studio got high marks during beta.<br>
<a href="http://p.sf.net/sfu/intel-sw-dev" target="_blank">http://p.sf.net/sfu/intel-sw-dev</a><br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.sourceforge.net" target="_blank">gstreamer-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>
</div></div></blockquote></div></div></div><br><br clear="all"><div><div></div><div class="h5"><br>-- <br>Tristan Matthews<br>email: <a href="mailto:tristan@sat.qc.ca" target="_blank">tristan@sat.qc.ca</a><br>web: <a href="http://tristanswork.blogspot.com" target="_blank">http://tristanswork.blogspot.com</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Tristan Matthews<br>email: <a href="mailto:tristan@sat.qc.ca">tristan@sat.qc.ca</a><br>web: <a href="http://tristanswork.blogspot.com">http://tristanswork.blogspot.com</a><br>