mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-07 20:17:37 +00:00
f9a454eedb
--HG-- rename : content/media/fmp4/wmf/WMFAudioDecoder.cpp => content/media/fmp4/wmf/WMFAudioOutputSource.cpp rename : content/media/fmp4/wmf/WMFAudioDecoder.h => content/media/fmp4/wmf/WMFAudioOutputSource.h rename : content/media/fmp4/wmf/WMFVideoDecoder.cpp => content/media/fmp4/wmf/WMFVideoOutputSource.cpp rename : content/media/fmp4/wmf/WMFVideoDecoder.h => content/media/fmp4/wmf/WMFVideoOutputSource.h
68 lines
1.9 KiB
C++
68 lines
1.9 KiB
C++
/* -*- 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(WMFVideoOutputSource_h_)
|
|
#define WMFVideoOutputSource_h_
|
|
|
|
#include "WMF.h"
|
|
#include "MP4Reader.h"
|
|
#include "MFTDecoder.h"
|
|
#include "nsRect.h"
|
|
#include "WMFMediaDataDecoder.h"
|
|
#include "mozilla/RefPtr.h"
|
|
|
|
namespace mozilla {
|
|
|
|
class DXVA2Manager;
|
|
|
|
class WMFVideoOutputSource : public WMFOutputSource {
|
|
public:
|
|
WMFVideoOutputSource(mozilla::layers::LayersBackend aLayersBackend,
|
|
mozilla::layers::ImageContainer* aImageContainer,
|
|
bool aDXVAEnabled);
|
|
~WMFVideoOutputSource();
|
|
|
|
virtual TemporaryRef<MFTDecoder> Init() MOZ_OVERRIDE;
|
|
|
|
virtual HRESULT Output(int64_t aStreamOffset,
|
|
nsAutoPtr<MediaData>& aOutput) MOZ_OVERRIDE;
|
|
|
|
private:
|
|
|
|
bool InitializeDXVA();
|
|
|
|
HRESULT ConfigureVideoFrameGeometry();
|
|
|
|
HRESULT CreateBasicVideoFrame(IMFSample* aSample,
|
|
int64_t aStreamOffset,
|
|
VideoData** aOutVideoData);
|
|
|
|
HRESULT CreateD3DVideoFrame(IMFSample* aSample,
|
|
int64_t aStreamOffset,
|
|
VideoData** aOutVideoData);
|
|
|
|
// Video frame geometry.
|
|
VideoInfo mVideoInfo;
|
|
uint32_t mVideoStride;
|
|
uint32_t mVideoWidth;
|
|
uint32_t mVideoHeight;
|
|
nsIntRect mPictureRegion;
|
|
|
|
RefPtr<MFTDecoder> mDecoder;
|
|
RefPtr<layers::ImageContainer> mImageContainer;
|
|
nsAutoPtr<DXVA2Manager> mDXVA2Manager;
|
|
RefPtr<MediaTaskQueue> mTaskQueue;
|
|
MediaDataDecoderCallback* mCallback;
|
|
|
|
const bool mDXVAEnabled;
|
|
const layers::LayersBackend mLayersBackend;
|
|
bool mUseHwAccel;
|
|
};
|
|
|
|
} // namespace mozilla
|
|
|
|
#endif // WMFVideoOutputSource_h_
|