зеркало из https://github.com/mozilla/gecko-dev.git
967567edb5
Makes transfer of samples between the content and CDM processes use shmems. The Chromium CDM API requires us to implement a synchronous interface to supply buffers to the CDM for it to write decrypted samples into. We want our buffers to be backed by shmems, in order to reduce the overhead of transferring decoded frames. However due to sandboxing restrictions, the CDM process cannot allocate shmems itself. We don't want to be doing synchronous IPC to request shmems from the content process, nor do we want to have to do intr IPC or make async IPC conform to the sync allocation interface. So instead we have the content process pre-allocate a set of shmems and give them to the CDM process in advance of them being needed. When the CDM needs to allocate a buffer for storing a decrypted sample, the CDM host gives it one of these shmems' buffers. When this is sent back to the content process, we copy the result out (uploading to a GPU surface for video frames), and send the shmem back to the CDM process so it can reuse it. We predict the size of buffer the CDM will allocate, and prepopulate the CDM's list of shmems with shmems of at least that size, plus a bit of padding for safety. We pad frames out to be the next multiple of 16, as we've seen some decoders do that. Normally the CDM won't allocate more than one buffer at once, but we've seen cases where it allocates two buffers, returns one and holds onto the other. So the minimum number of shmems we give to the CDM must be at least two, and the default is three for safety. MozReview-Commit-ID: 5FaWAst3aeh --HG-- extra : rebase_source : a0cb126e72bfb2905bcdf02e864dc654e8340410 |
||
---|---|---|
.. | ||
gmp-api | ||
widevine-adapter | ||
ChromiumCDMAdapter.cpp | ||
ChromiumCDMAdapter.h | ||
ChromiumCDMChild.cpp | ||
ChromiumCDMChild.h | ||
ChromiumCDMParent.cpp | ||
ChromiumCDMParent.h | ||
ChromiumCDMProxy.cpp | ||
ChromiumCDMProxy.h | ||
DecryptJob.cpp | ||
DecryptJob.h | ||
GMPCDMCallbackProxy.cpp | ||
GMPCDMCallbackProxy.h | ||
GMPCDMProxy.cpp | ||
GMPCDMProxy.h | ||
GMPCallbackBase.h | ||
GMPChild.cpp | ||
GMPChild.h | ||
GMPContentChild.cpp | ||
GMPContentChild.h | ||
GMPContentParent.cpp | ||
GMPContentParent.h | ||
GMPCrashHelper.cpp | ||
GMPCrashHelper.h | ||
GMPCrashHelperHolder.cpp | ||
GMPCrashHelperHolder.h | ||
GMPDecryptorChild.cpp | ||
GMPDecryptorChild.h | ||
GMPDecryptorParent.cpp | ||
GMPDecryptorParent.h | ||
GMPDecryptorProxy.h | ||
GMPDiskStorage.cpp | ||
GMPEncryptedBufferDataImpl.cpp | ||
GMPEncryptedBufferDataImpl.h | ||
GMPLoader.cpp | ||
GMPLoader.h | ||
GMPLog.h | ||
GMPMemoryStorage.cpp | ||
GMPMessageUtils.h | ||
GMPParent.cpp | ||
GMPParent.h | ||
GMPPlatform.cpp | ||
GMPPlatform.h | ||
GMPProcessChild.cpp | ||
GMPProcessChild.h | ||
GMPProcessParent.cpp | ||
GMPProcessParent.h | ||
GMPService.cpp | ||
GMPService.h | ||
GMPServiceChild.cpp | ||
GMPServiceChild.h | ||
GMPServiceParent.cpp | ||
GMPServiceParent.h | ||
GMPSharedMemManager.cpp | ||
GMPSharedMemManager.h | ||
GMPStorage.h | ||
GMPStorageChild.cpp | ||
GMPStorageChild.h | ||
GMPStorageParent.cpp | ||
GMPStorageParent.h | ||
GMPTimerChild.cpp | ||
GMPTimerChild.h | ||
GMPTimerParent.cpp | ||
GMPTimerParent.h | ||
GMPTypes.ipdlh | ||
GMPUtils.cpp | ||
GMPUtils.h | ||
GMPVideoDecoderChild.cpp | ||
GMPVideoDecoderChild.h | ||
GMPVideoDecoderParent.cpp | ||
GMPVideoDecoderParent.h | ||
GMPVideoDecoderProxy.h | ||
GMPVideoEncodedFrameImpl.cpp | ||
GMPVideoEncodedFrameImpl.h | ||
GMPVideoEncoderChild.cpp | ||
GMPVideoEncoderChild.h | ||
GMPVideoEncoderParent.cpp | ||
GMPVideoEncoderParent.h | ||
GMPVideoEncoderProxy.h | ||
GMPVideoHost.cpp | ||
GMPVideoHost.h | ||
GMPVideoPlaneImpl.cpp | ||
GMPVideoPlaneImpl.h | ||
GMPVideoi420FrameImpl.cpp | ||
GMPVideoi420FrameImpl.h | ||
PChromiumCDM.ipdl | ||
PGMP.ipdl | ||
PGMPContent.ipdl | ||
PGMPDecryptor.ipdl | ||
PGMPService.ipdl | ||
PGMPStorage.ipdl | ||
PGMPTimer.ipdl | ||
PGMPVideoDecoder.ipdl | ||
PGMPVideoEncoder.ipdl | ||
README.txt | ||
moz.build | ||
mozIGeckoMediaPluginChromeService.idl | ||
mozIGeckoMediaPluginService.idl |
README.txt
This directory contains code supporting Gecko Media Plugins (GMPs). The GMP API is not the same thing as the Media Plugin API (MPAPI).