Giter Site home page Giter Site logo

Comments (2)

mstoeckl avatar mstoeckl commented on September 28, 2024 2

It's not integrated with swaylock-effects, but I do have a fork of swaylock that can solve this problem. swaylock-plugin can use wallpaper-drawing programs for its own backgrounds. If you build mpvpaper from git, or use version 1.3 when it comes out, the following command should display a video as the background for all outputs:

swaylock --command 'mpvpaper -o loop "*" path-to-video-file'

The swaylock fork is fairly new and untested code that I've only used in conjunction with Sway built from git master, so don't use it without a way to recover from lock screen crashes.

from swaylock-effects.

eddsalkield avatar eddsalkield commented on September 28, 2024 1

Seems that mpv has a C API to allow you to render directly into an OpenGL context: https://github.com/mpv-player/mpv/blob/master/libmpv/client.h

Currently swaylock-effects uses Cairo for its image rendering, not OpenGL. However, there seems to be a guide on how to copy pixel data from a Cairo surface to an OpenGL texture here: https://www.cairographics.org/OpenGL/

So in theory we could move swaylock-effects to render using OpenGL. Existing rendering would happen in Cairo and be copied out to OpenGL, making it easier to track upstream. Additional options could be added that depend solely on the OpenGL backend, such as video playback.

Perhaps this move could also help tackle issues that are blocked by limitations of Cairo, e.g. #15?

from swaylock-effects.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.