Replaces the v1 shape rather than accepting both. `anneal_sec` and the top-level `sample_fps` are deleted, not zeroed; `extraction` and `cut` blocks arrive; `scenes` become objects carrying belief and route, so a window records how far to trust it instead of being a bare float pair. `TruthSchema.IsSupported` is the single gate and is applied on all four read paths — sidecar, managed store load, managed PUT, and converted manifest. Previously only the controller checked, so the version the plugin claimed to require and the one it would actually parse were free to drift. Rejections name the file and the version found, so an item that looks empty is distinguishable from one that was refused. `ManifestConverter` carries belief, route and both provenance blocks through: dropping them would silently downgrade every fetched manifest against a locally extracted one. TRACES: JR-002, JR-003 | SR-003
51 lines
1.9 KiB
C#
51 lines
1.9 KiB
C#
using System.Text.Json.Serialization;
|
|
|
|
namespace Jellyfin.Plugin.JRay.Models;
|
|
|
|
/// <summary>
|
|
/// One presence window in a <see cref="TruthFile"/>.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <b>A window is a claim about scene membership, not a recognition event</b>
|
|
/// (SR-002). An actor who turns away, is occluded, or is off-camera while the
|
|
/// shot cuts to whoever they are speaking to is still present — so a consumer
|
|
/// must never read a boundary as "the face was detected here", and must not
|
|
/// merge, split, trim or reorder windows.
|
|
/// <para>
|
|
/// In <c>schema_version</c> 1 this was a bare <c>[start, end]</c> float pair. It
|
|
/// became an object in the SR-003 bump so a window can carry the evidence behind
|
|
/// it: a consumer that shows presence should be able to say how strongly it is
|
|
/// believed and how it was arrived at, which a pair of numbers cannot express.
|
|
/// </para>
|
|
/// </remarks>
|
|
// TRACES: JR-002, JR-004 | SR-002, SR-003
|
|
public class TruthScene
|
|
{
|
|
/// <summary>Gets or sets the window start, in seconds, inclusive.</summary>
|
|
[JsonPropertyName("start")]
|
|
public double Start { get; set; }
|
|
|
|
/// <summary>Gets or sets the window end, in seconds, inclusive.</summary>
|
|
[JsonPropertyName("end")]
|
|
public double End { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the accumulated posterior that justified this claim, in
|
|
/// <c>[0, 1]</c>, or <c>null</c> when the producer did not record one.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Optional rather than defaulted to zero: absent and "believed with
|
|
/// probability zero" are different statements, and a claim nobody believes
|
|
/// would not have been written.
|
|
/// </remarks>
|
|
[JsonPropertyName("belief")]
|
|
public double? Belief { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets how the actor was identified: <c>live</c>, <c>deferred</c>
|
|
/// or <c>pooled</c> (extraction AR-017).
|
|
/// </summary>
|
|
[JsonPropertyName("route")]
|
|
public string? Route { get; set; }
|
|
}
|