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

cefsrc: Clean up CEF object refs #95

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

aiden-jeffrey
Copy link
Contributor

First raised here - #90 (comment) - I am seeing some buffer corruption in the first OnPaint call when running multiple cefsrc elements.

It's not super deterministic, but looks like this:
image

with the next frame being a successful paint:
image

I think the issue is possibly a CEF one (see https://magpcss.org/ceforum/viewtopic.php?f=6&t=18906), but this branch is me trying to improve the Cef object cleanup (to no avail - doesn't fix the issue, but pushing to get your thoughts).

I wonder if we should just drop the first frame / OnPaint call?

Commit msg:
We were never setting src->app, so I removed it from the struct... Also I added the BrowserClient to _GstCefSrc, so that I could try and ensure it is getting dereferenced.

We were never setting src->app, so I removed it from the struct...
Also I added the BrowserClient to _GstCefSrc, so that I could try and
ensure it is getting dereferenced.
@@ -967,6 +967,8 @@ gst_cef_src_stop (GstBaseSrc *base_src)
{
GstCefSrc *src = GST_CEF_SRC (base_src);

GST_OBJECT_LOCK (src);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this needed? Taking the object lock then waiting is a bit awkward, it could mean an for instance an application potentially blocking while trying to set a property from its main thread

@MathieuDuponchelle
Copy link
Collaborator

I wonder if we should just drop the first frame / OnPaint call?

I think it would be best to first check with upstream before adding workarounds in the element.

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.

2 participants