icecat: update to upstream version 128.0.14-1gnu1

This commit is contained in:
Ark74 2025-08-20 11:58:34 -06:00
parent 0cdda4f34e
commit 56c3deff60
77 changed files with 8997 additions and 3862 deletions

View file

@ -10,7 +10,7 @@
using namespace cdm;
ClearKeyCDM::ClearKeyCDM(Host_10* aHost) {
ClearKeyCDM::ClearKeyCDM(Host_11* aHost) {
mHost = aHost;
mSessionManager = new ClearKeySessionManager(mHost);
}

View file

@ -20,7 +20,7 @@
# include "WMFUtils.h"
#endif
class ClearKeyCDM : public cdm::ContentDecryptionModule_10 {
class ClearKeyCDM final : public cdm::ContentDecryptionModule_11 {
private:
RefPtr<ClearKeySessionManager> mSessionManager;
#ifdef ENABLE_WMF
@ -29,10 +29,10 @@ class ClearKeyCDM : public cdm::ContentDecryptionModule_10 {
bool mIsProtectionQueryEnabled = false;
protected:
cdm::Host_10* mHost;
cdm::Host_11* mHost;
public:
explicit ClearKeyCDM(cdm::Host_10* aHost);
explicit ClearKeyCDM(cdm::Host_11* aHost);
void Initialize(bool aAllowDistinctiveIdentifier, bool aAllowPersistentState,
bool aUseHardwareSecureCodecs) override;

View file

@ -27,7 +27,7 @@
using namespace wmf;
VideoDecoder::VideoDecoder(cdm::Host_10* aHost)
VideoDecoder::VideoDecoder(cdm::Host_11* aHost)
: mHost(aHost), mHasShutdown(false) {
CK_LOGD("VideoDecoder created");
@ -219,9 +219,9 @@ VideoDecoder::SampleToVideoFrame(IMFSample* aSample, int32_t aPictureWidth,
uint32_t srcUVSize = stride * (aFrameHeight + padding) / 4;
uint32_t halfStride = (stride + 1) / 2;
aVideoFrame->SetStride(cdm::VideoPlane::kYPlane, stride);
aVideoFrame->SetStride(cdm::VideoPlane::kUPlane, halfStride);
aVideoFrame->SetStride(cdm::VideoPlane::kVPlane, halfStride);
aVideoFrame->SetStride(cdm::kYPlane, stride);
aVideoFrame->SetStride(cdm::kUPlane, halfStride);
aVideoFrame->SetStride(cdm::kVPlane, halfStride);
aVideoFrame->SetSize(cdm::Size{aPictureWidth, aPictureHeight});
@ -252,17 +252,17 @@ VideoDecoder::SampleToVideoFrame(IMFSample* aSample, int32_t aPictureWidth,
uint8_t* outBuffer = buffer->Data();
aVideoFrame->SetPlaneOffset(cdm::VideoPlane::kYPlane, 0);
aVideoFrame->SetPlaneOffset(cdm::kYPlane, 0);
// Offset of U plane is the size of the Y plane, excluding the padding that
// WMF adds.
uint32_t dstUOffset = stride * aPictureHeight;
aVideoFrame->SetPlaneOffset(cdm::VideoPlane::kUPlane, dstUOffset);
aVideoFrame->SetPlaneOffset(cdm::kUPlane, dstUOffset);
// Offset of the V plane is the size of the Y plane + the size of the U plane,
// excluding any padding WMF adds.
uint32_t dstVOffset = stride * aPictureHeight + (stride * aPictureHeight) / 4;
aVideoFrame->SetPlaneOffset(cdm::VideoPlane::kVPlane, dstVOffset);
aVideoFrame->SetPlaneOffset(cdm::kVPlane, dstVOffset);
// Copy the pixel data, excluding WMF's padding.
memcpy(outBuffer, data, stride * aPictureHeight);

View file

@ -30,7 +30,7 @@
class VideoDecoder : public RefCounted {
public:
explicit VideoDecoder(cdm::Host_10* aHost);
explicit VideoDecoder(cdm::Host_11* aHost);
cdm::Status InitDecode(const cdm::VideoDecoderConfig_2& aConfig);
@ -61,7 +61,7 @@ class VideoDecoder : public RefCounted {
int32_t aFrameHeight,
cdm::VideoFrame* aVideoFrame);
cdm::Host_10* mHost;
cdm::Host_11* mHost;
wmf::AutoPtr<wmf::WMFH264Decoder> mDecoder;
std::queue<wmf::CComPtr<IMFSample>> mOutputQueue;

View file

@ -55,7 +55,7 @@ void* CreateCdmInstance(int cdm_interface_version, const char* key_system,
GetCdmHostFunc get_cdm_host_func, void* user_data) {
CK_LOGE("ClearKey CreateCDMInstance");
if (cdm_interface_version != cdm::ContentDecryptionModule_10::kVersion) {
if (cdm_interface_version != cdm::ContentDecryptionModule_11::kVersion) {
CK_LOGE(
"ClearKey CreateCDMInstance failed due to requesting unsupported "
"version %d.",
@ -81,7 +81,7 @@ void* CreateCdmInstance(int cdm_interface_version, const char* key_system,
}
#endif
cdm::Host_10* host = static_cast<cdm::Host_10*>(
cdm::Host_11* host = static_cast<cdm::Host_11*>(
get_cdm_host_func(cdm_interface_version, user_data));
ClearKeyCDM* clearKey = new ClearKeyCDM(host);

View file

@ -70,10 +70,10 @@ class WMFClearKeyCDM final
};
// In order to reuse existing Gecko clearkey implementation, we need to
// inherit the class `cdm::Host_10`.
// inherit the class `cdm::Host_11`.
// TODO : add a way to assert thread usage. It would be used on MF thread pool
// and the media supervisor thread pool.
class SessionManagerWrapper final : public RefCounted, private cdm::Host_10 {
class SessionManagerWrapper final : public RefCounted, private cdm::Host_11 {
public:
explicit SessionManagerWrapper(WMFClearKeyCDM* aCDM);
@ -94,7 +94,7 @@ class SessionManagerWrapper final : public RefCounted, private cdm::Host_10 {
private:
~SessionManagerWrapper();
// cdm::Host_10
// cdm::Host_11
void OnInitialized(bool aSuccess) override {}
void OnResolveKeyStatusPromise(uint32_t aPromiseId,
cdm::KeyStatus aKeyStatus) override {}
@ -133,6 +133,7 @@ class SessionManagerWrapper final : public RefCounted, private cdm::Host_10 {
void OnDeferredInitializationDone(cdm::StreamType aStreamType,
cdm::Status aDecoderStatus) override {}
void RequestStorageId(uint32_t aVersion) override {}
void ReportMetrics(cdm::MetricName aMetricName, uint64_t aValue) override {}
cdm::Buffer* Allocate(uint32_t aCapacity) override;
void SetTimer(int64_t aDelayMs, void* aContext) override {}
cdm::Time GetCurrentWallTime() override { return 0.0; }
@ -145,7 +146,7 @@ class SessionManagerWrapper final : public RefCounted, private cdm::Host_10 {
// This is a RAII helper class to use ClearKeySessionManager::XXXSession
// methods in a sync style, which is what MFCDM is required.
// ClearKeySessionManager uses cdm::Host_10's OnResolve/RejectXXX as callback
// ClearKeySessionManager uses cdm::Host_11's OnResolve/RejectXXX as callback
// to report whether those function calls relatd with specific promise id
// succeed or not. As we only do temporary session for ClearKey testing, we
// don't need to wait to setup the storage so calling those XXXsession
@ -155,7 +156,7 @@ class SessionManagerWrapper final : public RefCounted, private cdm::Host_10 {
// [How to to use this class, not thread-safe]
// 1. create it on the stack
// 2. use GetPromiseId() to generate a fake promise id for tracking
// 3. in cdm::Host_10's callback function, check promise id to know what
// 3. in cdm::Host_11's callback function, check promise id to know what
// result needs to be set
// 4. check result to see if the session method succeed or not
class SyncResultChecker final {