[Webkit-unassigned] [Bug 224090] [CoreIPC] Encoding/decoding of WebCore::CapabilityValueOrRange transmits padding bytes
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Apr 1 19:45:23 PDT 2021
https://bugs.webkit.org/show_bug.cgi?id=224090
--- Comment #1 from David Kilzer (:ddkilzer) <ddkilzer at webkit.org> ---
Note for potential reviewers (especially Alex):
WebCore::CapabilityValueOrRange could be changed to be a WTF::Variant, but to keep this patch simple, I started by fixing the issue of sending padding bytes first.
Also, it's been long enough since I've worked on CoreIPC that I'm not sure if this is a step forward to the "new" way of writing IPC decoders, but it keeps RealtimeMediaSourceCapabilities::decode() very simple to read by hiding the complexity in the CapabilityValueOrRange::decoder() method and in IPC/ArgumentCoders.h:
template<class Decoder>
bool RealtimeMediaSourceCapabilities::decode(Decoder& decoder, RealtimeMediaSourceCapabilities& capabilities)
{
return decoder.decode(capabilities.m_width)
&& decoder.decode(capabilities.m_height)
&& decoder.decode(capabilities.m_aspectRatio)
&& decoder.decode(capabilities.m_frameRate)
&& decoder.decode(capabilities.m_facingMode)
&& decoder.decode(capabilities.m_volume)
&& decoder.decode(capabilities.m_sampleRate)
&& decoder.decode(capabilities.m_sampleSize)
&& decoder.decode(capabilities.m_echoCancellation)
&& decoder.decode(capabilities.m_deviceId)
&& decoder.decode(capabilities.m_groupId)
&& decoder.decode(capabilities.m_supportedConstraints);
}
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210402/92f6316d/attachment-0001.htm>
More information about the webkit-unassigned
mailing list