Bug 1826752 - Make media/gmp-clearkey/0.1 buildable outside of a unified build environment r=andi

Differential Revision: https://phabricator.services.mozilla.com/D174878
This commit is contained in:
serge-sans-paille 2023-04-18 09:42:14 +00:00
parent b8c9b55367
commit e035801cdc
4 changed files with 11 additions and 11 deletions

View File

@ -353,8 +353,6 @@ static bool SkipObject(ParserContext& aCtx) {
}
EXPECT_SYMBOL(aCtx, ',');
}
return false;
}
/**
@ -409,8 +407,6 @@ static bool SkipToken(ParserContext& aCtx) {
CK_LOGD("JWK parser skipping literal");
return SkipLiteral(aCtx);
}
return false;
}
static bool GetNextLabel(ParserContext& aCtx, string& aOutLabel) {

View File

@ -22,6 +22,7 @@
#include "ClearKeyUtils.h"
#include "ClearKeyDecryptionManager.h"
#include "VideoDecoder.h"
#include "content_decryption_module.h"
#include "mozilla/CheckedInt.h"
using namespace wmf;
@ -85,7 +86,7 @@ cdm::Status VideoDecoder::Decode(const cdm::InputBuffer_2& aInputBuffer,
std::vector<uint8_t>& buffer = data->mBuffer;
if (data->mCrypto.IsValid()) {
Status rv =
cdm::Status rv =
ClearKeyDecryptionManager::Get()->Decrypt(buffer, data->mCrypto);
if (STATUS_FAILED(rv)) {
@ -183,7 +184,7 @@ VideoDecoder::SampleToVideoFrame(IMFSample* aSample, int32_t aPictureWidth,
HRESULT hr;
CComPtr<IMFMediaBuffer> mediaBuffer;
aVideoFrame->SetFormat(kI420);
aVideoFrame->SetFormat(cdm::kI420);
// Must convert to contiguous mediaBuffer to use IMD2DBuffer interface.
hr = aSample->ConvertToContiguousBuffer(&mediaBuffer);
@ -303,7 +304,7 @@ cdm::Status VideoDecoder::Drain(cdm::VideoFrame* aVideoFrame) {
if (!mDecoder) {
CK_LOGD("Drain failed! Decoder was not initialized");
return Status::kDecodeError;
return cdm::Status::kDecodeError;
}
mDecoder->Drain();

View File

@ -28,6 +28,7 @@
#include <string>
#include "VideoLimits.h"
#include "content_decryption_module.h"
#include "gmp-platform.h"
#include "mozilla/Attributes.h"
@ -124,8 +125,12 @@ typedef int64_t Microseconds;
} \
}
#define STATUS_SUCCEEDED(x) ((x) == Status::kSuccess)
#define STATUS_FAILED(x) ((x) != Status::kSuccess)
inline bool STATUS_SUCCEEDED(cdm::Status status) {
return status == cdm::Status::kSuccess;
}
inline bool STATUS_FAILED(cdm::Status status) {
return !STATUS_SUCCEEDED(status);
}
#define MFPLAT_FUNC(_func, _dllname) extern decltype(::_func)* _func;
#include "WMFSymbols.h"

View File

@ -75,5 +75,3 @@ elif CONFIG["CC_TYPE"] == "clang-cl":
"-FI",
"stdio.h", # for sprintf() prototype
]
REQUIRES_UNIFIED_BUILD = True