[webkit-changes] [WebKit/WebKit] 0717ba: [GStreamer][WebCodecs] Build video encoder active ...

Philippe Normand noreply at github.com
Mon Sep 4 07:31:44 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 0717ba7dec18b44a84043c0b7a83db6f7ae97a62
      https://github.com/WebKit/WebKit/commit/0717ba7dec18b44a84043c0b7a83db6f7ae97a62
  Author: Philippe Normand <philn at igalia.com>
  Date:   2023-09-04 (Mon, 04 Sep 2023)

  Changed paths:
    M Source/WebCore/platform/graphics/gstreamer/VideoEncoderGStreamer.cpp
    M Source/WebCore/platform/graphics/gstreamer/VideoEncoderGStreamer.h

  Log Message:
  -----------
  [GStreamer][WebCodecs] Build video encoder active configuration from source pad caps
https://bugs.webkit.org/show_bug.cgi?id=261084

Reviewed by Xabier Rodriguez-Calvar.

The active configuration should now have a valid header buffer and colorspace, filled from the caps
of the underlying GStreamer encoder source pad. Some encoders store the header in
`streamheaders` (vp8, vp9) and some use a `codec_data` field (x264), so both cases need to be
handled.

Drive-by: Weaken the link between the GStreamerInternalVideoEncoder and its GStreamerElementHarness
in order to avoid memory leaks.

* Source/WebCore/platform/graphics/gstreamer/VideoEncoderGStreamer.cpp:
(WebCore::GStreamerInternalVideoEncoder::create):
(WebCore::GStreamerVideoEncoder::create):
(WebCore::GStreamerVideoEncoder::GStreamerVideoEncoder):
(WebCore::GStreamerInternalVideoEncoder::GStreamerInternalVideoEncoder):
(WebCore::GStreamerInternalVideoEncoder::encode):
* Source/WebCore/platform/graphics/gstreamer/VideoEncoderGStreamer.h:

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




More information about the webkit-changes mailing list