зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1487811 - P2 Remove CDM8 interface specific IPDL. r=cpearce
Remove members only used by CDM8 from the IPDL and remove code that depended on the removed IPDL. Rename various instances of 'error' to 'exception' as from CDM9 'exception' is used exclusively to refer to promise failure states. Depends on D5628 Differential Revision: https://phabricator.services.mozilla.com/D5629 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
413ba3feef
Коммит
0a25798c4e
|
@ -43,10 +43,6 @@ public:
|
||||||
|
|
||||||
virtual void SessionClosed(const nsCString& aSessionId) = 0;
|
virtual void SessionClosed(const nsCString& aSessionId) = 0;
|
||||||
|
|
||||||
virtual void LegacySessionError(const nsCString& aSessionId,
|
|
||||||
nsresult aError,
|
|
||||||
uint32_t aSystemCode,
|
|
||||||
const nsCString& aMessage) = 0;
|
|
||||||
virtual void Terminated() = 0;
|
virtual void Terminated() = 0;
|
||||||
|
|
||||||
virtual void Shutdown() = 0;
|
virtual void Shutdown() = 0;
|
||||||
|
|
|
@ -55,13 +55,13 @@ ChromiumCDMCallbackProxy::ResolvePromise(uint32_t aPromiseId)
|
||||||
|
|
||||||
void
|
void
|
||||||
ChromiumCDMCallbackProxy::RejectPromise(uint32_t aPromiseId,
|
ChromiumCDMCallbackProxy::RejectPromise(uint32_t aPromiseId,
|
||||||
nsresult aError,
|
nsresult aException,
|
||||||
const nsCString& aErrorMessage)
|
const nsCString& aErrorMessage)
|
||||||
{
|
{
|
||||||
DispatchToMainThread("ChromiumCDMProxy::RejectPromise",
|
DispatchToMainThread("ChromiumCDMProxy::RejectPromise",
|
||||||
&ChromiumCDMProxy::RejectPromise,
|
&ChromiumCDMProxy::RejectPromise,
|
||||||
aPromiseId,
|
aPromiseId,
|
||||||
aError,
|
aException,
|
||||||
aErrorMessage);
|
aErrorMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -169,20 +169,6 @@ ChromiumCDMCallbackProxy::SessionClosed(const nsCString& aSessionId)
|
||||||
NS_ConvertUTF8toUTF16(aSessionId));
|
NS_ConvertUTF8toUTF16(aSessionId));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
ChromiumCDMCallbackProxy::LegacySessionError(const nsCString& aSessionId,
|
|
||||||
nsresult aError,
|
|
||||||
uint32_t aSystemCode,
|
|
||||||
const nsCString& aMessage)
|
|
||||||
{
|
|
||||||
DispatchToMainThread("ChromiumCDMProxy::OnSessionError",
|
|
||||||
&ChromiumCDMProxy::OnSessionError ,
|
|
||||||
NS_ConvertUTF8toUTF16(aSessionId),
|
|
||||||
aError,
|
|
||||||
aSystemCode,
|
|
||||||
NS_ConvertUTF8toUTF16(aMessage));
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
ChromiumCDMCallbackProxy::Terminated()
|
ChromiumCDMCallbackProxy::Terminated()
|
||||||
{
|
{
|
||||||
|
|
|
@ -33,7 +33,7 @@ public:
|
||||||
void ResolvePromise(uint32_t aPromiseId) override;
|
void ResolvePromise(uint32_t aPromiseId) override;
|
||||||
|
|
||||||
void RejectPromise(uint32_t aPromiseId,
|
void RejectPromise(uint32_t aPromiseId,
|
||||||
nsresult aError,
|
nsresult aException,
|
||||||
const nsCString& aErrorMessage) override;
|
const nsCString& aErrorMessage) override;
|
||||||
|
|
||||||
void SessionMessage(const nsACString& aSessionId,
|
void SessionMessage(const nsACString& aSessionId,
|
||||||
|
@ -48,10 +48,6 @@ public:
|
||||||
|
|
||||||
void SessionClosed(const nsCString& aSessionId) override;
|
void SessionClosed(const nsCString& aSessionId) override;
|
||||||
|
|
||||||
void LegacySessionError(const nsCString& aSessionId,
|
|
||||||
nsresult aError,
|
|
||||||
uint32_t aSystemCode,
|
|
||||||
const nsCString& aMessage) override;
|
|
||||||
void Terminated() override;
|
void Terminated() override;
|
||||||
|
|
||||||
void Shutdown() override;
|
void Shutdown() override;
|
||||||
|
|
|
@ -406,7 +406,7 @@ ChromiumCDMParent::RecvOnResolvePromise(const uint32_t& aPromiseId)
|
||||||
|
|
||||||
void
|
void
|
||||||
ChromiumCDMParent::RejectPromise(uint32_t aPromiseId,
|
ChromiumCDMParent::RejectPromise(uint32_t aPromiseId,
|
||||||
nsresult aError,
|
nsresult aException,
|
||||||
const nsCString& aErrorMessage)
|
const nsCString& aErrorMessage)
|
||||||
{
|
{
|
||||||
GMP_LOG(
|
GMP_LOG(
|
||||||
|
@ -417,7 +417,7 @@ ChromiumCDMParent::RejectPromise(uint32_t aPromiseId,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
mCDMCallback->RejectPromise(aPromiseId, aError, aErrorMessage);
|
mCDMCallback->RejectPromise(aPromiseId, aException, aErrorMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
static nsresult
|
static nsresult
|
||||||
|
@ -439,11 +439,11 @@ ToNsresult(uint32_t aException)
|
||||||
|
|
||||||
ipc::IPCResult
|
ipc::IPCResult
|
||||||
ChromiumCDMParent::RecvOnRejectPromise(const uint32_t& aPromiseId,
|
ChromiumCDMParent::RecvOnRejectPromise(const uint32_t& aPromiseId,
|
||||||
const uint32_t& aError,
|
const uint32_t& aException,
|
||||||
const uint32_t& aSystemCode,
|
const uint32_t& aSystemCode,
|
||||||
const nsCString& aErrorMessage)
|
const nsCString& aErrorMessage)
|
||||||
{
|
{
|
||||||
RejectPromise(aPromiseId, ToNsresult(aError), aErrorMessage);
|
RejectPromise(aPromiseId, ToNsresult(aException), aErrorMessage);
|
||||||
return IPC_OK();
|
return IPC_OK();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -504,26 +504,10 @@ ChromiumCDMParent::RecvOnSessionClosed(const nsCString& aSessionId)
|
||||||
return IPC_OK();
|
return IPC_OK();
|
||||||
}
|
}
|
||||||
|
|
||||||
ipc::IPCResult
|
|
||||||
ChromiumCDMParent::RecvOnLegacySessionError(const nsCString& aSessionId,
|
|
||||||
const uint32_t& aError,
|
|
||||||
const uint32_t& aSystemCode,
|
|
||||||
const nsCString& aMessage)
|
|
||||||
{
|
|
||||||
GMP_LOG("ChromiumCDMParent::RecvOnLegacySessionError(this=%p)", this);
|
|
||||||
if (!mCDMCallback || mIsShutdown) {
|
|
||||||
return IPC_OK();
|
|
||||||
}
|
|
||||||
|
|
||||||
mCDMCallback->LegacySessionError(
|
|
||||||
aSessionId, ToNsresult(aError), aSystemCode, aMessage);
|
|
||||||
return IPC_OK();
|
|
||||||
}
|
|
||||||
|
|
||||||
DecryptStatus
|
DecryptStatus
|
||||||
ToDecryptStatus(uint32_t aError)
|
ToDecryptStatus(uint32_t aStatus)
|
||||||
{
|
{
|
||||||
switch (static_cast<cdm::Status>(aError)) {
|
switch (static_cast<cdm::Status>(aStatus)) {
|
||||||
case cdm::kSuccess:
|
case cdm::kSuccess:
|
||||||
return DecryptStatus::Ok;
|
return DecryptStatus::Ok;
|
||||||
case cdm::kNoKey:
|
case cdm::kNoKey:
|
||||||
|
|
|
@ -118,10 +118,6 @@ protected:
|
||||||
const nsCString& aSessionId,
|
const nsCString& aSessionId,
|
||||||
const double& aSecondsSinceEpoch) override;
|
const double& aSecondsSinceEpoch) override;
|
||||||
ipc::IPCResult RecvOnSessionClosed(const nsCString& aSessionId) override;
|
ipc::IPCResult RecvOnSessionClosed(const nsCString& aSessionId) override;
|
||||||
ipc::IPCResult RecvOnLegacySessionError(const nsCString& aSessionId,
|
|
||||||
const uint32_t& aError,
|
|
||||||
const uint32_t& aSystemCode,
|
|
||||||
const nsCString& aMessage) override;
|
|
||||||
ipc::IPCResult RecvDecrypted(const uint32_t& aId,
|
ipc::IPCResult RecvDecrypted(const uint32_t& aId,
|
||||||
const uint32_t& aStatus,
|
const uint32_t& aStatus,
|
||||||
ipc::Shmem&& aData) override;
|
ipc::Shmem&& aData) override;
|
||||||
|
|
|
@ -14,10 +14,13 @@ async protocol PChromiumCDM
|
||||||
manager PGMPContent;
|
manager PGMPContent;
|
||||||
child:
|
child:
|
||||||
|
|
||||||
// cdm::ContentDecryptionModule8
|
// cdm::ContentDecryptionModule9
|
||||||
async Init(bool aAllowDistinctiveIdentifier,
|
async Init(bool aAllowDistinctiveIdentifier,
|
||||||
bool aAllowPersistentState);
|
bool aAllowPersistentState);
|
||||||
|
|
||||||
|
async GetStatusForPolicy(uint32_t aPromiseId,
|
||||||
|
nsCString aMinHdcpVersion);
|
||||||
|
|
||||||
async SetServerCertificate(uint32_t aPromiseId,
|
async SetServerCertificate(uint32_t aPromiseId,
|
||||||
uint8_t[] aServerCert);
|
uint8_t[] aServerCert);
|
||||||
|
|
||||||
|
@ -57,10 +60,7 @@ child:
|
||||||
async GiveBuffer(Shmem aShmem);
|
async GiveBuffer(Shmem aShmem);
|
||||||
|
|
||||||
async PurgeShmems();
|
async PurgeShmems();
|
||||||
|
|
||||||
// cdm::ContentDecryptionModule9
|
|
||||||
async GetStatusForPolicy(uint32_t aPromiseId,
|
|
||||||
nsCString aMinHdcpVersion);
|
|
||||||
|
|
||||||
parent:
|
parent:
|
||||||
async __delete__();
|
async __delete__();
|
||||||
|
@ -68,13 +68,12 @@ parent:
|
||||||
// cdm::Host9
|
// cdm::Host9
|
||||||
async OnResolvePromiseWithKeyStatus(uint32_t aPromiseId, uint32_t aKeyStatus);
|
async OnResolvePromiseWithKeyStatus(uint32_t aPromiseId, uint32_t aKeyStatus);
|
||||||
|
|
||||||
// cdm::Host8
|
|
||||||
async OnResolveNewSessionPromise(uint32_t aPromiseId, nsCString aSessionId);
|
async OnResolveNewSessionPromise(uint32_t aPromiseId, nsCString aSessionId);
|
||||||
|
|
||||||
async OnResolvePromise(uint32_t aPromiseId);
|
async OnResolvePromise(uint32_t aPromiseId);
|
||||||
|
|
||||||
async OnRejectPromise(uint32_t aPromiseId,
|
async OnRejectPromise(uint32_t aPromiseId,
|
||||||
uint32_t aError,
|
uint32_t aException,
|
||||||
uint32_t aSystemCode,
|
uint32_t aSystemCode,
|
||||||
nsCString aErrorMessage);
|
nsCString aErrorMessage);
|
||||||
|
|
||||||
|
@ -90,20 +89,15 @@ parent:
|
||||||
|
|
||||||
async OnSessionClosed(nsCString aSessionId);
|
async OnSessionClosed(nsCString aSessionId);
|
||||||
|
|
||||||
async OnLegacySessionError(nsCString aSessionId,
|
|
||||||
uint32_t aError,
|
|
||||||
uint32_t aSystemCode,
|
|
||||||
nsCString aMessage);
|
|
||||||
|
|
||||||
async ResolveLoadSessionPromise(uint32_t aPromiseId, bool aSuccessful);
|
async ResolveLoadSessionPromise(uint32_t aPromiseId, bool aSuccessful);
|
||||||
|
|
||||||
// Return values of cdm::ContentDecryptionModule8::Decrypt
|
// Return values of cdm::ContentDecryptionModule9::Decrypt
|
||||||
async Decrypted(uint32_t aId, uint32_t aStatus, Shmem aDecryptedData);
|
async Decrypted(uint32_t aId, uint32_t aStatus, Shmem aDecryptedData);
|
||||||
async DecryptFailed(uint32_t aId, uint32_t aStatus);
|
async DecryptFailed(uint32_t aId, uint32_t aStatus);
|
||||||
|
|
||||||
async OnDecoderInitDone(uint32_t aStatus);
|
async OnDecoderInitDone(uint32_t aStatus);
|
||||||
|
|
||||||
// Return values of cdm::ContentDecryptionModule8::DecryptAndDecodeFrame
|
// Return values of cdm::ContentDecryptionModule9::DecryptAndDecodeFrame
|
||||||
async DecodedShmem(CDMVideoFrame aFrame, Shmem aData);
|
async DecodedShmem(CDMVideoFrame aFrame, Shmem aData);
|
||||||
async DecodedData(CDMVideoFrame aFrame, uint8_t[] aData);
|
async DecodedData(CDMVideoFrame aFrame, uint8_t[] aData);
|
||||||
async DecodeFailed(uint32_t aStatus);
|
async DecodeFailed(uint32_t aStatus);
|
||||||
|
|
|
@ -1090,11 +1090,6 @@ private:
|
||||||
|
|
||||||
void SessionClosed(const nsCString& aSessionId) override { }
|
void SessionClosed(const nsCString& aSessionId) override { }
|
||||||
|
|
||||||
void LegacySessionError(const nsCString& aSessionId,
|
|
||||||
nsresult aError,
|
|
||||||
uint32_t aSystemCode,
|
|
||||||
const nsCString& aMessage) override { }
|
|
||||||
|
|
||||||
void Terminated() override { mRunner->Terminated(); }
|
void Terminated() override { mRunner->Terminated(); }
|
||||||
|
|
||||||
void Shutdown() override { mRunner->Shutdown(); }
|
void Shutdown() override { mRunner->Shutdown(); }
|
||||||
|
|
Загрузка…
Ссылка в новой задаче