Skip to content

Comments

Publish UniEnc as a NuGet package#76

Merged
ruccho merged 10 commits intomainfrom
feature/pure_csharp
Dec 23, 2025
Merged

Publish UniEnc as a NuGet package#76
ruccho merged 10 commits intomainfrom
feature/pure_csharp

Conversation

@ruccho
Copy link
Collaborator

@ruccho ruccho commented Dec 17, 2025

Summary

  • Splits Unity-dependent part of UniEnc into UniEnc.Unity
    • Readback-free encoding related APIs
    • NativeArray related APIs
  • Adds pure C# csproj UniEnc into InstantReplay.Externals
    • Just refers C# source files and native binaries under Packages not to change the UPM package installation path via git
  • Adds a workflow to publish NuGet package
    • Triggered by publishing release
    • Uses trusted publishing
    • NUGET_USER repository secret is required

Breaking Changes

UniEnc.VideoEncoder

  • Moved to UniEnc.Unity.VideoEncoderExtensions:
    • Old: public ValueTask PushFrameAsync(Texture source, bool isGammaWorkflow, double timestamp);
    • New: public static ValueTask PushFrameAsync(this VideoEncoder encoder, Texture source, double timestamp);

UniEnc.SharedBuffer

  • Type parameter is added: SharedBuffer<T> where T : unmanaged, IDisposable
  • Removed: public NativeArray<byte> NativeArray { get; }
  • Removed: public Span<byte> Span { get; }
  • Added: public T Value { get; }

UniEnc.SharedBufferPool

  • Moved to UniEnc.Unity.SharedBufferPoolExtensions:
    • Old: public unsafe bool TryAlloc(nuint size, out SharedBuffer buffer);
    • New: public static bool TryAllocAsNativeArray(this SharedBufferPool self, nuint size, out SharedBuffer<NativeArrayWrapper> buffer);

@ruccho ruccho marked this pull request as ready for review December 19, 2025 09:20
@ruccho ruccho requested review from hkmt-mmy and qua-iy December 19, 2025 09:21
@ruccho ruccho linked an issue Dec 19, 2025 that may be closed by this pull request
ruccho and others added 2 commits December 19, 2025 18:55
# Conflicts:
#	Packages/jp.co.cyberagent.instant-replay/UniEnc/Runtime/Internal/PlayerLoopEntryPoint.cs
#	Packages/jp.co.cyberagent.instant-replay/UniEnc/Runtime/VideoEncoder.cs
Base automatically changed from feature/unbounded_recording to main December 22, 2025 07:33
@ruccho ruccho merged commit ef110b3 into main Dec 23, 2025
@ruccho ruccho deleted the feature/pure_csharp branch December 23, 2025 01:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Providing unienc Native Plugin as a Standalone Library

3 participants