nsresult GMPContentParent::GetGMPVideoEncoder(GMPVideoEncoderParent** aGMPVE) { GMP_LOG("GMPContentParent::GetGMPVideoEncoder(this=%p)", this); // returned with one anonymous AddRef that locks it until Destroy PGMPVideoEncoderParent* pvep = SendPGMPVideoEncoderConstructor(); if (!pvep) { return NS_ERROR_FAILURE; } GMPVideoEncoderParent* vep = static_cast<GMPVideoEncoderParent*>(pvep); // This addref corresponds to the Proxy pointer the consumer is returned. // It's dropped by calling Close() on the interface. NS_ADDREF(vep); *aGMPVE = vep; mVideoEncoders.AppendElement(vep); return NS_OK; }
nsresult GMPParent::GetGMPVideoEncoder(GMPVideoEncoderParent** aGMPVE) { MOZ_ASSERT(GMPThread() == NS_GetCurrentThread()); if (!EnsureProcessLoaded()) { return NS_ERROR_FAILURE; } // returned with one anonymous AddRef that locks it until Destroy PGMPVideoEncoderParent* pvep = SendPGMPVideoEncoderConstructor(); if (!pvep) { return NS_ERROR_FAILURE; } GMPVideoEncoderParent *vep = static_cast<GMPVideoEncoderParent*>(pvep); *aGMPVE = vep; mVideoEncoders.AppendElement(vep); return NS_OK; }
nsresult GMPParent::GetGMPVideoEncoder(GMPVideoEncoderParent** aGMPVE) { MOZ_ASSERT(GMPThread() == NS_GetCurrentThread()); if (!EnsureProcessLoaded()) { return NS_ERROR_FAILURE; } // returned with one anonymous AddRef that locks it until Destroy PGMPVideoEncoderParent* pvep = SendPGMPVideoEncoderConstructor(); if (!pvep) { return NS_ERROR_FAILURE; } GMPVideoEncoderParent *vep = static_cast<GMPVideoEncoderParent*>(pvep); // This addref corresponds to the Proxy pointer the consumer is returned. // It's dropped by calling Close() on the interface. NS_ADDREF(vep); *aGMPVE = vep; mVideoEncoders.AppendElement(vep); return NS_OK; }