File: vaapi_utils_gtk.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 (51 lines) | stat: -rw-r--r-- 1,187 bytes parent folder | download
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
39
40
41
42
43
44
45
46
47
48
49
50
51
/*############################################################################
  # Copyright (C) 2024 Intel Corporation
  #
  # SPDX-License-Identifier: MIT
  ############################################################################*/

#ifndef __VAAPI_UTILS_GTK_H__
#define __VAAPI_UTILS_GTK_H__

#if defined(LIBVA_GTK4_SUPPORT)

    #include <sigc++/sigc++.h>
    #include <va/va_x11.h>
    #include "vaapi_utils.h"

class X11GtkVA : public CLibVA {
public:
    X11GtkVA(const std::string& devicePath = "");
    virtual ~X11GtkVA(void);

    MfxLoader::XLib_Proxy& GetX11() {
        return m_x11lib;
    }
    MfxLoader::VA_X11Proxy& GetVAX11() {
        return m_vax11lib;
    }

    void* GetXDisplay(void) {
        return m_display;
    }

protected:
    Display* m_display;
    VAConfigID m_configID;
    VAContextID m_contextID;
    MfxLoader::XLib_Proxy m_x11lib;
    MfxLoader::VA_X11Proxy m_vax11lib;
    #if defined(X11_DRI3_SUPPORT)
    MfxLoader::VA_DRMProxy m_vadrmlib;
    #endif // X11_DRI3_SUPPORT
    int fd;

private:
    void Close();

    DISALLOW_COPY_AND_ASSIGN(X11GtkVA);
};

#endif // #if defined(LIBVA_GTK4_SUPPORT)

#endif // #ifndef __VAAPI_UTILS_GTK_H__