Changeset 242725 in webkit
- Timestamp:
- Mar 11, 2019 12:21:48 PM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r242720 r242725 1 2019-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 1 19 2019-03-11 Jer Noble <jer.noble@apple.com> 2 20 -
trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
r242701 r242725 2446 2446 g_object_set(m_pipeline.get(), "mute", m_player->muted(), nullptr); 2447 2447 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 2457 2448 g_signal_connect_swapped(m_pipeline.get(), "source-setup", G_CALLBACK(sourceSetupCallback), this); 2458 2449 if (m_isLegacyPlaybin) { -
trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp
r242703 r242725 270 270 MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase() 271 271 { 272 #if USE(GSTREAMER_GL)273 flushCurrentBuffer();274 #endif275 272 #if USE(TEXTURE_MAPPER_GL) && USE(NICOSIA) 276 273 downcast<Nicosia::ContentLayerTextureMapperImpl>(m_nicosiaLayer->impl()).invalidateClient(); … … 850 847 void MediaPlayerPrivateGStreamerBase::flushCurrentBuffer() 851 848 { 849 GST_DEBUG_OBJECT(pipeline(), "Flushing video sample"); 852 850 auto sampleLocker = holdLock(m_sampleMutex); 853 851 … … 861 859 862 860 auto proxyOperation = 863 [ shouldWait = m_isVideoDecoderVideo4Linux, pipeline = pipeline()](TextureMapperPlatformLayerProxy& proxy)861 [](TextureMapperPlatformLayerProxy& proxy) 864 862 { 865 GST_DEBUG_OBJECT(pipeline, "Flushing video sample %s", shouldWait ? "synchronously" : ""); 866 if (!shouldWait) 867 proxy.lock().lock(); 863 LockHolder locker(proxy.lock()); 868 864 869 865 if (proxy.isActive()) 870 proxy.dropCurrentBufferWhilePreservingTexture( shouldWait);866 proxy.dropCurrentBufferWhilePreservingTexture(); 871 867 }; 872 868 … … 1015 1011 1016 1012 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 { 1018 1014 // In some platforms (e.g. OpenMAX on the Raspberry Pi) when a resolution change occurs the 1019 1015 // 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 283 283 bool m_waitingForKey { false }; 284 284 #endif 285 286 mutable bool m_isVideoDecoderVideo4Linux { false };287 285 }; 288 286 -
trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp
r242701 r242725 37 37 #include <wtf/glib/RunLoopSourcePriority.h> 38 38 #endif 39 #include <wtf/Scope.h>40 39 41 40 static const Seconds releaseUnusedSecondsTolerance { 1_s }; … … 115 114 ASSERT(m_lock.isHeld()); 116 115 m_pendingBuffer = WTFMove(newBuffer); 117 m_wasBufferDropped = false;118 116 119 117 if (m_compositor) … … 190 188 } 191 189 192 void TextureMapperPlatformLayerProxy::dropCurrentBufferWhilePreservingTexture(bool shouldWait) 193 { 194 if (!shouldWait) 195 ASSERT(m_lock.isHeld()); 190 void TextureMapperPlatformLayerProxy::dropCurrentBufferWhilePreservingTexture() 191 { 192 ASSERT(m_lock.isHeld()); 196 193 197 194 if (m_pendingBuffer && m_pendingBuffer->hasManagedTexture()) { … … 204 201 205 202 m_compositorThreadUpdateFunction = 206 [this , shouldWait] {203 [this] { 207 204 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 });216 205 217 206 if (!m_compositor || !m_targetLayer || !m_currentBuffer) … … 226 215 appendToUnusedBuffers(WTFMove(prevBuffer)); 227 216 }; 228 229 if (shouldWait) {230 LockHolder holder(m_wasBufferDroppedLock);231 m_wasBufferDropped = false;232 }233 234 217 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 }241 218 } 242 219 -
trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxy.h
r242701 r242725 29 29 30 30 #include "TextureMapperGLHeaders.h" 31 #include <wtf/Condition.h>32 31 #include <wtf/Function.h> 33 32 #include <wtf/Lock.h> … … 70 69 71 70 WEBCORE_EXPORT void swapBuffer(); 72 void dropCurrentBufferWhilePreservingTexture( bool shouldWait = false);71 void dropCurrentBufferWhilePreservingTexture(); 73 72 74 73 bool scheduleUpdateOnCompositorThread(Function<void()>&&); … … 87 86 Lock m_lock; 88 87 89 Lock m_wasBufferDroppedLock;90 Condition m_wasBufferDroppedCondition;91 bool m_wasBufferDropped { false };92 93 88 Vector<std::unique_ptr<TextureMapperPlatformLayerBuffer>> m_usedBuffers; 94 89 std::unique_ptr<RunLoop::Timer<TextureMapperPlatformLayerProxy>> m_releaseUnusedBuffersTimer;
Note: See TracChangeset
for help on using the changeset viewer.