Summary: | VideoFrame does not need to inherit from MediaSample | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | youenn fablet <youennf> | ||||||||||||||||||
Component: | WebRTC | Assignee: | youenn fablet <youennf> | ||||||||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||||||||
Severity: | Normal | CC: | eric.carlson, ews-watchlist, glenn, jer.noble, jonlee, philipj, sergio, webkit-bug-importer, youennf | ||||||||||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||||||||||
Version: | WebKit Nightly Build | ||||||||||||||||||||
Hardware: | Unspecified | ||||||||||||||||||||
OS: | Unspecified | ||||||||||||||||||||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=236496 | ||||||||||||||||||||
Bug Depends on: | 237884 | ||||||||||||||||||||
Bug Blocks: | |||||||||||||||||||||
Attachments: |
|
Description
youenn fablet
2022-03-18 05:24:07 PDT
Created attachment 455089 [details]
Patch
Created attachment 455384 [details]
Patch
Comment on attachment 455384 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=455384&action=review r=me once the bots are happy > Source/WebCore/platform/VideoFrame.cpp:69 > +#if PLATFORM(COCOA) && USE(AVFOUNDATION) > RefPtr<VideoFrameCV> VideoFrame::asVideoFrameCV() > { > + if (isCV()) > + return downcast<VideoFrameCV>(this); > + > auto buffer = pixelBuffer(); > if (!buffer) > return nullptr; > - > return VideoFrameCV::create(presentationTime(), isMirrored(), rotation(), buffer); > } > +#endif // PLATFORM(COCOA) && USE(AVFOUNDATION) > + > +#if !PLATFORM(COCOA) > +RefPtr<JSC::Uint8ClampedArray> VideoFrame::getRGBAImageData() const > +{ > + return nullptr; > +} > #endif Can these move to VideoFrame.mm? > Source/WebCore/platform/VideoFrame.mm:46 > + const OSType imageFormat = kCVPixelFormatType_32RGBA; > + RetainPtr<CFNumberRef> imageFormatNumber = adoptCF(CFNumberCreate(nullptr, kCFNumberIntType, &imageFormat)); > + > + RetainPtr<CFMutableDictionaryRef> conformerOptions = adoptCF(CFDictionaryCreateMutable(0, 1, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks)); > + CFDictionarySetValue(conformerOptions.get(), kCVPixelBufferPixelFormatTypeKey, imageFormatNumber.get()); > + PixelBufferConformerCV pixelBufferConformer(conformerOptions.get()); I think this be simplified to something like: auto pixelBufferConformer(@{ (__bridge NSString *)kCVPixelBufferPixelFormatTypeKey: @(kCVPixelFormatType_32RGBA) }); Created attachment 455471 [details]
Updated patch
Created attachment 455473 [details]
GStreamer fix
Created attachment 455480 [details]
GStreamer fix
Created attachment 455482 [details]
GStreamer fix
Created attachment 455487 [details]
GStreamer fix
Created attachment 455491 [details]
GStreamer fix
Committed r291744 (248776@main): <https://commits.webkit.org/248776@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 455491 [details]. It looks like this fixed the timeout in fast/mediastream/captureStream/canvas3d.html |