Changeset 242725 in webkit


Ignore:
Timestamp:
Mar 11, 2019 12:21:48 PM (5 years ago)
Author:
zandobersek@gmail.com
Message:

Unreviewed. Manually rolling out r242701 and r242703 since the changes
are causing test timeouts and crashes on GTK and WPE.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:

(WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
(WebCore::MediaPlayerPrivateGStreamerBase::flushCurrentBuffer):
(WebCore::MediaPlayerPrivateGStreamerBase::createGLAppSink):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
  • platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp:

(WebCore::TextureMapperPlatformLayerProxy::pushNextBuffer):
(WebCore::TextureMapperPlatformLayerProxy::dropCurrentBufferWhilePreservingTexture):

  • platform/graphics/texmap/TextureMapperPlatformLayerProxy.h:

(): Deleted.

Location:
trunk/Source/WebCore
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r242720 r242725  
     12019-03-11  Zan Dobersek  <zdobersek@igalia.com>
     2
     3        Unreviewed. Manually rolling out r242701 and r242703 since the changes
     4        are causing test timeouts and crashes on GTK and WPE.
     5
     6        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
     7        (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
     8        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
     9        (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
     10        (WebCore::MediaPlayerPrivateGStreamerBase::flushCurrentBuffer):
     11        (WebCore::MediaPlayerPrivateGStreamerBase::createGLAppSink):
     12        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
     13        * platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp:
     14        (WebCore::TextureMapperPlatformLayerProxy::pushNextBuffer):
     15        (WebCore::TextureMapperPlatformLayerProxy::dropCurrentBufferWhilePreservingTexture):
     16        * platform/graphics/texmap/TextureMapperPlatformLayerProxy.h:
     17        (): Deleted.
     18
    1192019-03-11  Jer Noble  <jer.noble@apple.com>
    220
  • trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp

    r242701 r242725  
    24462446    g_object_set(m_pipeline.get(), "mute", m_player->muted(), nullptr);
    24472447
    2448     g_signal_connect(GST_BIN_CAST(m_pipeline.get()), "deep-element-added", G_CALLBACK(+[](GstBin*, GstBin* subBin, GstElement* element, MediaPlayerPrivateGStreamer* player) {
    2449         GUniquePtr<char> binName(gst_element_get_name(GST_ELEMENT_CAST(subBin)));
    2450         if (!g_str_has_prefix(binName.get(), "decodebin"))
    2451             return;
    2452 
    2453         GUniquePtr<char> elementName(gst_element_get_name(element));
    2454         player->m_isVideoDecoderVideo4Linux = g_str_has_prefix(elementName.get(), "v4l2");
    2455     }), this);
    2456 
    24572448    g_signal_connect_swapped(m_pipeline.get(), "source-setup", G_CALLBACK(sourceSetupCallback), this);
    24582449    if (m_isLegacyPlaybin) {
  • trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp

    r242703 r242725  
    270270MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase()
    271271{
    272 #if USE(GSTREAMER_GL)
    273     flushCurrentBuffer();
    274 #endif
    275272#if USE(TEXTURE_MAPPER_GL) && USE(NICOSIA)
    276273    downcast<Nicosia::ContentLayerTextureMapperImpl>(m_nicosiaLayer->impl()).invalidateClient();
     
    850847void MediaPlayerPrivateGStreamerBase::flushCurrentBuffer()
    851848{
     849    GST_DEBUG_OBJECT(pipeline(), "Flushing video sample");
    852850    auto sampleLocker = holdLock(m_sampleMutex);
    853851
     
    861859
    862860    auto proxyOperation =
    863         [shouldWait = m_isVideoDecoderVideo4Linux, pipeline = pipeline()](TextureMapperPlatformLayerProxy& proxy)
     861        [](TextureMapperPlatformLayerProxy& proxy)
    864862        {
    865             GST_DEBUG_OBJECT(pipeline, "Flushing video sample %s", shouldWait ? "synchronously" : "");
    866             if (!shouldWait)
    867                 proxy.lock().lock();
     863            LockHolder locker(proxy.lock());
    868864
    869865            if (proxy.isActive())
    870                 proxy.dropCurrentBufferWhilePreservingTexture(shouldWait);
     866                proxy.dropCurrentBufferWhilePreservingTexture();
    871867        };
    872868
     
    10151011
    10161012    GRefPtr<GstPad> pad = adoptGRef(gst_element_get_static_pad(appsink, "sink"));
    1017     gst_pad_add_probe(pad.get(), static_cast<GstPadProbeType>(GST_PAD_PROBE_TYPE_PUSH | GST_PAD_PROBE_TYPE_QUERY_DOWNSTREAM | GST_PAD_PROBE_TYPE_EVENT_FLUSH), [] (GstPad*, GstPadProbeInfo* info,  gpointer userData) -> GstPadProbeReturn {
     1013    gst_pad_add_probe(pad.get(), static_cast<GstPadProbeType>(GST_PAD_PROBE_TYPE_QUERY_DOWNSTREAM | GST_PAD_PROBE_TYPE_EVENT_FLUSH), [] (GstPad*, GstPadProbeInfo* info,  gpointer userData) -> GstPadProbeReturn {
    10181014        // In some platforms (e.g. OpenMAX on the Raspberry Pi) when a resolution change occurs the
    10191015        // pipeline has to be drained before a frame with the new resolution can be decoded.
  • trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h

    r242701 r242725  
    283283    bool m_waitingForKey { false };
    284284#endif
    285 
    286     mutable bool m_isVideoDecoderVideo4Linux { false };
    287285};
    288286
  • trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp

    r242701 r242725  
    3737#include <wtf/glib/RunLoopSourcePriority.h>
    3838#endif
    39 #include <wtf/Scope.h>
    4039
    4140static const Seconds releaseUnusedSecondsTolerance { 1_s };
     
    115114    ASSERT(m_lock.isHeld());
    116115    m_pendingBuffer = WTFMove(newBuffer);
    117     m_wasBufferDropped = false;
    118116
    119117    if (m_compositor)
     
    190188}
    191189
    192 void TextureMapperPlatformLayerProxy::dropCurrentBufferWhilePreservingTexture(bool shouldWait)
    193 {
    194     if (!shouldWait)
    195         ASSERT(m_lock.isHeld());
     190void TextureMapperPlatformLayerProxy::dropCurrentBufferWhilePreservingTexture()
     191{
     192    ASSERT(m_lock.isHeld());
    196193
    197194    if (m_pendingBuffer && m_pendingBuffer->hasManagedTexture()) {
     
    204201
    205202    m_compositorThreadUpdateFunction =
    206         [this, shouldWait] {
     203        [this] {
    207204            LockHolder locker(m_lock);
    208 
    209             auto maybeNotifySynchronousOperation = WTF::makeScopeExit([this, shouldWait]() {
    210                 if (shouldWait) {
    211                     LockHolder holder(m_wasBufferDroppedLock);
    212                     m_wasBufferDropped = true;
    213                     m_wasBufferDroppedCondition.notifyAll();
    214                 }
    215             });
    216205
    217206            if (!m_compositor || !m_targetLayer || !m_currentBuffer)
     
    226215                appendToUnusedBuffers(WTFMove(prevBuffer));
    227216        };
    228 
    229     if (shouldWait) {
    230         LockHolder holder(m_wasBufferDroppedLock);
    231         m_wasBufferDropped = false;
    232     }
    233 
    234217    m_compositorThreadUpdateTimer->startOneShot(0_s);
    235     if (shouldWait) {
    236         LockHolder holder(m_wasBufferDroppedLock);
    237         m_wasBufferDroppedCondition.wait(m_wasBufferDroppedLock, [this] {
    238             return m_wasBufferDropped;
    239         });
    240     }
    241218}
    242219
  • trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxy.h

    r242701 r242725  
    2929
    3030#include "TextureMapperGLHeaders.h"
    31 #include <wtf/Condition.h>
    3231#include <wtf/Function.h>
    3332#include <wtf/Lock.h>
     
    7069
    7170    WEBCORE_EXPORT void swapBuffer();
    72     void dropCurrentBufferWhilePreservingTexture(bool shouldWait = false);
     71    void dropCurrentBufferWhilePreservingTexture();
    7372
    7473    bool scheduleUpdateOnCompositorThread(Function<void()>&&);
     
    8786    Lock m_lock;
    8887
    89     Lock m_wasBufferDroppedLock;
    90     Condition m_wasBufferDroppedCondition;
    91     bool m_wasBufferDropped { false };
    92 
    9388    Vector<std::unique_ptr<TextureMapperPlatformLayerBuffer>> m_usedBuffers;
    9489    std::unique_ptr<RunLoop::Timer<TextureMapperPlatformLayerProxy>> m_releaseUnusedBuffersTimer;
Note: See TracChangeset for help on using the changeset viewer.