-
Notifications
You must be signed in to change notification settings - Fork 154
[GStreamer][WebRTC] increase size of apps max-bytes for video tracks #1595
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
[GStreamer][WebRTC] increase size of apps max-bytes for video tracks #1595
Conversation
The default 200'000 is not enough and leads to frame drops during pipeline buildup.
|
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); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @eocanha , this is intentional. It is needed on arm32, or it might pick up random data from the stack.
The increase is needed on the media stream source side only.
Also, both casts should be done to guint64
Yes, you're right. I guess I confused it with the type of 'max-latency'.
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.
|
Submitted for review upstream as https://bugs.webkit.org/show_bug.cgi?id=305576 |
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. The right types are used for the parameters, according to GObject best practices[1]. Aa an opportunistic cleanup task, types for max-buffer/max-bytes arguments 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 and use proper types for the parameters. * Source/WebCore/platform/mediastream/libwebrtc/gstreamer/GStreamerVideoDecoderFactory.cpp: Cleanup by properly typing guint64 parameters.
https://bugs.webkit.org/show_bug.cgi?id=305576 Reviewed by Xabier Rodriguez-Calvar. 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. The right types are used for the parameters, according to GObject best practices[1]. Aa an opportunistic cleanup task, types for max-buffer/max-bytes arguments 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 and use proper types for the parameters. * Source/WebCore/platform/mediastream/libwebrtc/gstreamer/GStreamerVideoDecoderFactory.cpp: Cleanup by properly typing guint64 parameters. Canonical link: https://commits.webkit.org/305705@main
https://bugs.webkit.org/show_bug.cgi?id=305576 Reviewed by Xabier Rodriguez-Calvar. The default value for max-bytes in 200000 is not enough and leads to frame drops during pipeline buildup. See: #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. The right types are used for the parameters, according to GObject best practices[1]. Aa an opportunistic cleanup task, types for max-buffer/max-bytes arguments 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 and use proper types for the parameters. * Source/WebCore/platform/mediastream/libwebrtc/gstreamer/GStreamerVideoDecoderFactory.cpp: Cleanup by properly typing guint64 parameters. Canonical link: https://commits.webkit.org/305705@main
|
Landed upstream as WebKit/WebKit@7a0c687 and backported to wpe-2.46 as 6dc7dda. Closing PR. |
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