|
Hermes 0.7.0
Linux game streaming host
|
Declarations for graphics related functions. More...
#include <optional>#include <string_view>#include <glad/egl.h>#include <glad/gl.h>#include "misc.h"#include "src/logging.h"#include "src/platform/common.h"#include "src/utility.h"#include "src/video_colorspace.h"Go to the source code of this file.
Classes | |
| class | gl::tex_t |
| class | gl::frame_buf_t |
| class | gl::shader_t |
| class | gl::buffer_t |
| class | gl::program_t |
| struct | egl::rgb_img_t |
| struct | egl::nv12_img_t |
| struct | egl::surface_descriptor_t |
| class | egl::cursor_t |
| class | egl::img_descriptor_t |
| class | egl::sws_t |
Macros | |
| #define | HERMES_STRINGIFY_HELPER(x) |
| #define | HERMES_STRINGIFY(x) |
| #define | gl_drain_errors_helper(x) |
| #define | gl_drain_errors gl_drain_errors_helper(__FILE__ ":" HERMES_STRINGIFY(__LINE__)) |
Typedefs | |
| using | frame_t = util::safe_ptr<AVFrame, free_frame> |
| typedef void(*) | gbm::device_destroy_fn(device *gbm) |
| typedef device *(*) | gbm::create_device_fn(int fd) |
| using | gbm::gbm_t = util::dyn_safe_ptr<device, &device_destroy> |
| using | egl::display_t = util::dyn_safe_ptr_v2<void, EGLBoolean, &eglTerminate> |
Functions | |
| int | close (int __fd) |
| void | free_frame (AVFrame *frame) |
| void | gl::drain_errors (const std::string_view &prefix) |
| int | gbm::init () |
| egl::KITTY_USING_MOVE_T (rgb_t, rgb_img_t,, { if(el.xrgb8) { eglDestroyImage(el.display, el.xrgb8);} }) | |
| egl::KITTY_USING_MOVE_T (nv12_t, nv12_img_t,, { if(el.r8) { eglDestroyImage(el.display, el.r8);} if(el.bg88) { eglDestroyImage(el.display, el.bg88);} }) | |
| egl::KITTY_USING_MOVE_T (ctx_t,(std::tuple< display_t::pointer, EGLContext >),, { TUPLE_2D_REF(disp, ctx, el);if(ctx) { eglMakeCurrent(disp, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);eglDestroyContext(disp, ctx);} }) | |
| display_t | egl::make_display (std::variant< gbm::gbm_t::pointer, wl_display *, _XDisplay * > native_display) |
| std::optional< ctx_t > | egl::make_ctx (display_t::pointer display) |
| std::optional< rgb_t > | egl::import_source (display_t::pointer egl_display, const surface_descriptor_t &xrgb) |
| rgb_t | egl::create_blank (platf::img_t &img) |
| Create a black RGB texture of the specified image size. | |
| std::optional< nv12_t > | egl::import_target (display_t::pointer egl_display, std::array< file_t, nv12_img_t::num_fds > &&fds, const surface_descriptor_t &y, const surface_descriptor_t &uv) |
| std::optional< nv12_t > | egl::create_target (int width, int height, AVPixelFormat format) |
| Create biplanar YUV textures to render into. | |
| bool | egl::fail () |
Declarations for graphics related functions.
Definition in file graphics.h.
| #define gl_drain_errors gl_drain_errors_helper(__FILE__ ":" HERMES_STRINGIFY(__LINE__)) |
Definition at line 25 of file graphics.h.
| #define gl_drain_errors_helper | ( | x | ) |
Definition at line 24 of file graphics.h.
| #define HERMES_STRINGIFY | ( | x | ) |
Definition at line 23 of file graphics.h.
| #define HERMES_STRINGIFY_HELPER | ( | x | ) |
Definition at line 22 of file graphics.h.
| typedef device *(*) gbm::create_device_fn(int fd) |
Definition at line 171 of file graphics.h.
| typedef void(*) gbm::device_destroy_fn(device *gbm) |
Definition at line 170 of file graphics.h.
| using egl::display_t = util::dyn_safe_ptr_v2<void, EGLBoolean, &eglTerminate> |
Definition at line 183 of file graphics.h.
| using frame_t = util::safe_ptr<AVFrame, free_frame> |
Definition at line 35 of file graphics.h.
| using gbm::gbm_t = util::dyn_safe_ptr<device, &device_destroy> |
Definition at line 176 of file graphics.h.
| rgb_t egl::create_blank | ( | platf::img_t & | img | ) |
Create a black RGB texture of the specified image size.
| img | The image to use for texture sizing. |
Definition at line 621 of file graphics.cpp.
| std::optional< nv12_t > egl::create_target | ( | int | width, |
| int | height, | ||
| AVPixelFormat | format ) |
Create biplanar YUV textures to render into.
Creates biplanar YUV textures to render into.
| width | Width of the target frame. |
| height | Height of the target frame. |
| format | Format of the target frame. |
Definition at line 704 of file graphics.cpp.
| void gl::drain_errors | ( | const std::string_view & | prefix | ) |
Definition at line 35 of file graphics.cpp.
| bool egl::fail | ( | ) |
Definition at line 323 of file graphics.cpp.
| void free_frame | ( | AVFrame * | frame | ) |
Definition at line 1106 of file graphics.cpp.
| std::optional< rgb_t > egl::import_source | ( | display_t::pointer | egl_display, |
| const surface_descriptor_t & | xrgb ) |
Definition at line 588 of file graphics.cpp.
| std::optional< nv12_t > egl::import_target | ( | display_t::pointer | egl_display, |
| std::array< file_t, nv12_img_t::num_fds > && | fds, | ||
| const surface_descriptor_t & | y, | ||
| const surface_descriptor_t & | uv ) |
Definition at line 645 of file graphics.cpp.
| int gbm::init | ( | ) |
Definition at line 270 of file graphics.cpp.
| std::optional< ctx_t > egl::make_ctx | ( | display_t::pointer | display | ) |
Definition at line 406 of file graphics.cpp.