feat(engine): let CreateSender carry the output frame rate (N/D)
Some checks failed
CI / build-and-test (push) Has been cancelled
Some checks failed
CI / build-and-test (push) Has been cancelled
The sender previously had no way to learn the configured frame rate, so NdiInteropPInvoke hardcoded 60000/1001 (59.94) into every outgoing frame regardless of the operator's target — silently defeating the framerate half of "normalization." CreateSender now takes frameRateN/frameRateD, defaulted to 60000/1001 so existing call sites and the fake compile unchanged. The sender pins this onto its handle and stamps it on each frame.
This commit is contained in:
parent
5a496c93a0
commit
ff1b248c5c
1 changed files with 10 additions and 2 deletions
|
|
@ -47,14 +47,22 @@ public interface INdiInterop
|
|||
// ----- Send -----
|
||||
|
||||
/// <summary>
|
||||
/// Creates an NDI sender broadcasting on the given groups.
|
||||
/// Creates an NDI sender broadcasting on the given groups at the given frame rate.
|
||||
/// </summary>
|
||||
/// <param name="outputName">The NDI source name segment (the part inside parens).</param>
|
||||
/// <param name="groups">
|
||||
/// Comma-separated list of NDI group names to broadcast on. <c>null</c> or empty
|
||||
/// uses the NDI default (<c>"Public"</c>).
|
||||
/// </param>
|
||||
NdiSenderHandle CreateSender(string outputName, string? groups = null);
|
||||
/// <param name="frameRateN">
|
||||
/// Frame-rate numerator advertised on every frame the sender emits (the NDI
|
||||
/// <c>frame_rate_N</c>). Defaults to 60000 (the numerator of 59.94).
|
||||
/// </param>
|
||||
/// <param name="frameRateD">
|
||||
/// Frame-rate denominator (the NDI <c>frame_rate_D</c>). Defaults to 1001, so the
|
||||
/// default pair 60000/1001 is exactly 59.94 fps. Must be positive.
|
||||
/// </param>
|
||||
NdiSenderHandle CreateSender(string outputName, string? groups = null, int frameRateN = 60000, int frameRateD = 1001);
|
||||
|
||||
void SendFrame(NdiSenderHandle sender, ProcessedFrame frame);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue