Bug 228947

Summary: Implement SFrameTransform error handling
Product: WebKit Reporter: youenn fablet <youennf>
Component: WebRTCAssignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Normal CC: annulen, benjamin, calvaris, cdumez, eric.carlson, esprehn+autocc, ews-watchlist, glenn, gyuyoung.kim, hta, jer.noble, kangil.han, kondapallykalyan, philipj, ryuan.choi, sergio, tommyw, 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=229055
Attachments:
Description Flags
Patch
none
Patch none

Description youenn fablet 2021-08-10 02:53:44 PDT
Implement SFrameTransform error handling
Comment 1 youenn fablet 2021-08-10 06:46:04 PDT
Created attachment 435253 [details]
Patch
Comment 2 youenn fablet 2021-08-10 08:53:59 PDT
Created attachment 435262 [details]
Patch
Comment 3 youenn fablet 2021-08-11 07:02:40 PDT
Comment on attachment 435262 [details]
Patch

bot error is unrelated
Comment 4 Eric Carlson 2021-08-11 10:11:45 PDT
Comment on attachment 435262 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=435262&action=review

> Source/WebCore/Modules/mediastream/RTCRtpSFrameTransform.cpp:118
> +static std::optional<Vector<uint8_t>> processFrame(const uint8_t* data, size_t size, RTCRtpSFrameTransformer& transformer, ScriptExecutionContextIdentifier identifier, const WeakPtr<RTCRtpSFrameTransform>& weakTransform)

It might be worth using Span here and the other places you pass around { uint8_t*, size_t } in these classes.
Comment 5 youenn fablet 2021-08-12 02:14:57 PDT
(In reply to Eric Carlson from comment #4)
> Comment on attachment 435262 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=435262&action=review
> 
> > Source/WebCore/Modules/mediastream/RTCRtpSFrameTransform.cpp:118
> > +static std::optional<Vector<uint8_t>> processFrame(const uint8_t* data, size_t size, RTCRtpSFrameTransformer& transformer, ScriptExecutionContextIdentifier identifier, const WeakPtr<RTCRtpSFrameTransform>& weakTransform)
> 
> It might be worth using Span here and the other places you pass around {
> uint8_t*, size_t } in these classes.

Good idea, I'll do the refactoring in a follow-up as this entails changes to transformer and frame classes.
Comment 6 EWS 2021-08-12 02:37:14 PDT
Committed r280958 (240464@main): <https://commits.webkit.org/240464@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 435262 [details].
Comment 7 Radar WebKit Bug Importer 2021-08-12 02:38:17 PDT
<rdar://problem/81837525>
Comment 8 youenn fablet 2021-08-12 02:46:32 PDT
> Good idea, I'll do the refactoring in a follow-up as this entails changes to
> transformer and frame classes.

https://bugs.webkit.org/show_bug.cgi?id=229029