content/media/wmf/DXVA2Manager.h

Wed, 31 Dec 2014 13:27:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 13:27:57 +0100
branch
TOR_BUG_3246
changeset 6
8bccb770b82d
permissions
-rw-r--r--

Ignore runtime configuration files generated during quality assurance.

michael@0 1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
michael@0 2 /* vim:set ts=2 sw=2 sts=2 et cindent: */
michael@0 3 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 4 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 6 #if !defined(DXVA2Manager_h_)
michael@0 7 #define DXVA2Manager_h_
michael@0 8
michael@0 9 #include "WMF.h"
michael@0 10 #include "nsAutoPtr.h"
michael@0 11 #include "mozilla/Mutex.h"
michael@0 12
michael@0 13 struct nsIntSize;
michael@0 14 struct nsIntRect;
michael@0 15
michael@0 16 namespace mozilla {
michael@0 17
michael@0 18 namespace layers {
michael@0 19 class Image;
michael@0 20 class ImageContainer;
michael@0 21 }
michael@0 22
michael@0 23 class DXVA2Manager {
michael@0 24 public:
michael@0 25
michael@0 26 // Creates and initializes a DXVA2Manager. Currently we always use D3D9Ex
michael@0 27 // to access DXVA, but via this interface we can seamlessly support D3D11
michael@0 28 // DXVA integration if need be.
michael@0 29 static DXVA2Manager* Create();
michael@0 30
michael@0 31 // Returns a pointer to the D3D device manager responsible for managing the
michael@0 32 // device we're using for hardware accelerated video decoding. If we're using
michael@0 33 // D3D9, this is an IDirect3DDeviceManager9. It is safe to call this on any
michael@0 34 // thread.
michael@0 35 virtual IUnknown* GetDXVADeviceManager() = 0;
michael@0 36
michael@0 37 // Creates an Image for the video frame stored in aVideoSample.
michael@0 38 virtual HRESULT CopyToImage(IMFSample* aVideoSample,
michael@0 39 const nsIntRect& aRegion,
michael@0 40 layers::ImageContainer* aContainer,
michael@0 41 layers::Image** aOutImage) = 0;
michael@0 42
michael@0 43 virtual ~DXVA2Manager();
michael@0 44
michael@0 45 protected:
michael@0 46 Mutex mLock;
michael@0 47 DXVA2Manager();
michael@0 48 };
michael@0 49
michael@0 50 } // namespace mozilla
michael@0 51
michael@0 52 #endif // DXVA2Manager_h_

mercurial