-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Implement content-streamer C# bindings #1848
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
I added another commit to change how the exclusion of the examples works in the RPiRgbLEDMatrix csproj file I was having problems getting the bindings working as a submodule. But with the old style from RPiRgbLEDMatrix, I then could not reference my wrapper. In this latest commit, I changed the exclusion in the RPiRgbLEDMatrix project to: I am not sure if I have done the right thing, can anyone advise on this? |
|
I moved ClearCanvas from the Content Streamer into the Canvas wrapper, as it logically belongs there - it's not inherently anything to do with streams |
|
Note: This PR was recreated from #1846. |
|
This PR contains too many changes across too many areas to review as-is. As I mentioned before, it would be best to first focus solely on adding the And it appears you are still making changes. After that, I recommend breaking all the changes into smaller pieces and recreating them as individual PRs. |
|
@smdn done |
About
The primary goal of this PR is to add support for playing streams (As generated by the C++ led-image-viewer util using the -O flag)
I started from scratch with a new PR and took my time this time, being careful not to alter things that did not need to be altered.
Again, this is very heavy on the AI, so please review changes to C++ and existing C# bindings to check for sanity. Unlike the last PR though, there are very minimal changes to existing code.
Differences from the last PR:
BindingsC# class from internal to public.This turns out to have not been needed. It only happened before because code was trying to access the Bindings not via the wrapper I think.
InternalRGBLedMatrixOptionsfrom internal to publicC# Examples
MatrixOptionsstatic classThis allows you to edit one file, and it affects all examples
This is largely responsible for the large number of file changes, but it's only replacing the parameters in the matrix constructor, and adding a reference to the MatrixOptions cs file in the csproj of the example
.vscodefolderChange
font-example.exetoFontExampleMention that you need a BDF font)
Tooling changes
.vscodefolder for VSCode specific settings(This could conceivably be added for linux too, but it currently relies on WSL)
C++ API
These allow playing of streams
C# Bindings + wrappers
Clearin the RGBLedCanvas wrapper to facilitate clearing the screen_canvasin RGBLedCanvas wrapper via theHandlepropertyAI says this is needed so that we can write directly to the canvas.
The old PR did not need it, because the new bindings were lumped in with the existing ones (And maybe because of the change from internal to public?)
RGBLedMatrixconstructor add argument to always enable "No drop privs" mode before callingled_matrix_create_from_options_const_argvSeems impossible to do any other way
Not having this set in a C# app is basically the kiss of death - any call to dotnet packages (eg
System.Collections.Concurrent) will fail otherwise if used after the matrix has been instantiatedThis means that all the examples now work (Well, I did not test the fonts one, dunno how)