Thanks Nicola - that solved the problem. These libraries are not included in `pkg-config --libs gstreamer-1.0`, so are they included in another package ? _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Il 03/03/2017 18:18, Harry McKame ha
scritto:
good
discoverer libs: pkg-config --libs gstreamer-pbutils-1.0 video libs: pkg-config --libs gstreamer-video-1.0 Nicola
_______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by Harry McKame
First question :
I use playbin for displaying video inside a child window, passing that window's handle as video overlay (gst_video_overlay_set_window_handle). The window has a message loop that never seems to be called. The video plays well inside its window, except for one problem : The video is displayed in the middle of the window, leaving blank space on both sides. These blank spaces are never refreshed. Under Windows they are just black, while under Linux they act as "holes" showing through whatever is beneath my application (for example the desktop). How can I fill-up these blank spaces with a color of my choice? Second question : When running inside gdb, I get the message : GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed I cannot find any problematic call to g_object_unref in my code. How can I find where is it coming from ? Third question : I'm using Linux Mint where the repositories only contain GStreamer 1.8. Are there any repositories where I can find the latest version ? _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
> How can I fill-up these blank spaces with a color of my choice?
Set the background-pixel attribute on the window, either at creation or with XSetWindowAttributes() (Assuming it is an X11 window). Giles -----Original Message----- From: gstreamer-devel [mailto:[hidden email]] On Behalf Of Harry McKame Sent: 07 April 2017 10:34 AM To: [hidden email] Subject: playbin - blank areas on screen and various questions First question : I use playbin for displaying video inside a child window, passing that window's handle as video overlay (gst_video_overlay_set_window_handle). The window has a message loop that never seems to be called. The video plays well inside its window, except for one problem : The video is displayed in the middle of the window, leaving blank space on both sides. These blank spaces are never refreshed. Under Windows they are just black, while under Linux they act as "holes" showing through whatever is beneath my application (for example the desktop). How can I fill-up these blank spaces with a color of my choice? Second question : When running inside gdb, I get the message : GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed I cannot find any problematic call to g_object_unref in my code. How can I find where is it coming from ? Third question : I'm using Linux Mint where the repositories only contain GStreamer 1.8. Are there any repositories where I can find the latest version ? _______________________________________________ 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 |
In reply to this post by Harry McKame
I use Qt, and setting QWidget::autoFillBackground helps - but only while the video is not playing and its first frame is static and visible, and for about one second once playing starts. After one second of play the blank spaces return and become see-through. > How can I fill-up these blank spaces with a color of my choice? > >Set the background-pixel attribute on the window, either at creation or with XSetWindowAttributes() (Assuming it is an X11 window). > > Giles On 07-04-2017 11:33, Harry McKame
wrote:
First question : I use playbin for displaying video inside a child window, passing that window's handle as video overlay (gst_video_overlay_set_window_handle). The window has a message loop that never seems to be called. The video plays well inside its window, except for one problem : The video is displayed in the middle of the window, leaving blank space on both sides. These blank spaces are never refreshed. Under Windows they are just black, while under Linux they act as "holes" showing through whatever is beneath my application (for example the desktop). How can I fill-up these blank spaces with a color of my choice? Second question : When running inside gdb, I get the message : GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed I cannot find any problematic call to g_object_unref in my code. How can I find where is it coming from ? Third question : I'm using Linux Mint where the repositories only contain GStreamer 1.8. Are there any repositories where I can find the latest version ? _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by Harry McKame
I use Qt, and setting QWidget::autoFillBackground helps - but only
while the video is not playing and its first frame is static and
visible, and for about one second once playing starts.
After one second of play the blank spaces return and become
see-through. _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by Harry McKame
I use Qt, and setting
QWidget::autoFillBackground helps - but only while the video is
not playing and its first frame is static and visible, and for
about one second once playing starts.
After one second of play the blank spaces return and become
see-through. On 07-04-2017 11:33, Harry McKame
wrote:
First question : I use playbin for displaying video inside a child window, passing that window's handle as video overlay (gst_video_overlay_set_window_handle). The window has a message loop that never seems to be called. The video plays well inside its window, except for one problem : The video is displayed in the middle of the window, leaving blank space on both sides. These blank spaces are never refreshed. Under Windows they are just black, while under Linux they act as "holes" showing through whatever is beneath my application (for example the desktop). How can I fill-up these blank spaces with a color of my choice? Second question : When running inside gdb, I get the message : GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed I cannot find any problematic call to g_object_unref in my code. How can I find where is it coming from ? Third question : I'm using Linux Mint where the repositories only contain GStreamer 1.8. Are there any repositories where I can find the latest version ? _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by Harry McKame
I use Qt, and setting QWidget::autoFillBackground helps - but only while the video is not playing and its first frame is static and visible, and for about one second once playing starts.
After one second of play the blank spaces return and become see-through. _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
There are a few tricks you need to be aware of when using Qt and GSTVideoOverlay. I don't remember them all but some are: - autoFillBackground is needed along (maybe) turning off Qt::WA_OpaquePaintEvent and Qt::WA_PaintOnScreen. - make sure to expose() the overlay from Qt's paintEvent() and resizeEvent() Here is the Qt integration I wrote a while back : https://bitbucket.org/filnet/librepilot/src/d5713c26f2abd33920bf2cf0f816fc285939f29c/ground/gcs/src/libs/gstreamer/videowidget.cpp?at=video_wip&fileviewer=file-view-default It works on Window and Linux. Also works on OSX with a minor fix. Le Mercredi 12 avril 2017 14h07, Harry McKame <[hidden email]> a écrit : I use Qt, and setting QWidget::autoFillBackground helps - but only while the video is not playing and its first frame is static and visible, and for about one second once playing starts. After one second of play the blank spaces return and become see-through. _______________________________________________ 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 |
In reply to this post by Harry McKame
Philippe, I have looked at your code and it's much too heavy for me.
I have copied the following lines but that's not enough - the blank spaces are still there: setAutoFillBackground(true); setAttribute(Qt::WA_OpaquePaintEvent, false); setAttribute(Qt::WA_PaintOnScreen, false); If GStreamer does not use all the overlay's window, why does it never paint the rest ? Is my only solution left is to resize the display window to be exactly covered by the video? _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Try to add this to your widget: void <YourWidgetClassName>::paintEvent(QPaintEvent *event) { overlay->expose(); } Le Jeudi 13 avril 2017 15h26, philippe renon <[hidden email]> a écrit : Try to add this to your widget: void MyClass::paintEvent(QPaintEvent *event) { overlay->expose(); } Le Jeudi 13 avril 2017 15h01, Harry McKame <[hidden email]> a écrit : Philippe, I have looked at your code and it's much too heavy for me. I have copied the following lines but that's not enough - the blank spaces are still there: setAutoFillBackground(true); setAttribute(Qt::WA_OpaquePaintEvent, false); setAttribute(Qt::WA_PaintOnScreen, false); If GStreamer does not use all the overlay's window, why does it never paint the rest ? Is my only solution left is to resize the display window to be exactly covered by the video? _______________________________________________ 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 |
In reply to this post by Harry McKame
Philippe,
I added paintEvent & resizeEvent as you described, and they get called when the video is paused. Unfortunately, the blank/see-through spaces are still there. _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Ok. Don't know what to suggest more... Can you post screenshot and code ? Le Jeudi 13 avril 2017 18h07, Harry McKame <[hidden email]> a écrit : Philippe, I added paintEvent & resizeEvent as you described, and they get called when the video is paused. Unfortunately, the blank/see-through spaces are still there. _______________________________________________ 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 |
PS : other things I do: - setAttribute(Qt::WA_NativeWindow); in the constructor of the widget that displays video - call winId() in same constructor so the native window gets realized early (and not late when getting the gstreamer event requesting the win id) - QApplication::setAttribute(Qt::AA_DontCreateNativeWidgetSiblings, true); in the application main() Le Jeudi 13 avril 2017 18h13, philippe renon <[hidden email]> a écrit : Ok. Don't know what to suggest more... Can you post screenshot and code ? Le Jeudi 13 avril 2017 18h07, Harry McKame <[hidden email]> a écrit : Philippe, I added paintEvent & resizeEvent as you described, and they get called when the video is paused. Unfortunately, the blank/see-through spaces are still there. _______________________________________________ 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 |
Free forum by Nabble | Edit this page |