⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 268790 in webkit


Ignore:
Timestamp:
Oct 21, 2020, 3:50:48 AM (6 years ago)
Author:
Philippe Normand
Message:

[GStreamer] Create video sink only for video player
https://bugs.webkit.org/show_bug.cgi?id=217974

Reviewed by Xabier Rodriguez-Calvar.

There's no need for a video sink when the media player is created for an <audio> element.

  • platform/graphics/gstreamer/GStreamerCommon.cpp:

(WebCore::initializeGStreamerAndRegisterWebKitElements): Downrank the GL video sink, as we
create it on-demand and not through autovideosink anyway.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin): Avoid creating useless video sink.

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r268782 r268790  
     12020-10-21  Philippe Normand  <pnormand@igalia.com>
     2
     3        [GStreamer] Create video sink only for video player
     4        https://bugs.webkit.org/show_bug.cgi?id=217974
     5
     6        Reviewed by Xabier Rodriguez-Calvar.
     7
     8        There's no need for a video sink when the media player is created for an <audio> element.
     9
     10        * platform/graphics/gstreamer/GStreamerCommon.cpp:
     11        (WebCore::initializeGStreamerAndRegisterWebKitElements): Downrank the GL video sink, as we
     12        create it on-demand and not through autovideosink anyway.
     13        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
     14        (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin): Avoid creating useless video sink.
     15
    1162020-10-20  Julian Gonzalez  <julian_a_gonzalez@apple.com>
    217
  • trunk/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp

    r267787 r268790  
    318318        gst_element_register(0, "webkitwebsrc", GST_RANK_PRIMARY + 100, WEBKIT_TYPE_WEB_SRC);
    319319#if USE(GSTREAMER_GL)
    320         gst_element_register(0, "webkitglvideosink", GST_RANK_PRIMARY, WEBKIT_TYPE_GL_VIDEO_SINK);
     320        gst_element_register(0, "webkitglvideosink", GST_RANK_NONE, WEBKIT_TYPE_GL_VIDEO_SINK);
    321321#endif
    322322#endif
  • trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp

    r268576 r268790  
    27302730void MediaPlayerPrivateGStreamer::createGSTPlayBin(const URL& url, const String& pipelineName)
    27312731{
     2732    GST_INFO("Creating pipeline for %s player", m_player->isVideoPlayer() ? "video" : "audio");
    27322733    const char* playbinName = "playbin";
    27332734
     
    28142815    g_object_set(m_pipeline.get(), "text-sink", m_textAppSink.get(), nullptr);
    28152816
    2816     g_object_set(m_pipeline.get(), "video-sink", createVideoSink(), "audio-sink", createAudioSink(), nullptr);
     2817    g_object_set(m_pipeline.get(), "audio-sink", createAudioSink(), nullptr);
     2818    if (m_player->isVideoPlayer())
     2819        g_object_set(m_pipeline.get(), "video-sink", createVideoSink(), nullptr);
    28172820
    28182821    configurePlaySink();
     
    28262829            g_object_set(m_pipeline.get(), "audio-filter", scale, nullptr);
    28272830    }
     2831
     2832    if (!m_player->isVideoPlayer())
     2833        return;
    28282834
    28292835    if (!m_canRenderingBeAccelerated) {
Note: See TracChangeset for help on using the changeset viewer.