Open Fenekhu opened 10 months ago
Update: MSDN says:
ArraySegment
implements the IReadOnlyCollection interface starting with the .NET Framework 4.6; in previous versions of the .NET Framework, the ArraySegment structure did not implement this interface.
So I converted those lines to index into the YuvPixels
array directly like so:
YuvPixels[i] = Luma;
YuvPixels[LumaSize+Chromai] = ChromaU;
YuvPixels[LumaSize+ChromaSize+Chromai] = ChromaV;
and
YuvPixels[i] = Luma;
YuvPixels[LumaSize+Chromai+0] = ChromaV;
YuvPixels[LumaSize+Chromai+1] = ChromaV;
And now it compiles. I would still feel better if I knew whether this is a proper fix though.
Using the array directly should be fine! I just split them into views for simplicity, but i guess they're not read only in 2.1.
Ive only used this with unity, which I believe complies only with .net 2.1 (which i guess is runtime apis) but language version 8 or so.
If you can submit a PR, I'll double check it in unity, but this is all good :)
Just for any future stuff, what are you building with? Just a c# app built in visual studio or something?
To clarify, this is when not using unity, right? (Is title wrong?)
No, this is with Unity. I can’t remember exactly where, but I think it’s under Player settings, there’s an option to change between compiling with .NET Standard 2.1 or .NET Framework 4.8. It wasn’t working with Framework. Though, in the end, switching that didn’t fix the other problem anyway, so I set it back to Standard.
I’ll work on a PR later today or tonight.
I have a different plugin that was having issues compiling and the recommended change was to switch from .NET Standard 2.1 to .NET Framework (4.8 maybe?). Doing so caused a bunch of this:
I don't see anything about PopH264 not working with .NET Framework, am I doing something dumb?