Bug 1397307 - P3. Remove unused method. r=gerald

Code was incorrect anyway.

MozReview-Commit-ID: Bf0O4Mhu1P6

--HG--
extra : rebase_source : 79ff66e3bec257b9f72e8af9b06b023715172d69
This commit is contained in:
Jean-Yves Avenard 2017-09-11 17:37:44 +02:00
Родитель c59188889b
Коммит aa5caa2ae1
2 изменённых файлов: 0 добавлений и 63 удалений

Просмотреть файл

@ -143,9 +143,6 @@ public:
bool SupportsConfig(IMFMediaType* aType, float aFramerate) override;
bool CreateDXVA2Decoder(const VideoInfo& aVideoInfo,
nsACString& aFailureReason) override;
private:
bool CanCreateDecoder(const DXVA2_VideoDesc& aDesc,
const float aFramerate) const;
@ -543,31 +540,6 @@ DXVA2Manager::CreateD3D9DXVA(layers::KnowsCompositor* aKnowsCompositor,
return nullptr;
}
bool
D3D9DXVA2Manager::CreateDXVA2Decoder(const VideoInfo& aVideoInfo,
nsACString& aFailureReason)
{
MOZ_ASSERT(NS_IsMainThread());
DXVA2_VideoDesc desc;
desc.SampleWidth = aVideoInfo.mImage.width;
desc.SampleHeight = aVideoInfo.mImage.height;
desc.Format = (D3DFORMAT)MAKEFOURCC('N','V','1','2');
// Assume the current duration is representative for the entire video.
float framerate = 1000000.0 / aVideoInfo.mDuration.ToMicroseconds();
if (IsUnsupportedResolution(desc.SampleWidth, desc.SampleHeight, framerate)) {
return false;
}
mDecoder = CreateDecoder(desc);
if (!mDecoder) {
aFailureReason =
nsPrintfCString("Fail to create video decoder in D3D9DXVA2Manager.");
return false;
}
return true;
}
bool
D3D9DXVA2Manager::CanCreateDecoder(const DXVA2_VideoDesc& aDesc,
const float aFramerate) const
@ -658,9 +630,6 @@ public:
bool SupportsConfig(IMFMediaType* aType, float aFramerate) override;
bool CreateDXVA2Decoder(const VideoInfo& aVideoInfo,
nsACString& aFailureReason) override;
private:
HRESULT CreateFormatConverter();
@ -1183,32 +1152,6 @@ D3D11DXVA2Manager::ConfigureForSize(uint32_t aWidth, uint32_t aHeight)
return S_OK;
}
bool
D3D11DXVA2Manager::CreateDXVA2Decoder(const VideoInfo& aVideoInfo,
nsACString& aFailureReason)
{
MOZ_ASSERT(NS_IsMainThread());
D3D11_VIDEO_DECODER_DESC desc;
desc.Guid = mDecoderGUID;
desc.OutputFormat = DXGI_FORMAT_NV12;
desc.SampleWidth = aVideoInfo.mImage.width;
desc.SampleHeight = aVideoInfo.mImage.height;
// Assume the current duration is representative for the entire video.
float framerate = 1000000.0 / aVideoInfo.mDuration.ToMicroseconds();
if (IsUnsupportedResolution(desc.SampleWidth, desc.SampleHeight, framerate)) {
return false;
}
mDecoder = CreateDecoder(desc);
if (!mDecoder) {
aFailureReason =
nsPrintfCString("Fail to create video decoder in D3D11DXVA2Manager.");
return false;
}
return true;
}
bool
D3D11DXVA2Manager::CanCreateDecoder(const D3D11_VIDEO_DECODER_DESC& aDesc,
const float aFramerate) const

Просмотреть файл

@ -65,12 +65,6 @@ public:
virtual bool SupportsConfig(IMFMediaType* aType, float aFramerate) = 0;
// When we want to decode with DXVA2 directly instead of using it by MFT, we
// need to take responsibility for creating a decoder and handle the related
// decoding operations by ourself.
virtual bool CreateDXVA2Decoder(const VideoInfo& aVideoInfo,
nsACString& aFailureReason) = 0;
static bool IsNV12Supported(uint32_t aVendorID,
uint32_t aDeviceID,
const nsAString& aDriverVersionString);