mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-01 17:23:59 +00:00
Bug 1676372 - Avoid including PlatformDecoderModule.h in header files. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D96544
This commit is contained in:
parent
eb1c061636
commit
e1afffcd87
@ -18,7 +18,6 @@
|
||||
#include "MediaInfo.h"
|
||||
#include "VideoUtils.h"
|
||||
#include "VPXDecoder.h"
|
||||
#include "mozilla/CDMProxy.h"
|
||||
#include "mozilla/ClearOnShutdown.h"
|
||||
#include "mozilla/RemoteDecoderManagerChild.h"
|
||||
#include "mozilla/RemoteDecoderModule.h"
|
||||
@ -230,6 +229,8 @@ PDMFactory::PDMFactory() {
|
||||
CreateNullPDM();
|
||||
}
|
||||
|
||||
PDMFactory::~PDMFactory() = default;
|
||||
|
||||
PDMFactory::PDMFactory(const RemoteDecodeIn& aProcess) {
|
||||
switch (aProcess) {
|
||||
case RemoteDecodeIn::RddProcess:
|
||||
|
@ -7,19 +7,37 @@
|
||||
#if !defined(PDMFactory_h_)
|
||||
# define PDMFactory_h_
|
||||
|
||||
# include <utility>
|
||||
# include "DecoderDoctorDiagnostics.h"
|
||||
# include "PlatformDecoderModule.h"
|
||||
# include "mozilla/StaticMutex.h"
|
||||
|
||||
class CDMProxy;
|
||||
# include "mozilla/AlreadyAddRefed.h"
|
||||
# include "mozilla/EnumSet.h"
|
||||
# include "mozilla/MozPromise.h"
|
||||
# include "mozilla/RefPtr.h"
|
||||
# include "nsISupports.h"
|
||||
# include "nsStringFwd.h"
|
||||
# include "nsTArray.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
class CDMProxy;
|
||||
class MediaDataDecoder;
|
||||
class MediaResult;
|
||||
class PDMFactoryImpl;
|
||||
class PlatformDecoderModule;
|
||||
class StaticMutex;
|
||||
template <typename T>
|
||||
struct MaxEnumValue;
|
||||
template <class T>
|
||||
class StaticAutoPtr;
|
||||
struct CreateDecoderParams;
|
||||
struct CreateDecoderParamsForAsync;
|
||||
struct SupportDecoderParams;
|
||||
enum class RemoteDecodeIn;
|
||||
|
||||
using PDMCreateDecoderPromise =
|
||||
MozPromise<RefPtr<MediaDataDecoder>, MediaResult,
|
||||
/* IsExclusive = */ true>;
|
||||
|
||||
class PDMFactory final {
|
||||
public:
|
||||
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(PDMFactory)
|
||||
@ -33,7 +51,7 @@ class PDMFactory final {
|
||||
|
||||
// Factory method that creates the appropriate PlatformDecoderModule for
|
||||
// the platform we're running on.
|
||||
RefPtr<PlatformDecoderModule::CreateDecoderPromise> CreateDecoder(
|
||||
RefPtr<PDMCreateDecoderPromise> CreateDecoder(
|
||||
const CreateDecoderParams& aParams);
|
||||
|
||||
bool SupportsMimeType(const nsACString& aMimeType,
|
||||
@ -78,7 +96,7 @@ class PDMFactory final {
|
||||
static void SetSupported(const MediaCodecsSupported& aSupported);
|
||||
|
||||
private:
|
||||
virtual ~PDMFactory() = default;
|
||||
virtual ~PDMFactory();
|
||||
// Will set PDM list for the required process.
|
||||
// This is used to determine which PDMs are available on the given process
|
||||
// from the content process.
|
||||
@ -104,11 +122,10 @@ class PDMFactory final {
|
||||
const SupportDecoderParams& aParams,
|
||||
DecoderDoctorDiagnostics* aDiagnostics) const;
|
||||
|
||||
RefPtr<PlatformDecoderModule::CreateDecoderPromise> CreateDecoderWithPDM(
|
||||
RefPtr<PDMCreateDecoderPromise> CreateDecoderWithPDM(
|
||||
PlatformDecoderModule* aPDM, const CreateDecoderParams& aParams);
|
||||
RefPtr<PlatformDecoderModule::CreateDecoderPromise>
|
||||
CheckAndMaybeCreateDecoder(CreateDecoderParamsForAsync&& aParams,
|
||||
uint32_t aIndex);
|
||||
RefPtr<PDMCreateDecoderPromise> CheckAndMaybeCreateDecoder(
|
||||
CreateDecoderParamsForAsync&& aParams, uint32_t aIndex);
|
||||
|
||||
nsTArray<RefPtr<PlatformDecoderModule>> mCurrentPDMs;
|
||||
RefPtr<PlatformDecoderModule> mEMEPDM;
|
||||
|
@ -14,6 +14,7 @@
|
||||
# include "MediaEventSource.h"
|
||||
# include "MediaInfo.h"
|
||||
# include "MediaResult.h"
|
||||
# include "PDMFactory.h"
|
||||
# include "mozilla/EnumSet.h"
|
||||
# include "mozilla/EnumTypeTraits.h"
|
||||
# include "mozilla/MozPromise.h"
|
||||
@ -329,9 +330,7 @@ class PlatformDecoderModule {
|
||||
SupportsColorDepth(videoInfo->mColorDepth, aDiagnostics);
|
||||
}
|
||||
|
||||
typedef MozPromise<RefPtr<MediaDataDecoder>, MediaResult,
|
||||
/* IsExclusive = */ true>
|
||||
CreateDecoderPromise;
|
||||
using CreateDecoderPromise = PDMCreateDecoderPromise;
|
||||
|
||||
protected:
|
||||
PlatformDecoderModule() = default;
|
||||
|
@ -8,6 +8,7 @@
|
||||
#define mozilla_InputTaskManager_h
|
||||
|
||||
#include "TaskController.h"
|
||||
#include "mozilla/StaticPtr.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include "nsThreadUtils.h"
|
||||
#include <algorithm>
|
||||
#include <initializer_list>
|
||||
#include "GeckoProfiler.h"
|
||||
#include "mozilla/EventQueue.h"
|
||||
#include "mozilla/BackgroundHangMonitor.h"
|
||||
#include "mozilla/InputTaskManager.h"
|
||||
@ -21,6 +22,7 @@
|
||||
#include "nsIThreadInternal.h"
|
||||
#include "nsQueryObject.h"
|
||||
#include "nsThread.h"
|
||||
#include "prenv.h"
|
||||
#include "prsystem.h"
|
||||
|
||||
#ifdef XP_WIN
|
||||
|
Loading…
Reference in New Issue
Block a user