Loading...
Searching...
No Matches
HWAccelSetup.hpp
1#pragma once
2
3#include <Gfx/Graph/RenderState.hpp>
4#include <Video/GpuFormats.hpp>
5
6#include <string>
7
8class QRhi;
9
10extern "C" {
11#include <libavcodec/avcodec.h>
12#include <libavutil/pixfmt.h>
13#if __has_include(<libavutil/hwcontext.h>)
14#include <libavutil/hwcontext.h>
15#endif
16}
17
18#include <score_plugin_gfx_export.h>
19
20namespace score::gfx
21{
22
24SCORE_PLUGIN_GFX_EXPORT
25std::string hwCodecName(const char* codec_name, AVHWDeviceType device);
26
28SCORE_PLUGIN_GFX_EXPORT
29bool codecSupportsHWPixelFormat(AVCodecID codec_id, AVPixelFormat pix_fmt);
30
32SCORE_PLUGIN_GFX_EXPORT
33AVPixelFormat selectHardwareAcceleration(
34 score::gfx::GraphicsApi api, AVCodecID codec_id,
35 QRhi* rhi = nullptr);
36
37} // namespace score::gfx
Graphics rendering pipeline for ossia score.
Definition Filter/PreviewWidget.hpp:12
AVPixelFormat selectHardwareAcceleration(score::gfx::GraphicsApi api, AVCodecID codec_id, QRhi *rhi)
Picks the best HW accel for the given API/codec, using QRhi for vendor detection.
Definition HWAccelSetup.cpp:36
GraphicsApi
Available graphics APIs to use.
Definition RenderState.hpp:22
std::string hwCodecName(const char *codec_name, AVHWDeviceType device)
Delegates to Video::hwCodecName (score-plugin-gfx wrapper)
Definition HWAccelSetup.cpp:18
bool codecSupportsHWPixelFormat(AVCodecID codec_id, AVPixelFormat pix_fmt)
Delegates to Video::codecSupportsHWPixelFormat (score-plugin-gfx wrapper)
Definition HWAccelSetup.cpp:27