Title: [290203] trunk/Source/WebKit
- Revision
- 290203
- Author
- [email protected]
- Date
- 2022-02-19 04:36:54 -0800 (Sat, 19 Feb 2022)
Log Message
REGRESSION(r290175): ASSERTION FAILED: platformSample.type == PlatformSample::CMSampleBufferType while running webgl tests
https://bugs.webkit.org/show_bug.cgi?id=236878
Add a missing hunk.
Unreviewed, TBR Eric Carlson.
Patch by Kimmo Kinnunen <[email protected]> on 2022-02-19
* GPUProcess/media/RemoteVideoFrameObjectHeap.cpp:
(WebKit::RemoteVideoFrameObjectHeap::getVideoFrameBuffer):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (290202 => 290203)
--- trunk/Source/WebKit/ChangeLog 2022-02-19 09:01:20 UTC (rev 290202)
+++ trunk/Source/WebKit/ChangeLog 2022-02-19 12:36:54 UTC (rev 290203)
@@ -1,3 +1,14 @@
+2022-02-19 Kimmo Kinnunen <[email protected]>
+
+ REGRESSION(r290175): ASSERTION FAILED: platformSample.type == PlatformSample::CMSampleBufferType while running webgl tests
+ https://bugs.webkit.org/show_bug.cgi?id=236878
+
+ Add a missing hunk.
+ Unreviewed, TBR Eric Carlson.
+
+ * GPUProcess/media/RemoteVideoFrameObjectHeap.cpp:
+ (WebKit::RemoteVideoFrameObjectHeap::getVideoFrameBuffer):
+
2022-02-18 Sihui Liu <[email protected]>
ASSERTION FAILED: !hasAnyOpenConnections() in UniqueIDBDatabase::~UniqueIDBDatabase()
Modified: trunk/Source/WebKit/GPUProcess/media/RemoteVideoFrameObjectHeap.cpp (290202 => 290203)
--- trunk/Source/WebKit/GPUProcess/media/RemoteVideoFrameObjectHeap.cpp 2022-02-19 09:01:20 UTC (rev 290202)
+++ trunk/Source/WebKit/GPUProcess/media/RemoteVideoFrameObjectHeap.cpp 2022-02-19 12:36:54 UTC (rev 290203)
@@ -33,6 +33,8 @@
#include "RemoteVideoFrameProxy.h"
#if PLATFORM(COCOA)
+#include <WebCore/MediaSampleAVFObjC.h>
+#include <WebCore/VideoFrameCV.h>
#include <pal/cf/CoreMediaSoftLink.h>
#endif
@@ -90,15 +92,21 @@
void RemoteVideoFrameObjectHeap::getVideoFrameBuffer(RemoteVideoFrameReadReference&& read)
{
auto identifier = read.identifier();
- auto mediaSample = retire(WTFMove(read), 0_s);
+ auto videoFrame = retire(WTFMove(read), 0_s);
- if (!mediaSample)
+ if (!videoFrame)
m_connection->send(Messages::RemoteVideoFrameObjectHeapProxyProcessor::VideoFrameBufferNotFound { identifier }, 0);
+ RetainPtr<CVPixelBufferRef> pixelBuffer;
+ if (is<VideoFrameCV>(videoFrame))
+ pixelBuffer = downcast<VideoFrameCV>(*videoFrame).pixelBuffer();
+ else if (is<MediaSampleAVFObjC>(*videoFrame))
+ pixelBuffer = downcast<MediaSampleAVFObjC>(*videoFrame).pixelBuffer();
+ else {
+ ASSERT_NOT_REACHED();
+ return;
+ }
- auto platformSample = mediaSample->platformSample();
- ASSERT(platformSample.type == PlatformSample::CMSampleBufferType);
-
- m_sharedVideoFrameWriter.write(static_cast<CVPixelBufferRef>(PAL::CMSampleBufferGetImageBuffer(platformSample.sample.cmSampleBuffer)),
+ m_sharedVideoFrameWriter.write(pixelBuffer.get(),
[&](auto& semaphore) { m_connection->send(Messages::RemoteVideoFrameObjectHeapProxyProcessor::SetSharedVideoFrameSemaphore { semaphore }, 0); },
[&](auto& handle) { m_connection->send(Messages::RemoteVideoFrameObjectHeapProxyProcessor::SetSharedVideoFrameMemory { handle }, 0); }
);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes