Make media::VideoEncodeAccelerator::Initialize() asynchronous |
|
Issue descriptionmedia::VideoEncodeAccelerator::Initialize() [1] is defined to be synchronous (this forces the IPC message [2] and Mojo message [3] to be Sync). This is probably due to webrtc's encoder interface [4] method definition originating long time ago in software encoders, which are easy and synchronous. [1] https://cs.chromium.org/chromium/src/media/video/video_encode_accelerator.h?l=122 [2] https://cs.chromium.org/chromium/src/media/gpu/ipc/common/media_messages.h?l=151&gsn=GpuCommandBufferMsg_CreateVideoEncoder [3] https://cs.chromium.org/chromium/src/media/mojo/interfaces/video_encode_accelerator.mojom?q=video_encode_accelerator.mojom&sq=package:chromium&dr&l=50 [4] https://cs.chromium.org/chromium/src/third_party/webrtc/api/video_codecs/video_encoder.h?l=106 This forces the Chrome implementation to have to jump through hoops [5] to reconcile this interface with the fact that VEA::Initialize() has a synchronous true/false success indication [6] and a deferred indication via either a RequireBitstreamBuffers() (good) [7] or NotifiyError (bad) [8]. [5] https://cs.chromium.org/chromium/src/content/renderer/media/gpu/rtc_video_encoder.cc?l=844 [6] https://cs.chromium.org/chromium/src/content/renderer/media/gpu/rtc_video_encoder.cc?l=345 [7] https://cs.chromium.org/chromium/src/content/renderer/media/gpu/rtc_video_encoder.cc?l=493 [8] https://cs.chromium.org/chromium/src/content/renderer/media/gpu/rtc_video_encoder.cc?l=584 The point of this bug is to isolate the adaptation of synch interface vs async Mojo in just one file: rtc_video_encoder.cc. |
|
►
Sign in to add a comment |
|
Comment 1 by mcasas@chromium.org
, Jan 3 2018