зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1315850 - Stub out ChromiumCDMVideoDecoder. r=jya
MozReview-Commit-ID: 6I9N1c1nNMF --HG-- extra : rebase_source : 6c5a3706b37e122a67e5ec1670587f37e25a1bc6
This commit is contained in:
Родитель
c60d6c1294
Коммит
ffe9c27064
|
@ -0,0 +1,63 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim:set ts=2 sw=2 sts=2 et cindent: */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "ChromiumCDMVideoDecoder.h"
|
||||
#include "GMPService.h"
|
||||
#include "GMPVideoDecoder.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
ChromiumCDMVideoDecoder::ChromiumCDMVideoDecoder(
|
||||
const GMPVideoDecoderParams& aParams,
|
||||
CDMProxy* aCDMProxy)
|
||||
: mConfig(aParams.mConfig)
|
||||
, mCrashHelper(aParams.mCrashHelper)
|
||||
, mGMPThread(GetGMPAbstractThread())
|
||||
, mImageContainer(aParams.mImageContainer)
|
||||
{
|
||||
}
|
||||
|
||||
ChromiumCDMVideoDecoder::~ChromiumCDMVideoDecoder()
|
||||
{
|
||||
}
|
||||
|
||||
RefPtr<MediaDataDecoder::InitPromise>
|
||||
ChromiumCDMVideoDecoder::Init()
|
||||
{
|
||||
return InitPromise::CreateAndResolve(TrackInfo::kUndefinedTrack, __func__);
|
||||
}
|
||||
|
||||
RefPtr<MediaDataDecoder::DecodePromise>
|
||||
ChromiumCDMVideoDecoder::Decode(MediaRawData* aSample)
|
||||
{
|
||||
return DecodePromise::CreateAndReject(
|
||||
MediaResult(NS_ERROR_DOM_MEDIA_DECODE_ERR, RESULT_DETAIL("Unimplemented")),
|
||||
__func__);
|
||||
}
|
||||
|
||||
RefPtr<MediaDataDecoder::FlushPromise>
|
||||
ChromiumCDMVideoDecoder::Flush()
|
||||
{
|
||||
return FlushPromise::CreateAndReject(
|
||||
MediaResult(NS_ERROR_DOM_MEDIA_DECODE_ERR, RESULT_DETAIL("Unimplemented")),
|
||||
__func__);
|
||||
}
|
||||
|
||||
RefPtr<MediaDataDecoder::DecodePromise>
|
||||
ChromiumCDMVideoDecoder::Drain()
|
||||
{
|
||||
return DecodePromise::CreateAndReject(
|
||||
MediaResult(NS_ERROR_DOM_MEDIA_DECODE_ERR, RESULT_DETAIL("Unimplemented")),
|
||||
__func__);
|
||||
}
|
||||
|
||||
RefPtr<ShutdownPromise>
|
||||
ChromiumCDMVideoDecoder::Shutdown()
|
||||
{
|
||||
return ShutdownPromise::CreateAndResolve(true, __func__);
|
||||
}
|
||||
|
||||
} // namespace mozilla
|
|
@ -0,0 +1,45 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim:set ts=2 sw=2 sts=2 et cindent: */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef ChromiumCDMVideoDecoder_h_
|
||||
#define ChromiumCDMVideoDecoder_h_
|
||||
|
||||
#include "PlatformDecoderModule.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
class CDMProxy;
|
||||
struct GMPVideoDecoderParams;
|
||||
|
||||
class ChromiumCDMVideoDecoder : public MediaDataDecoder
|
||||
{
|
||||
public:
|
||||
ChromiumCDMVideoDecoder(const GMPVideoDecoderParams& aParams,
|
||||
CDMProxy* aCDMProxy);
|
||||
|
||||
RefPtr<InitPromise> Init() override;
|
||||
RefPtr<DecodePromise> Decode(MediaRawData* aSample) override;
|
||||
RefPtr<FlushPromise> Flush() override;
|
||||
RefPtr<DecodePromise> Drain() override;
|
||||
RefPtr<ShutdownPromise> Shutdown() override;
|
||||
const char* GetDescriptionName() const override
|
||||
{
|
||||
return "Chromium CDM video decoder";
|
||||
}
|
||||
|
||||
private:
|
||||
~ChromiumCDMVideoDecoder();
|
||||
|
||||
const VideoInfo mConfig;
|
||||
RefPtr<GMPCrashHelper> mCrashHelper;
|
||||
RefPtr<AbstractThread> mGMPThread;
|
||||
RefPtr<layers::ImageContainer> mImageContainer;
|
||||
MozPromiseHolder<InitPromise> mInitPromise;
|
||||
};
|
||||
|
||||
} // mozilla
|
||||
|
||||
#endif // ChromiumCDMVideoDecoder_h_
|
|
@ -5,6 +5,7 @@
|
|||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
EXPORTS += [
|
||||
'ChromiumCDMVideoDecoder.h',
|
||||
'DecryptThroughputLimit.h',
|
||||
'EMEDecoderModule.h',
|
||||
'EMEVideoDecoder.h',
|
||||
|
@ -12,6 +13,7 @@ EXPORTS += [
|
|||
]
|
||||
|
||||
UNIFIED_SOURCES += [
|
||||
'ChromiumCDMVideoDecoder.cpp',
|
||||
'EMEDecoderModule.cpp',
|
||||
'EMEVideoDecoder.cpp',
|
||||
'SamplesWaitingForKey.cpp',
|
||||
|
|
Загрузка…
Ссылка в новой задаче