Skip to content

Commit

Permalink
[GStreamer][MSE] video playback uses GstVA, except on YouTube
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=261892

Reviewed by Xabier Rodriguez-Calvar.

Streams parsing is not needed for MediaStream cases because we do it upfront for incoming WebRTC
MediaStreams. It is however needed for MSE, otherwise decodebin3 might not auto-plug hardware
decoders.

* Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::configureElement):

Canonical link: https://commits.webkit.org/269068@main
  • Loading branch information
philn committed Oct 9, 2023
1 parent bcbbe4a commit d14f072
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2234,9 +2234,11 @@ void MediaPlayerPrivateGStreamer::configureElement(GstElement* element)
auto classifiers = elementClass.split('/');

// In GStreamer 1.20 and older urisourcebin mishandles source elements with dynamic pads. This
// is not an issue in 1.22.
// is not an issue in 1.22. Streams parsing is not needed for MediaStream cases because we do it
// upfront for incoming WebRTC MediaStreams. It is however needed for MSE, otherwise decodebin3
// might not auto-plug hardware decoders.
if (webkitGstCheckVersion(1, 22, 0) && g_str_has_prefix(elementName.get(), "urisourcebin") && (isMediaSource() || isMediaStreamPlayer()))
g_object_set(element, "use-buffering", FALSE, "parse-streams", FALSE, nullptr);
g_object_set(element, "use-buffering", FALSE, "parse-streams", !isMediaStreamPlayer(), nullptr);

// In case of playbin3 with <video ... preload="auto">, instantiate
// downloadbuffer element, otherwise the playbin3 would instantiate
Expand Down

0 comments on commit d14f072

Please sign in to comment.