dom/media: more eme fixes

This commit is contained in:
roytam1 2023-09-14 16:57:56 +08:00
commit 58a39ca8cb
9 changed files with 72 additions and 10 deletions

View file

@ -22,7 +22,9 @@
#include "GMPDecoderModule.h"
#endif
#ifdef MOZ_EME
#include "mozilla/CDMProxy.h"
#endif
#include "mozilla/ClearOnShutdown.h"
#include "mozilla/SharedThreadPool.h"
#include "mozilla/StaticPtr.h"
@ -35,7 +37,9 @@
#include "H264Converter.h"
#include "AgnosticDecoderModule.h"
#ifdef MOZ_EME
#include "EMEDecoderModule.h"
#endif
#include "DecoderDoctorDiagnostics.h"
@ -454,11 +458,13 @@ PDMFactory::GetDecoder(const TrackInfo& aTrackInfo,
return pdm.forget();
}
#ifdef MOZ_EME
void
PDMFactory::SetCDMProxy(CDMProxy* aProxy)
{
RefPtr<PDMFactory> m = new PDMFactory();
mEMEPDM = new EMEDecoderModule(aProxy, m);
}
#endif
} // namespace mozilla