Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport of selected bugfixes from the 1.18.6 release to fix the "Flicker" problem #2

Open
wants to merge 6 commits into
base: qgroundcontrol
Choose a base branch
from

Conversation

fredowski
Copy link

This merges some bugfixes from the official 1.18.6 release to the qgroundcontrol branch. The bugfixes are important for the Android version where a gstreamer pipeline setup will freeze after three video starts when decodebin is used. This shows that these bugfixes are for real bugs...

1.18.6 also introduces some overlay function but I only selected bugfixes which work with the older gstreamer versions which are used in QGC. A full merge of 1.18.6 plugins only works with gestreamer 1.18.6 due to the new overlay functions.

I test this in my qgc repository here: fredowski/qgroundcontrol#8

With these bugfix backports the QGC Video can work again with decodebin and show also the mpegts video formats.

ystreet and others added 6 commits September 15, 2022 22:31
Allows the application to be notified of the OpenGL context creation.
Techincally it is enough to activate at the beginning and then forget.
The crash is caused by a race condition where the render thread
calls a method on the QtGLVideoItem instance that was
previously destroyed by the main thread.
Also, less frequently, QtGLVideoItem::onSceneGraphInitialized
is called when QQuickItem::window is null, also causing a crash.

Fixes #798

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/781>
The only other place where these queued buffers are removed, is in
setCaps() but that is not called at all on shutdown so this list of
buffers could not be removed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1005>
… QML

We don't know exactly when QML will stop using them but it should be
safe to unref them after at least 2 more buffers were bound.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1009>
@fredowski fredowski changed the title Backport of selected bufixes from the 1.18.6 release to fix the "Flicker" problem Backport of selected bugfixes from the 1.18.6 release to fix the "Flicker" problem Sep 19, 2022
@patrickelectric
Copy link
Member

@fredowski I approved it but we use the official GST release and not our own anymore.

@fredowski
Copy link
Author

Thanks for looking at the PR! QGC uses the official 1.18.xx gstreamer but not the official videosink plugin. See:

https://github.com/mavlink/qgroundcontrol/blob/master/.gitmodules

This patch 9d782fa from @andrewvoznytsa is not part of the official gstreamer plugins 1.18 release. The patch is supposed to be available in 1.20 but that breaks building on linux. That is discussed in #10153. So as long as we are not moving to gstreamer plugins 1.20 we need these backports.

@patrickelectric
Copy link
Member

Thanks for clarifying it, sadly I don't have merge permission under this repository

@fredowski
Copy link
Author

@mrpollo: I guess this is ready for merging. This is part of: mavlink/qgroundcontrol#10420

@booo
Copy link

booo commented Dec 30, 2022

Can someone merge these backports? We need this in QGC.

@patrickelectric
Copy link
Member

Can't we just update to 1.20 and avoid the pain of maintaining, packing and distributing our own gstreamer version ?
It was a huge work to move away from this, and moving back will make it happen all again.

@booo
Copy link

booo commented Dec 31, 2022

Can't we just update to 1.20 and avoid the pain of maintaining, packing and distributing our own gstreamer version ? It was a huge work to move away from this, and moving back will make it happen all again.

As far as I understand we use this repo right now to build the videosink plugin. I don't think it's a move backwards if we backport a few commits that actually fix bugs in QGC.

If the patches we maintain here are upstream I guess we can move to 1.20. I think this was attempted here: mavlink/qgroundcontrol#10153 As far as I can see we still use the repo for the videosink??? If the official packages/libraries don't contain the bits we need we still have to keep this repo.

For ubuntu we can maybe backport packages from 22.04 release to 20.04 to avoid building gstreamer 1.20 from source.

@fredowski
Copy link
Author

I agree with @booo. That was discussed in #10153 . 1.20 is not available yet on the linux distributions.

@mrpollo mrpollo self-requested a review February 23, 2023 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants