/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* 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 WMFVP9DXVA2Manager_h_ #define WMFVP9DXVA2Manager_h_ #include "WMF.h" #include "WMFMediaDataDecoder.h" #include "DXVA2Manager.h" #include "DXVAVP9Manager.h" #include "MediaInfo.h" #include "nsTArray.h" namespace mozilla { class WMFVP9DXVA2Manager : public MFTManager { public: WMFVP9DXVA2Manager(const VideoInfo&, layers::KnowsCompositor*, layers::ImageContainer*); ~WMFVP9DXVA2Manager(); bool Init(); HRESULT Input(MediaRawData*) override; HRESULT Output(int64_t, RefPtr&) override; void Flush() override; void Drain() override {} void Shutdown() override; bool IsHardwareAccelerated(nsACString&) const override; TrackInfo::TrackType GetType() override { return TrackInfo::kVideoTrack; } const char* GetDescriptionName() const override { return "VP9 DXVA2 profile 0 hardware decoder"; } private: VideoInfo mVideoInfo; RefPtr mKnowsCompositor; RefPtr mImageContainer; nsAutoPtr mDXVA2Manager; nsAutoPtr mVP9Decoder; nsTArray> mPendingFrames; nsCString mFailureReason; bool mIsValid; }; } #endif