Skip to content

Conversation

@emutavchi
Copy link
Collaborator

The default 200'000 is not enough and leads to frame drops during pipeline buildup.

Also, this PR adds an explicit type cast for max-buffers/max-bytes arguments set in GStreamerVideoDecoderFactory.cpp

The default 200'000 is not enough and leads to frame drops during
pipeline buildup.
@eocanha
Copy link
Member

eocanha commented Jan 15, 2026

Reviewing this...

{
m_src = makeElement("appsrc");
g_object_set(m_src, "is-live", TRUE, "do-timestamp", TRUE, "max-buffers", 2, "max-bytes", 0, nullptr);
g_object_set(m_src, "is-live", TRUE, "do-timestamp", TRUE, "max-buffers", static_cast<gint64>(2), "max-bytes", static_cast<guint64>(0), nullptr);
Copy link
Member

Choose a reason for hiding this comment

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

Note that this isn't actually increasing anything, just tidying up the argument types. Is this intended?

Copy link
Member

Choose a reason for hiding this comment

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

Also, both casts should be done to guint64, since that's the type used both for max-buffers and for max-bytes in appsrc.

I'm already correcting this in the version that I'm submitting for review upstream.

eocanha added a commit to eocanha/WebKit that referenced this pull request Jan 15, 2026
https://bugs.webkit.org/show_bug.cgi?id=305576

Reviewed by NOBODY (OOPS!).

The default value for max-bytes in 200000 is not enough and leads to
frame drops during pipeline buildup.

See: WebPlatformForEmbedded/WPEWebKit#1595

This patch increases the buffering size of the appsrc element used for
video tracks in GStreamerMediaStreamSource so that it can handle enough
buffering to allow for the rest of the pipeline to be built before
buffers start to be lost.

Types fo max-buffer/max-bytes args in GStreamerVideoDecoderFactory are
also enforced as guint64. This seems to be the recommended way to do it
according to the GObject documentation[1],

[1] https://docs.gtk.org/gobject/method.Object.set.html#description

Original author: Eugene Mutavchi <Ievgen_Mutavchi@comcast.com>

* Source/WebCore/platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp: Increase buffering size for video tracks.
* Source/WebCore/platform/mediastream/libwebrtc/gstreamer/GStreamerVideoDecoderFactory.cpp: Properly type guint64 parameters.
@eocanha eocanha added the upstream Related to an upstream bug (or should be at some point) label Jan 15, 2026
@eocanha
Copy link
Member

eocanha commented Jan 15, 2026

Submitted for review upstream as https://bugs.webkit.org/show_bug.cgi?id=305576
/ WebKit/WebKit#56646

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

upstream Related to an upstream bug (or should be at some point) wpe-2.46

Development

Successfully merging this pull request may close these issues.

3 participants