[webkit-changes] [WebKit/WebKit] b84521: [MSE][GStreamer] Relax h264/h265 codec check for MSE

Enrique Ocaña González noreply at github.com
Wed Nov 2 03:20:40 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b84521e66dedfbd7f984017dee3f5a7a8191b165
      https://github.com/WebKit/WebKit/commit/b84521e66dedfbd7f984017dee3f5a7a8191b165
  Author: Enrique Ocaña González <eocanha at igalia.com>
  Date:   2022-11-02 (Wed, 02 Nov 2022)

  Changed paths:
    M Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.cpp
    M Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.h
    M Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.cpp

  Log Message:
  -----------
  [MSE][GStreamer] Relax h264/h265 codec check for MSE
https://bugs.webkit.org/show_bug.cgi?id=247129

Reviewed by Alicia Boya Garcia.

Some platforms disable/remove software parsers because of the way
encrypted playback is implemented, but we still want working MSE
playback there.

Although software parsers are strongly recommended for MSE playback
(eg: to complete info from buffers coming from some js transmuxers),
they aren't strictly needed (at your own risk!).

However, some video decoders (eg: the OMX h264 decoder) can only
accept some of the available formats (only stream-format=byte-stream
in the case of OMX). In that case, a parser is still needed in order
to convert between formats before supplying buffers to the decoder.

This patch checks that the most efficient decoder (hardware if
available, software if not) supports both formats. If the most
efficient decoder doesn't support all the formats, a parser is
demanded to be available. If it's not available, the affected codec
(h264, h265) is declared as not supported.

Inspired by work by Eugene Mutavchi <Ievgen_Mutavchi at comcast.com>
See: https://github.com/WebPlatformForEmbedded/WPEWebKit/pull/948

* Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.cpp:
(WebCore::GStreamerRegistryScanner::initializeDecoders): Ask for the corresponding parser if any of the h264 or h265 decoders support don't support any of the possible stream-format variants. If the parser isn't present, declare the corresponding codec as unsupported.
* Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.h:
(WebCore::GStreamerRegistryScanner::RegistryLookupResult::merge): Added method to merge two results, supported when both are supported, and using hardware when both are using hardware.
(WebCore::GStreamerRegistryScanner::RegistryLookupResult::operator==): Added equality operator.
(WebCore::GStreamerRegistryScanner::RegistryLookupResult::operator!=): Added inequality operator.
* Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.cpp:
(WebCore::createOptionalParserForFormat): Warn when a parser can't be created.

Canonical link: https://commits.webkit.org/256222@main




More information about the webkit-changes mailing list