<html><head></head><body><div style="color:#000; background-color:#fff; font-family:lucida console, sans-serif;font-size:13px"><div id="yui_3_16_0_ym19_1_1475053871080_34904"><span>Hi,<br></span></div><div id="yui_3_16_0_ym19_1_1475053871080_34936"><span id="yui_3_16_0_ym19_1_1475053871080_34935"><br></span></div><div id="yui_3_16_0_ym19_1_1475053871080_34937"><span id="yui_3_16_0_ym19_1_1475053871080_34935">You'll need to expose the overlay in every Qt paint event to fix this issue.</span></div><div><span id="yui_3_16_0_ym19_1_1475053871080_34935"><br></span></div><div id="yui_3_16_0_ym19_1_1475053871080_34980"></div><pre id="yui_3_16_0_ym19_1_1475053871080_35071"><span id="yui_3_16_0_ym19_1_1475053871080_35072">void</span> <span id="yui_3_16_0_ym19_1_1475053871080_35073">VideoWidget</span><span id="yui_3_16_0_ym19_1_1475053871080_35074">::</span><span id="yui_3_16_0_ym19_1_1475053871080_35075">paintEvent</span><span id="yui_3_16_0_ym19_1_1475053871080_35076">(</span><span id="yui_3_16_0_ym19_1_1475053871080_35077">QPaintEvent</span> <span id="yui_3_16_0_ym19_1_1475053871080_35078">*</span><span id="yui_3_16_0_ym19_1_1475053871080_35079">event</span><span id="yui_3_16_0_ym19_1_1475053871080_35080">)</span>
<a name="videowidget.cpp-200" id="yui_3_16_0_ym19_1_1475053871080_35081" href=""></a><span id="yui_3_16_0_ym19_1_1475053871080_35082">{</span>
<a name="videowidget.cpp-201" id="yui_3_16_0_ym19_1_1475053871080_35083" href=""></a> <span id="yui_3_16_0_ym19_1_1475053871080_35084">// qDebug() << QString("VideoWidget::paintEvent - %0").arg((long)winId());</span>
<a name="videowidget.cpp-202" id="yui_3_16_0_ym19_1_1475053871080_35085" href=""></a> <span id="yui_3_16_0_ym19_1_1475053871080_35086">if</span> <span id="yui_3_16_0_ym19_1_1475053871080_35087">(</span><span id="yui_3_16_0_ym19_1_1475053871080_35088">overlay</span><span id="yui_3_16_0_ym19_1_1475053871080_35089">)</span> <span id="yui_3_16_0_ym19_1_1475053871080_35090">{</span>
<a name="videowidget.cpp-203" id="yui_3_16_0_ym19_1_1475053871080_35091" href=""></a> <span id="yui_3_16_0_ym19_1_1475053871080_35092">overlay</span><span id="yui_3_16_0_ym19_1_1475053871080_35093">-></span><span id="yui_3_16_0_ym19_1_1475053871080_35094">expose</span><span id="yui_3_16_0_ym19_1_1475053871080_35095">();</span>
<a name="videowidget.cpp-204" id="yui_3_16_0_ym19_1_1475053871080_35096" href=""></a> <span id="yui_3_16_0_ym19_1_1475053871080_35097">}</span> <span id="yui_3_16_0_ym19_1_1475053871080_35098">else</span> <span id="yui_3_16_0_ym19_1_1475053871080_35099">{</span>
<a name="videowidget.cpp-205" id="yui_3_16_0_ym19_1_1475053871080_35100" href=""></a> <span id="yui_3_16_0_ym19_1_1475053871080_35101">QWidget</span><span id="yui_3_16_0_ym19_1_1475053871080_35102">::</span><span id="yui_3_16_0_ym19_1_1475053871080_35103">paintEvent</span><span id="yui_3_16_0_ym19_1_1475053871080_35104">(</span><span id="yui_3_16_0_ym19_1_1475053871080_35105">event</span><span id="yui_3_16_0_ym19_1_1475053871080_35106">);</span>
<span id="yui_3_16_0_ym19_1_1475053871080_35113">}</span>
<a name="videowidget.cpp-208" id="yui_3_16_0_ym19_1_1475053871080_35114" href=""></a><span id="yui_3_16_0_ym19_1_1475053871080_35115">}</span></pre> <div class="qtdSeparateBR"><br><br></div><div class="yahoo_quoted" style="display: block;"> <div style="font-family: lucida console, sans-serif; font-size: 13px;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div dir="ltr"><font size="2" face="Arial"> Le Mercredi 28 septembre 2016 0h00, doubledw <dwood@mak.com> a écrit :<br></font></div> <blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; margin-top: 5px; padding-left: 5px;"> <br><br> <div class="y_msg_container">I am sending video playback to a Qt widget using<br>gst_video_overlay_set_window_handle (Windows VC10-64bit, Qt 4.8.7).<br>Everything is working smoothly except when I pause playback<br><br> gst_element_set_state(myPipeline, GST_STATE_PAUSED);<br><br>After the pause, the view goes blank if I move focus away from the Qt widget<br>or resize the view smaller. If after going blank, I resize the view bigger,<br>the paused frame will reappear.<br><br>Is there any callback that I can register or signal that I can catch with<br>gstreamer to control when a paused image is rendered?<br><br>I have tried overriding the various Qt events to prevent the widget from<br>repainting over the paused image. Even when Qt repainting is short-circuited<br>the view becomes blank. Based on suggestions from this mailing list, I have<br>also tried performing gst_video_overlay_expose to re-render the paused<br>image. However, when I trace the execution after the view has gone blank and<br>I do another resize smaller, I see where I perform the<br>gst_video_overlay_expose and the image is re-rendered. The execution then<br>continues outside of my application's control and something else blanks out<br>the view again.<br><br>Thanks for any help you can provide.<br><br><br><br><br>--<br>View this message in context: <a href="http://gstreamer-devel.966125.n4.nabble.com/Paused-playback-in-Qt-window-blanks-out-when-losing-focus-or-resizing-smaller-tp4679824.html" target="_blank">http://gstreamer-devel.966125.n4.nabble.com/Paused-playback-in-Qt-window-blanks-out-when-losing-focus-or-resizing-smaller-tp4679824.html</a><br>Sent from the GStreamer-devel mailing list archive at Nabble.com.<br>_______________________________________________<br>gstreamer-devel mailing list<br><a ymailto="mailto:gstreamer-devel@lists.freedesktop.org" href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br><a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br><br><br></div> </blockquote> </div> </div> </div></div></body></html>