File: hw_device.h

package info (click to toggle)
libvpl-tools 1.4.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,652 kB
  • sloc: cpp: 107,469; python: 4,303; ansic: 3,202; sh: 159; lisp: 52; makefile: 13
file content (38 lines) | stat: -rw-r--r-- 1,712 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*############################################################################
  # Copyright (C) 2005 Intel Corporation
  #
  # SPDX-License-Identifier: MIT
  ############################################################################*/

#pragma once

#include "vpl/mfxvideo++.h"

/// Base class for hw device
class CHWDevice {
public:
    virtual ~CHWDevice() {}
    /** Initializes device for requested processing.
    @param[in] hWindow Window handle to bundle device to.
    @param[in] nViews Number of views to process.
    @param[in] nAdapterNum Number of adapter to use
    @param[in] isFullScreen Full screen is enabled or not
    */
    virtual mfxStatus Init(mfxHDL hWindow,
                           mfxU16 nViews,
                           mfxU32 nAdapterNum,
                           bool isFullScreen = false) = 0;
    /// Reset device.
    virtual mfxStatus Reset() = 0;
    /// Get handle can be used for MFX session SetHandle calls
    virtual mfxStatus GetHandle(mfxHandleType type, mfxHDL* pHdl) = 0;
    /** Set handle.
    Particular device implementation may require other objects to operate.
    */
    virtual mfxStatus SetHandle(mfxHandleType type, mfxHDL hdl)                             = 0;
    virtual mfxStatus RenderFrame(mfxFrameSurface1* pSurface, mfxFrameAllocator* pmfxAlloc) = 0;
    virtual void UpdateTitle(double fps)                                                    = 0;
    virtual void SetMondelloInput(bool isMondelloInputEnabled)                              = 0;
    virtual void SetDxgiFullScreen()                                                        = 0;
    virtual void Close()                                                                    = 0;
};