mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1193670: P1. Remove use of SharedDecoderManager. r=cpearce
This commit is contained in:
parent
a6dacb6716
commit
f66be846e2
@ -14,7 +14,6 @@
|
||||
#include "MediaInfo.h"
|
||||
#include "MediaFormatReader.h"
|
||||
#include "MediaResource.h"
|
||||
#include "SharedDecoderManager.h"
|
||||
#include "mozilla/SharedThreadPool.h"
|
||||
#include "VideoUtils.h"
|
||||
|
||||
@ -441,21 +440,6 @@ MediaFormatReader::EnsureDecodersCreated()
|
||||
false);
|
||||
|
||||
mVideo.mDecoderInitialized = false;
|
||||
// If we've disabled hardware acceleration for this reader, then we can't use
|
||||
// the shared decoder.
|
||||
if (mSharedDecoderManager &&
|
||||
mPlatform->SupportsSharedDecoders(mInfo.mVideo) &&
|
||||
!mHardwareAccelerationDisabled) {
|
||||
mVideo.mDecoder =
|
||||
mSharedDecoderManager->CreateVideoDecoder(mPlatform,
|
||||
mVideo.mInfo ?
|
||||
*mVideo.mInfo->GetAsVideoInfo() :
|
||||
mInfo.mVideo,
|
||||
mLayersBackendType,
|
||||
mDecoder->GetImageContainer(),
|
||||
mVideo.mTaskQueue,
|
||||
mVideo.mCallback);
|
||||
} else {
|
||||
// Decoders use the layers backend to decide if they can use hardware decoding,
|
||||
// so specify LAYERS_NONE if we want to forcibly disable it.
|
||||
mVideo.mDecoder =
|
||||
@ -467,7 +451,6 @@ MediaFormatReader::EnsureDecodersCreated()
|
||||
mHardwareAccelerationDisabled ? LayersBackend::LAYERS_NONE :
|
||||
mLayersBackendType,
|
||||
mDecoder->GetImageContainer());
|
||||
}
|
||||
NS_ENSURE_TRUE(mVideo.mDecoder != nullptr, false);
|
||||
}
|
||||
|
||||
@ -1606,22 +1589,6 @@ void MediaFormatReader::ReleaseMediaResources()
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
MediaFormatReader::SetIdle()
|
||||
{
|
||||
if (mSharedDecoderManager && mVideo.mDecoder) {
|
||||
mSharedDecoderManager->SetIdle(mVideo.mDecoder);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
MediaFormatReader::SetSharedDecoderManager(SharedDecoderManager* aManager)
|
||||
{
|
||||
#if !defined(MOZ_WIDGET_ANDROID)
|
||||
mSharedDecoderManager = aManager;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool
|
||||
MediaFormatReader::VideoIsHardwareAccelerated() const
|
||||
{
|
||||
|
@ -71,10 +71,7 @@ public:
|
||||
virtual bool ForceZeroStartTime() const override;
|
||||
|
||||
// For Media Resource Management
|
||||
void SetIdle() override;
|
||||
void ReleaseMediaResources() override;
|
||||
void SetSharedDecoderManager(SharedDecoderManager* aManager)
|
||||
override;
|
||||
|
||||
nsresult ResetDecode() override;
|
||||
|
||||
@ -434,8 +431,6 @@ private:
|
||||
nsRefPtr<CDMProxy> mCDMProxy;
|
||||
#endif
|
||||
|
||||
nsRefPtr<SharedDecoderManager> mSharedDecoderManager;
|
||||
|
||||
#if defined(READER_DORMANT_HEURISTIC)
|
||||
const bool mDormantEnabled;
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user