mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1205083 - Don't enable low latency WMF video decoding as it crashes sometimes. r=jya
This commit is contained in:
parent
82307b4b31
commit
794bc2df1e
@ -218,7 +218,7 @@ MFTDecoder::Output(RefPtr<IMFSample>* aOutput)
|
||||
}
|
||||
|
||||
if (hr == MF_E_TRANSFORM_STREAM_CHANGE) {
|
||||
// Type change, probably geometric aperature change.
|
||||
// Type change, probably geometric aperture change.
|
||||
// Reconfigure decoder output type, so that GetOutputMediaType()
|
||||
// returns the new type, and return the error code to caller.
|
||||
// This is an expected failure, so don't warn on encountering it.
|
||||
|
@ -28,6 +28,7 @@ namespace mozilla {
|
||||
static bool sDXVAEnabled = false;
|
||||
static int sNumDecoderThreads = -1;
|
||||
static bool sIsIntelDecoderEnabled = false;
|
||||
static bool sLowLatencyMFTEnabled = false;
|
||||
|
||||
WMFDecoderModule::WMFDecoderModule()
|
||||
: mWMFInitialized(false)
|
||||
@ -68,6 +69,7 @@ WMFDecoderModule::Init()
|
||||
MOZ_ASSERT(NS_IsMainThread(), "Must be on main thread.");
|
||||
sDXVAEnabled = gfxPlatform::GetPlatform()->CanUseHardwareVideoDecoding();
|
||||
sIsIntelDecoderEnabled = Preferences::GetBool("media.webm.intel_decoder.enabled", false);
|
||||
sLowLatencyMFTEnabled = Preferences::GetBool("media.wmf.low-latency.enabled", false);
|
||||
SetNumOfDecoderThreads();
|
||||
}
|
||||
|
||||
@ -78,6 +80,13 @@ WMFDecoderModule::GetNumDecoderThreads()
|
||||
return sNumDecoderThreads;
|
||||
}
|
||||
|
||||
/* static */
|
||||
bool
|
||||
WMFDecoderModule::LowLatencyMFTEnabled()
|
||||
{
|
||||
return sLowLatencyMFTEnabled;
|
||||
}
|
||||
|
||||
nsresult
|
||||
WMFDecoderModule::Startup()
|
||||
{
|
||||
|
@ -41,6 +41,7 @@ public:
|
||||
|
||||
// Called from any thread, must call init first
|
||||
static int GetNumDecoderThreads();
|
||||
static bool LowLatencyMFTEnabled();
|
||||
private:
|
||||
bool mWMFInitialized;
|
||||
};
|
||||
|
@ -216,12 +216,13 @@ WMFVideoMFTManager::InitInternal(bool aForceD3D9)
|
||||
attr->GetUINT32(MF_SA_D3D_AWARE, &aware);
|
||||
attr->SetUINT32(CODECAPI_AVDecNumWorkerThreads,
|
||||
WMFDecoderModule::GetNumDecoderThreads());
|
||||
hr = attr->SetUINT32(CODECAPI_AVLowLatencyMode, TRUE);
|
||||
if (SUCCEEDED(hr)) {
|
||||
LOG("Enabling Low Latency Mode");
|
||||
}
|
||||
else {
|
||||
LOG("Couldn't enable Low Latency Mode");
|
||||
if (WMFDecoderModule::LowLatencyMFTEnabled()) {
|
||||
hr = attr->SetUINT32(CODECAPI_AVLowLatencyMode, TRUE);
|
||||
if (SUCCEEDED(hr)) {
|
||||
LOG("Enabling Low Latency Mode");
|
||||
} else {
|
||||
LOG("Couldn't enable Low Latency Mode");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -323,6 +323,7 @@ pref("media.use-blank-decoder", false);
|
||||
#ifdef MOZ_WMF
|
||||
pref("media.wmf.enabled", true);
|
||||
pref("media.wmf.decoder.thread-count", -1);
|
||||
pref("media.wmf.low-latency.enabled", false);
|
||||
#endif
|
||||
#if defined(MOZ_FFMPEG)
|
||||
pref("media.ffmpeg.enabled", true);
|
||||
|
@ -2,4 +2,4 @@
|
||||
type: testharness
|
||||
prefs: [media.mediasource.enabled:true]
|
||||
disabled:
|
||||
if (os == "linux") or ((os == "win") and (version == "6.1.7601")): https://bugzilla.mozilla.org/show_bug.cgi?id=1191138
|
||||
if (os == "linux") or (os == "win"): https://bugzilla.mozilla.org/show_bug.cgi?id=1191138
|
||||
|
Loading…
Reference in New Issue
Block a user