linux-wallpaperengine/src/WallpaperEngine/Render/CVideo.h
Alexis Maiquez ecd8ff3757 Applied the same context-driver treatment to the audio subsystem (still needs some extra work to ensure all audio plays fine and a good cleanup)
Fixed README.md to properly reflect all dependencies in the command examples
Added support for audio looping

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-02-06 22:35:46 +01:00

39 lines
856 B
C++

#pragma once
#include "WallpaperEngine/Core/CVideo.h"
#include "WallpaperEngine/Audio/CAudioStream.h"
#include "WallpaperEngine/Render/CWallpaper.h"
#include <mpv/client.h>
#include <mpv/render_gl.h>
namespace WallpaperEngine::Render
{
class CVideo : public CWallpaper
{
public:
CVideo (Core::CVideo* video, CRenderContext* context, CAudioContext* audioContext);
Core::CVideo* getVideo ();
uint32_t getWidth () const override;
uint32_t getHeight () const override;
void setSize (int64_t width, int64_t height);
protected:
void renderFrame (glm::ivec4 viewport) override;
friend class CWallpaper;
static const std::string Type;
private:
mpv_handle* m_mpv;
mpv_render_context* m_mpvGl;
int64_t m_width;
int64_t m_height;
};
};