Paused playback in Qt window blanks out when losing focus or resizing smaller

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Paused playback in Qt window blanks out when losing focus or resizing smaller

doubledw
I am sending video playback to a Qt widget using gst_video_overlay_set_window_handle (Windows VC10-64bit, Qt 4.8.7). Everything is working smoothly except when I pause playback

         gst_element_set_state(myPipeline, GST_STATE_PAUSED);

After the pause, the view goes blank if I move focus away from the Qt widget or resize the view smaller. If after going blank, I resize the view bigger, the paused frame will reappear.

Is there any callback that I can register or signal that I can catch with gstreamer to control when a paused image is rendered?

I have tried overriding the various Qt events to prevent the widget from repainting over the paused image. Even when Qt repainting is short-circuited the view becomes blank. Based on suggestions from this mailing list, I have also tried performing gst_video_overlay_expose to re-render the paused image. However, when I trace the execution after the view has gone blank and I do another resize smaller, I see where I perform the gst_video_overlay_expose and the image is re-rendered. The execution then continues outside of my application's control and something else blanks out the view again.

Thanks for any help you can provide.
Reply | Threaded
Open this post in threaded view
|

Re: Paused playback in Qt window blanks out when losing focus or resizing smaller

filnet
Hi,

You'll need to expose the overlay in every Qt paint event to fix this issue.

void VideoWidget::paintEvent(QPaintEvent *event)
{
    // qDebug() << QString("VideoWidget::paintEvent - %0").arg((long)winId());
    if (overlay) {
        overlay->expose();
    } else {
        QWidget::paintEvent(event);
    }
}


Le Mercredi 28 septembre 2016 0h00, doubledw <[hidden email]> a écrit :


I am sending video playback to a Qt widget using
gst_video_overlay_set_window_handle (Windows VC10-64bit, Qt 4.8.7).
Everything is working smoothly except when I pause playback

        gst_element_set_state(myPipeline, GST_STATE_PAUSED);

After the pause, the view goes blank if I move focus away from the Qt widget
or resize the view smaller. If after going blank, I resize the view bigger,
the paused frame will reappear.

Is there any callback that I can register or signal that I can catch with
gstreamer to control when a paused image is rendered?

I have tried overriding the various Qt events to prevent the widget from
repainting over the paused image. Even when Qt repainting is short-circuited
the view becomes blank. Based on suggestions from this mailing list, I have
also tried performing gst_video_overlay_expose to re-render the paused
image. However, when I trace the execution after the view has gone blank and
I do another resize smaller, I see where I perform the
gst_video_overlay_expose and the image is re-rendered. The execution then
continues outside of my application's control and something else blanks out
the view again.

Thanks for any help you can provide.




--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Paused-playback-in-Qt-window-blanks-out-when-losing-focus-or-resizing-smaller-tp4679824.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Paused playback in Qt window blanks out when losing focus or resizing smaller

filnet
You might also need to turn off auto fill background.






Le Mercredi 28 septembre 2016 14h45, philippe renon <[hidden email]> a écrit :


Hi,

You'll need to expose the overlay in every Qt paint event to fix this issue.

void VideoWidget::paintEvent(QPaintEvent *event)
{
    // qDebug() << QString("VideoWidget::paintEvent - %0").arg((long)winId());
    if (overlay) {
        overlay->expose();
    } else {
        QWidget::paintEvent(event);
    }
}


Le Mercredi 28 septembre 2016 0h00, doubledw <[hidden email]> a écrit :


I am sending video playback to a Qt widget using
gst_video_overlay_set_window_handle (Windows VC10-64bit, Qt 4.8.7).
Everything is working smoothly except when I pause playback

        gst_element_set_state(myPipeline, GST_STATE_PAUSED);

After the pause, the view goes blank if I move focus away from the Qt widget
or resize the view smaller. If after going blank, I resize the view bigger,
the paused frame will reappear.

Is there any callback that I can register or signal that I can catch with
gstreamer to control when a paused image is rendered?

I have tried overriding the various Qt events to prevent the widget from
repainting over the paused image. Even when Qt repainting is short-circuited
the view becomes blank. Based on suggestions from this mailing list, I have
also tried performing gst_video_overlay_expose to re-render the paused
image. However, when I trace the execution after the view has gone blank and
I do another resize smaller, I see where I perform the
gst_video_overlay_expose and the image is re-rendered. The execution then
continues outside of my application's control and something else blanks out
the view again.

Thanks for any help you can provide.




--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Paused-playback-in-Qt-window-blanks-out-when-losing-focus-or-resizing-smaller-tp4679824.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel





_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel