Anyone willing to re-implement the led-image-viewer util as a library? Would consider paying

I wish to have the functionality of the led-image-viewer, but as a library, not an executable.

Why? Because if my app, for example, calls the led-image-viewer with -f(Play forever), and my app crashes, it leaves a child process running - and I cannot for the life of me find any way to have that process end if my process unexpectedly ends (Crashes, stop debugging etc).

If someone were willing to do this for pay, I would be happy for it to be open sourced

It needs to be callable from C#
It could, I guess, be written in C++ and come with a C# binding. In fact, this may be best so that bindings could be written for other languages (eg python)

Must have:

  • Play a single image or animation
    Only needs to be able to play streams. Does not need to support raw file types (eg gif or png)
  • Convert image or animation to stream
    (Or it needs to be compatible with the streams created by the existing led-image-viewer)
  • loop count, duration and forever
  • The ability to abort playing a stream.
    Facilitates my app’s “Quck Media” feature which, at the press of a button, will interrupt what is currently playing, show something else, and then resume playing what was playing before.
    MVP does not require the interrupted stream to resume from the frame it was on, starting again at the beginning is acceptable.

Should have (Would be interested in these, depending on extra cost):

  • Way to play a stream starting at a specified frame
  • The “Must have” abort functionality reports what frame it was on when it was aborted.
    Used to facilitate resuming a stream that was interrupted by “Quick Media” at the frame it was interrupted on.

Could have (Would be interested in these, depending on extra cost):

  • Bake options marked MM here into a created stream, so that they do not need to be specified when playing (Would obviously require new stream format)

Won’t have (Don’t need these features from original):

  • Support for playing sequences and any associated features (eg shuffle)

Did you realize that the hZeller project is a library? The scripts you use are nothing more than code usage examples.
Isn’t that what you want? Use this project; it’s already a library, no need to pay someone for it.

Yes but it’s C++ and I would rather not be having to learn C++ on top of everything else I have to learn and do.

There are C# bindings, sure, and a C# example of the image viewer util that appears to be ball-park equivalent, but I cannot get it to work. I am also unsure if it supports streams - if it doesn’t, then re-implementing that functionality is maybe a bit beyond me.

If it does support streams and can be made to work, then re-packaging it as a library probably is within my abilities.

I don’t know if there currently is anyone with spare time and knowledge looking for an extra project, but if you don’t find help here, any reasonable generic programmer who understands C++ and an API, ought to be able to write this for you.

If my program crashes, then there’s no point in it tracking the PIDs that it spawns, cos it will be dead.

But only last night I came to a similar conclusion as you WRT AI - I used Copilot for the first time ever and was pretty blown away. I have only used it on my C# code so far, but I do definitely plan on having a stab at fixing the bindings.

Yeah, but unless they have the hardware, they’re not really gonna be able to do it though surely.

So what, the bash script can see child processes that my app spawns, and if it sees my app exit, but the child process remain, it kills it?

yes, it is a basic of the process control in linux