This CL was originally submitted by an external contributor in https://chromium-review.googlesource.com/c/external/webrtc/+/582051. I have rebased it to the new ObjC encoder class. BUG=webrtc:8022 Review-Url: https://codereview.webrtc.org/3003653002 Cr-Commit-Position: refs/heads/master@{#19486}