2013-11-21 01:04:33 +04:00
|
|
|
/* -*- 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/. */
|
|
|
|
|
|
|
|
#if !defined(WMFPlatformDecoderModule_h_)
|
|
|
|
# define WMFPlatformDecoderModule_h_
|
|
|
|
|
|
|
|
# include "PlatformDecoderModule.h"
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
|
2017-01-26 15:56:46 +03:00
|
|
|
class WMFDecoderModule : public PlatformDecoderModule {
|
2013-11-21 01:04:33 +04:00
|
|
|
public:
|
|
|
|
// Initializes the module, loads required dynamic libraries, etc.
|
2015-09-21 07:35:18 +03:00
|
|
|
nsresult Startup() override;
|
2013-11-21 01:04:33 +04:00
|
|
|
|
2015-09-21 07:35:18 +03:00
|
|
|
already_AddRefed<MediaDataDecoder> CreateVideoDecoder(
|
2016-06-28 08:56:55 +03:00
|
|
|
const CreateDecoderParams& aParams) override;
|
2013-11-21 01:04:33 +04:00
|
|
|
|
2015-09-21 07:35:18 +03:00
|
|
|
already_AddRefed<MediaDataDecoder> CreateAudioDecoder(
|
2016-06-28 08:56:55 +03:00
|
|
|
const CreateDecoderParams& aParams) override;
|
2014-01-15 07:14:15 +04:00
|
|
|
|
2016-04-19 10:36:19 +03:00
|
|
|
bool SupportsMimeType(const nsACString& aMimeType,
|
|
|
|
DecoderDoctorDiagnostics* aDiagnostics) const override;
|
2016-10-07 07:51:34 +03:00
|
|
|
bool Supports(const TrackInfo& aTrackInfo,
|
|
|
|
DecoderDoctorDiagnostics* aDiagnostics) const override;
|
2014-08-22 05:37:57 +04:00
|
|
|
|
2014-08-03 11:28:39 +04:00
|
|
|
// Called on main thread.
|
2014-01-15 07:14:15 +04:00
|
|
|
static void Init();
|
2015-07-17 23:52:38 +03:00
|
|
|
|
|
|
|
// Called from any thread, must call init first
|
|
|
|
static int GetNumDecoderThreads();
|
2015-12-15 04:50:59 +03:00
|
|
|
|
|
|
|
// Accessors that report whether we have the required MFTs available
|
|
|
|
// on the system to play various codecs. Windows Vista doesn't have the
|
|
|
|
// H.264/AAC decoders if the "Platform Update Supplement for Windows Vista"
|
|
|
|
// is not installed, and Window N and KN variants also require a "Media
|
|
|
|
// Feature Pack" to be installed. Windows XP doesn't have WMF.
|
|
|
|
static bool HasAAC();
|
|
|
|
static bool HasH264();
|
|
|
|
|
2013-11-21 01:04:33 +04:00
|
|
|
private:
|
2017-02-10 19:24:56 +03:00
|
|
|
virtual ~WMFDecoderModule();
|
|
|
|
|
|
|
|
bool mWMFInitialized = false;
|
2013-11-21 01:04:33 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif
|