michael@0: /* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*- michael@0: * This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef GFX_NV3DVUTILS_H michael@0: #define GFX_NV3DVUTILS_H michael@0: michael@0: #include "Layers.h" michael@0: #include michael@0: #include michael@0: michael@0: namespace mozilla { michael@0: namespace layers { michael@0: michael@0: #define FIREFOX_3DV_APP_HANDLE 0xECB992B6 michael@0: michael@0: enum Nv_Stereo_Mode { michael@0: NV_STEREO_MODE_LEFT_RIGHT = 0, michael@0: NV_STEREO_MODE_RIGHT_LEFT = 1, michael@0: NV_STEREO_MODE_TOP_BOTTOM = 2, michael@0: NV_STEREO_MODE_BOTTOM_TOP = 3, michael@0: NV_STEREO_MODE_MONO = 4, michael@0: NV_STEREO_MODE_LAST = 5 michael@0: }; michael@0: michael@0: class INv3DVStreaming : public IUnknown { michael@0: michael@0: public: michael@0: virtual bool Nv3DVInitialize() = 0; michael@0: virtual bool Nv3DVRelease() = 0; michael@0: virtual bool Nv3DVSetDevice(IUnknown* pDevice) = 0; michael@0: virtual bool Nv3DVControl(Nv_Stereo_Mode eStereoMode, bool bEnableStereo, DWORD dw3DVAppHandle) = 0; michael@0: virtual bool Nv3DVMetaData(DWORD dwWidth, DWORD dwHeight, HANDLE hSrcLuma, HANDLE hDst) = 0; michael@0: }; michael@0: michael@0: /* michael@0: * Nv3DVUtils class michael@0: */ michael@0: class Nv3DVUtils { michael@0: michael@0: public: michael@0: Nv3DVUtils(); michael@0: ~Nv3DVUtils(); michael@0: michael@0: /* michael@0: * Initializes the Nv3DVUtils object. michael@0: */ michael@0: void Initialize(); michael@0: michael@0: /* michael@0: * Release any resources if needed michael@0: * michael@0: */ michael@0: void UnInitialize(); michael@0: michael@0: /* michael@0: * Sets the device info, along with any other initialization that is needed after device creation michael@0: * Pass the D3D9 device pointer is an IUnknown input argument michael@0: */ michael@0: void SetDeviceInfo(IUnknown *devUnknown); michael@0: michael@0: /* michael@0: * Send Stereo Control Information. Used mainly to re-route michael@0: * calls from ImageLayerD3D9 to the 3DV COM object michael@0: */ michael@0: void SendNv3DVControl(Nv_Stereo_Mode eStereoMode, bool bEnableStereo, DWORD dw3DVAppHandle); michael@0: michael@0: /* michael@0: * Send Stereo Metadata. Used mainly to re-route calls michael@0: * from ImageLayerD3D9 to the 3DV COM object michael@0: */ michael@0: void SendNv3DVMetaData(unsigned int dwWidth, unsigned int dwHeight, HANDLE hSrcLuma, HANDLE hDst); michael@0: michael@0: private: michael@0: michael@0: /* Nv3DVStreaming interface pointer */ michael@0: nsRefPtr m3DVStreaming; michael@0: michael@0: }; michael@0: michael@0: michael@0: } /* layers */ michael@0: } /* mozilla */ michael@0: michael@0: #endif /* GFX_NV3DVUTILS_H */