mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-24 09:27:31 +09:00
Merge remote-tracking branch 'origin/tracking' into custom
This commit is contained in:
commit
7f068ecce3
969 changed files with 96279 additions and 469 deletions
|
|
@ -130,9 +130,11 @@ public:
|
|||
virtual bool Supports(const TrackInfo& aTrackInfo,
|
||||
DecoderDoctorDiagnostics* aDiagnostics) const
|
||||
{
|
||||
// By default, fall back to SupportsMimeType with just the MIME string.
|
||||
// (So PDMs do not need to override this method -- yet.)
|
||||
return SupportsMimeType(aTrackInfo.mMimeType, aDiagnostics);
|
||||
if (!SupportsMimeType(aTrackInfo.mMimeType, aDiagnostics)) {
|
||||
return false;
|
||||
}
|
||||
const auto videoInfo = aTrackInfo.GetAsVideoInfo();
|
||||
return !videoInfo || SupportsBitDepth(videoInfo->mBitDepth, aDiagnostics);
|
||||
}
|
||||
|
||||
enum class ConversionRequired : uint8_t {
|
||||
|
|
@ -154,6 +156,15 @@ protected:
|
|||
friend class PDMFactory;
|
||||
friend class dom::RemoteDecoderModule;
|
||||
|
||||
// Indicates if the PlatformDecoderModule supports decoding of aBitDepth.
|
||||
// Should override this method when the platform can support bitDepth != 8.
|
||||
virtual bool SupportsBitDepth(const uint8_t aBitDepth,
|
||||
DecoderDoctorDiagnostics* aDiagnostics) const
|
||||
{
|
||||
return aBitDepth == 8;
|
||||
}
|
||||
|
||||
|
||||
// Creates a Video decoder. The layers backend is passed in so that
|
||||
// decoders can determine whether hardware accelerated decoding can be used.
|
||||
// Asynchronous decoding of video should be done in runnables dispatched
|
||||
|
|
|
|||
|
|
@ -77,6 +77,21 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
protected:
|
||||
bool SupportsBitDepth(const uint8_t aBitDepth,
|
||||
DecoderDoctorDiagnostics* aDiagnostics) const override
|
||||
{
|
||||
// We don't support bitDepth > 8 when compositor backend is D3D11.
|
||||
// But we don't have KnowsCompositor or any object
|
||||
// that we can ask for the layersbackend type.
|
||||
// We should remove this restriction until
|
||||
// we solve the D3D11 compositor backend issue.
|
||||
#if defined(XP_LINUX) || defined(XP_MACOSX)
|
||||
return true;
|
||||
#endif
|
||||
return aBitDepth == 8;
|
||||
}
|
||||
|
||||
private:
|
||||
FFmpegLibWrapper* mLib;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -26,6 +26,14 @@ public:
|
|||
static FFmpegLibWrapper sLibAV;
|
||||
|
||||
static const char* sLibs[] = {
|
||||
#if defined(XP_DARWIN)
|
||||
"libavcodec.58.dylib",
|
||||
"libavcodec.57.dylib",
|
||||
"libavcodec.56.dylib",
|
||||
"libavcodec.55.dylib",
|
||||
"libavcodec.54.dylib",
|
||||
"libavcodec.53.dylib",
|
||||
#else
|
||||
"libavcodec.so.58",
|
||||
"libavcodec-ffmpeg.so.58",
|
||||
"libavcodec-ffmpeg.so.57",
|
||||
|
|
@ -35,6 +43,7 @@ static const char* sLibs[] = {
|
|||
"libavcodec.so.55",
|
||||
"libavcodec.so.54",
|
||||
"libavcodec.so.53",
|
||||
#endif
|
||||
};
|
||||
|
||||
/* static */ bool
|
||||
|
|
|
|||
|
|
@ -205,6 +205,14 @@ bool
|
|||
WMFDecoderModule::Supports(const TrackInfo& aTrackInfo,
|
||||
DecoderDoctorDiagnostics* aDiagnostics) const
|
||||
{
|
||||
// Check bit depth of video.
|
||||
// XXXMC: This is here in case we want to start accepting HDR video. Do we?
|
||||
// This currently defaults to a fail if video bitdepth != 8
|
||||
const auto videoInfo = aTrackInfo.GetAsVideoInfo();
|
||||
if (videoInfo && !SupportsBitDepth(videoInfo->mBitDepth, aDiagnostics)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ((aTrackInfo.mMimeType.EqualsLiteral("audio/mp4a-latm") ||
|
||||
aTrackInfo.mMimeType.EqualsLiteral("audio/mp4")) &&
|
||||
WMFDecoderModule::HasAAC()) {
|
||||
|
|
@ -221,7 +229,7 @@ WMFDecoderModule::Supports(const TrackInfo& aTrackInfo,
|
|||
return false;
|
||||
}
|
||||
} else {
|
||||
// Windows <=7 supports at most 1920x1088.
|
||||
// Windows 7 supports at most 1920x1088.
|
||||
if (videoInfo->mImage.width > 1920 || videoInfo->mImage.height > 1088) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue