supervision 0.2.0-next.0 → 0.2.0-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constants/media-renderer.d.ts +3 -0
- package/dist/constants/media-renderer.d.ts.map +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1722 -1395
- package/dist/index.js.map +1 -1
- package/dist/mask-preparation.worker.js +109 -31
- package/dist/mask-preparation.worker.js.map +1 -1
- package/dist/media/media-frame-clock.d.ts +4 -0
- package/dist/media/media-frame-clock.d.ts.map +1 -0
- package/dist/media/media-source-state.d.ts.map +1 -1
- package/dist/media/media-source.d.ts +6 -0
- package/dist/media/media-source.d.ts.map +1 -1
- package/dist/media/video-engine-media-source.d.ts +17 -7
- package/dist/media/video-engine-media-source.d.ts.map +1 -1
- package/dist/media/video-engine-media-source.js +3 -0
- package/dist/media/video-engine-media-source.js.map +1 -0
- package/dist/playback/media-playback-controller.d.ts +7 -1
- package/dist/playback/media-playback-controller.d.ts.map +1 -1
- package/dist/render-preparation/mask-frame-artifact.d.ts +2 -0
- package/dist/render-preparation/mask-frame-artifact.d.ts.map +1 -1
- package/dist/render-preparation/mask-frame-compositor.d.ts +7 -0
- package/dist/render-preparation/mask-frame-compositor.d.ts.map +1 -1
- package/dist/render-preparation/mask-preparation-worker-protocol.d.ts +1 -0
- package/dist/render-preparation/mask-preparation-worker-protocol.d.ts.map +1 -1
- package/dist/render-preparation/prepared-render-window.d.ts +21 -2
- package/dist/render-preparation/prepared-render-window.d.ts.map +1 -1
- package/dist/render-preparation/prepared-window-timeline.d.ts +1 -0
- package/dist/render-preparation/prepared-window-timeline.d.ts.map +1 -1
- package/dist/renderers/injected-pixi.d.ts +38 -0
- package/dist/renderers/injected-pixi.d.ts.map +1 -0
- package/dist/renderers/media-frame-navigation.d.ts +17 -0
- package/dist/renderers/media-frame-navigation.d.ts.map +1 -0
- package/dist/renderers/media-renderer-core.d.ts +9 -0
- package/dist/renderers/media-renderer-core.d.ts.map +1 -1
- package/dist/renderers/media-renderer-scene.d.ts +17 -5
- package/dist/renderers/media-renderer-scene.d.ts.map +1 -1
- package/dist/renderers/media-renderer-state.d.ts +9 -0
- package/dist/renderers/media-renderer-state.d.ts.map +1 -1
- package/dist/renderers/media-renderer-transport.d.ts +19 -3
- package/dist/renderers/media-renderer-transport.d.ts.map +1 -1
- package/dist/renderers/pixi-focus-layer.d.ts +1 -0
- package/dist/renderers/pixi-focus-layer.d.ts.map +1 -1
- package/dist/renderers/pixi-frame-present.d.ts +1 -1
- package/dist/renderers/pixi-frame-present.d.ts.map +1 -1
- package/dist/renderers/pixi-id-mask-shader.d.ts +4 -33
- package/dist/renderers/pixi-id-mask-shader.d.ts.map +1 -1
- package/dist/renderers/pixi-interaction-presentation-layer.d.ts +0 -1
- package/dist/renderers/pixi-interaction-presentation-layer.d.ts.map +1 -1
- package/dist/renderers/pixi-mask-halo.d.ts +4 -33
- package/dist/renderers/pixi-mask-halo.d.ts.map +1 -1
- package/dist/renderers/pixi-mask-layer.d.ts +28 -29
- package/dist/renderers/pixi-mask-layer.d.ts.map +1 -1
- package/dist/renderers/pixi-media-scene.d.ts.map +1 -1
- package/dist/renderers/pixi-polygon-layer.d.ts +2 -0
- package/dist/renderers/pixi-polygon-layer.d.ts.map +1 -1
- package/dist/renderers/pixi-region-coverage-mask.d.ts +4 -33
- package/dist/renderers/pixi-region-coverage-mask.d.ts.map +1 -1
- package/dist/renderers/pixi-region-layer.d.ts +6 -31
- package/dist/renderers/pixi-region-layer.d.ts.map +1 -1
- package/dist/renderers/pixi-shader-lifecycle.d.ts +14 -0
- package/dist/renderers/pixi-shader-lifecycle.d.ts.map +1 -0
- package/dist/renderers/prepared-annotation-window.d.ts.map +1 -1
- package/dist/renderers/presented-frame-channel.d.ts +34 -1
- package/dist/renderers/presented-frame-channel.d.ts.map +1 -1
- package/dist/sessions/media-session-defaults.d.ts.map +1 -1
- package/dist/sessions/media-session-detections.d.ts.map +1 -1
- package/dist/sessions/media-session-state.d.ts.map +1 -1
- package/dist/sessions/media-session.d.ts.map +1 -1
- package/dist/tracking.worker.js +19 -5
- package/dist/tracking.worker.js.map +1 -1
- package/dist/types/media-frame-clock.d.ts +16 -0
- package/dist/types/media-frame-clock.d.ts.map +1 -0
- package/dist/types/media-frame-navigation.d.ts +28 -0
- package/dist/types/media-frame-navigation.d.ts.map +1 -0
- package/dist/types/media-renderer-display.d.ts +12 -0
- package/dist/types/media-renderer-display.d.ts.map +1 -0
- package/dist/types/media-renderer.d.ts +13 -0
- package/dist/types/media-renderer.d.ts.map +1 -1
- package/dist/types/media-session.d.ts +35 -32
- package/dist/types/media-session.d.ts.map +1 -1
- package/dist/types/render-preparation.d.ts +78 -28
- package/dist/types/render-preparation.d.ts.map +1 -1
- package/dist/video-engine-media-source-DR-x1UfK.js +483 -0
- package/dist/video-engine-media-source-DR-x1UfK.js.map +1 -0
- package/dist/web-video-engine/analysis-session.d.ts +0 -1
- package/dist/web-video-engine/analysis.d.ts +0 -1
- package/dist/web-video-engine/analysis.js +211 -23
- package/dist/web-video-engine/cache-budget.d.ts +0 -1
- package/dist/web-video-engine/canvas-sink-scrub-cursor.d.ts +6 -2
- package/dist/web-video-engine/clock.d.ts +0 -1
- package/dist/web-video-engine/constants.d.ts +9 -1
- package/dist/web-video-engine/create-scrub-cursor.d.ts +6 -3
- package/dist/web-video-engine/decode-resolution.d.ts +0 -1
- package/dist/web-video-engine/decode-scheduler.d.ts +26 -5
- package/dist/web-video-engine/decode-session.d.ts +11 -1
- package/dist/web-video-engine/decode-source.d.ts +11 -1
- package/dist/web-video-engine/diagnostics-store.d.ts +0 -1
- package/dist/web-video-engine/diagnostics.d.ts +19 -19
- package/dist/web-video-engine/embedded-engine-worker.d.ts +0 -1
- package/dist/web-video-engine/engine-core.d.ts +31 -11
- package/dist/web-video-engine/engine.d.ts +3 -4
- package/dist/web-video-engine/engine.js +175 -44
- package/dist/web-video-engine/engine.worker.d.ts +0 -1
- package/dist/web-video-engine/engine.worker.js +5712 -2947
- package/dist/web-video-engine/frame-cache.d.ts +121 -12
- package/dist/web-video-engine/frame-extractor.d.ts +0 -1
- package/dist/web-video-engine/{frame-timeline-GINI8Gum.js → frame-timeline-DreEwsRY.js} +83 -27
- package/dist/web-video-engine/frame-timeline.d.ts +10 -1
- package/dist/web-video-engine/frame-walker.d.ts +0 -1
- package/dist/web-video-engine/index.d.ts +12 -2
- package/dist/web-video-engine/index.d.ts.map +1 -1
- package/dist/web-video-engine/index.js +2 -2
- package/dist/web-video-engine/key-packet.d.ts +0 -1
- package/dist/web-video-engine/keyframe-index.d.ts +0 -1
- package/dist/web-video-engine/mirror-store.d.ts +0 -1
- package/dist/web-video-engine/pausable-deadline.d.ts +11 -0
- package/dist/web-video-engine/renderer.d.ts +0 -1
- package/dist/web-video-engine/rotation.d.ts +0 -1
- package/dist/web-video-engine/scrub-controller.d.ts +8 -5
- package/dist/web-video-engine/scrub-cursor.d.ts +15 -7
- package/dist/web-video-engine/scrub-trajectory.d.ts +0 -1
- package/dist/web-video-engine/source-residency.d.ts +35 -1
- package/dist/web-video-engine/trace-recorder.d.ts +0 -1
- package/dist/web-video-engine/types.d.ts +18 -22
- package/dist/web-video-engine/video-engine.d.ts +39 -17
- package/dist/web-video-engine/webgpu-renderer.d.ts +0 -1
- package/dist/web-video-engine/worker-bridge.d.ts +0 -1
- package/dist/web-video-engine/worker-dispatch.d.ts +0 -1
- package/dist/web-video-engine/worker-protocol.d.ts +38 -15
- package/node_modules/supervision-js-core/dist/detections/buffered-detection-timeline.d.ts.map +1 -1
- package/node_modules/supervision-js-core/dist/index.d.ts +2 -2
- package/node_modules/supervision-js-core/dist/index.d.ts.map +1 -1
- package/node_modules/supervision-js-core/dist/index.js +182 -68
- package/node_modules/supervision-js-core/dist/index.js.map +1 -1
- package/node_modules/supervision-js-core/dist/types/detection-timeline.d.ts +20 -3
- package/node_modules/supervision-js-core/dist/types/detection-timeline.d.ts.map +1 -1
- package/node_modules/supervision-js-core/dist/types/media-rendering.d.ts +28 -26
- package/node_modules/supervision-js-core/dist/types/media-rendering.d.ts.map +1 -1
- package/node_modules/supervision-js-core/dist/types/session-lifecycle.d.ts +16 -0
- package/node_modules/supervision-js-core/dist/types/session-lifecycle.d.ts.map +1 -1
- package/node_modules/supervision-js-core/dist/utils/detection-masks.d.ts.map +1 -1
- package/node_modules/supervision-js-core/dist/utils/id-mask-frame.d.ts +19 -0
- package/node_modules/supervision-js-core/dist/utils/id-mask-frame.d.ts.map +1 -1
- package/package.json +3 -3
- package/dist/media/media-condition-probe.d.ts +0 -51
- package/dist/media/media-condition-probe.d.ts.map +0 -1
- package/dist/media/media-conditions.d.ts +0 -28
- package/dist/media/media-conditions.d.ts.map +0 -1
- package/dist/types/media-conditions.d.ts +0 -149
- package/dist/types/media-conditions.d.ts.map +0 -1
- package/dist/web-video-engine/analysis-session.d.ts.map +0 -1
- package/dist/web-video-engine/analysis.d.ts.map +0 -1
- package/dist/web-video-engine/analysis.js.map +0 -1
- package/dist/web-video-engine/cache-budget.d.ts.map +0 -1
- package/dist/web-video-engine/canvas-sink-scrub-cursor.d.ts.map +0 -1
- package/dist/web-video-engine/clock.d.ts.map +0 -1
- package/dist/web-video-engine/constants.d.ts.map +0 -1
- package/dist/web-video-engine/create-scrub-cursor.d.ts.map +0 -1
- package/dist/web-video-engine/decode-resolution.d.ts.map +0 -1
- package/dist/web-video-engine/decode-scheduler.d.ts.map +0 -1
- package/dist/web-video-engine/decode-session.d.ts.map +0 -1
- package/dist/web-video-engine/decode-source.d.ts.map +0 -1
- package/dist/web-video-engine/diagnostics-store.d.ts.map +0 -1
- package/dist/web-video-engine/diagnostics.d.ts.map +0 -1
- package/dist/web-video-engine/embedded-engine-worker.d.ts.map +0 -1
- package/dist/web-video-engine/engine-core.d.ts.map +0 -1
- package/dist/web-video-engine/engine.d.ts.map +0 -1
- package/dist/web-video-engine/engine.js.map +0 -1
- package/dist/web-video-engine/engine.worker.d.ts.map +0 -1
- package/dist/web-video-engine/engine.worker.js.map +0 -1
- package/dist/web-video-engine/frame-cache.d.ts.map +0 -1
- package/dist/web-video-engine/frame-extractor.d.ts.map +0 -1
- package/dist/web-video-engine/frame-timeline-GINI8Gum.js.map +0 -1
- package/dist/web-video-engine/frame-timeline.d.ts.map +0 -1
- package/dist/web-video-engine/frame-walker.d.ts.map +0 -1
- package/dist/web-video-engine/key-packet.d.ts.map +0 -1
- package/dist/web-video-engine/keyframe-index.d.ts.map +0 -1
- package/dist/web-video-engine/mirror-store.d.ts.map +0 -1
- package/dist/web-video-engine/renderer.d.ts.map +0 -1
- package/dist/web-video-engine/rotation.d.ts.map +0 -1
- package/dist/web-video-engine/scrub-controller.d.ts.map +0 -1
- package/dist/web-video-engine/scrub-cursor.d.ts.map +0 -1
- package/dist/web-video-engine/scrub-trajectory.d.ts.map +0 -1
- package/dist/web-video-engine/source-residency.d.ts.map +0 -1
- package/dist/web-video-engine/trace-recorder.d.ts.map +0 -1
- package/dist/web-video-engine/types.d.ts.map +0 -1
- package/dist/web-video-engine/video-engine.d.ts.map +0 -1
- package/dist/web-video-engine/webgpu-renderer.d.ts.map +0 -1
- package/dist/web-video-engine/worker-bridge.d.ts.map +0 -1
- package/dist/web-video-engine/worker-dispatch.d.ts.map +0 -1
- package/dist/web-video-engine/worker-protocol.d.ts.map +0 -1
|
@@ -563,8 +563,8 @@ function startWaitBound(timeoutMs) {
|
|
|
563
563
|
return { cancel: () => clearTimeout(handle), expired };
|
|
564
564
|
}
|
|
565
565
|
|
|
566
|
-
const DEFAULT_BUFFER_AHEAD_SECONDS =
|
|
567
|
-
const DEFAULT_BUFFER_BEHIND_SECONDS =
|
|
566
|
+
const DEFAULT_BUFFER_AHEAD_SECONDS = 10;
|
|
567
|
+
const DEFAULT_BUFFER_BEHIND_SECONDS = 5;
|
|
568
568
|
/**
|
|
569
569
|
* Share of the ahead window that must still lead the playhead when the next
|
|
570
570
|
* window is fetched.
|
|
@@ -615,6 +615,7 @@ function createBufferedDetectionTimeline(options) {
|
|
|
615
615
|
duration: null,
|
|
616
616
|
loop: false,
|
|
617
617
|
};
|
|
618
|
+
let timelineFirstTimestamp = 0;
|
|
618
619
|
let inFlight;
|
|
619
620
|
let incrementalRefresh;
|
|
620
621
|
/** Source version the gate last gave up on, or null while it still waits. */
|
|
@@ -754,14 +755,15 @@ function createBufferedDetectionTimeline(options) {
|
|
|
754
755
|
state.bufferEndTime === null) {
|
|
755
756
|
return;
|
|
756
757
|
}
|
|
757
|
-
const
|
|
758
|
+
const loopSpan = duration - timelineFirstTimestamp;
|
|
759
|
+
const laps = Math.round((getComparableMediaTime(mediaTime) - mediaTime) / loopSpan);
|
|
758
760
|
if (laps === 0) {
|
|
759
761
|
return;
|
|
760
762
|
}
|
|
761
763
|
state = {
|
|
762
764
|
...state,
|
|
763
|
-
bufferEndTime: state.bufferEndTime - laps *
|
|
764
|
-
bufferStartTime: state.bufferStartTime - laps *
|
|
765
|
+
bufferEndTime: state.bufferEndTime - laps * loopSpan,
|
|
766
|
+
bufferStartTime: state.bufferStartTime - laps * loopSpan,
|
|
765
767
|
};
|
|
766
768
|
notifyBufferChanged();
|
|
767
769
|
};
|
|
@@ -773,6 +775,32 @@ function createBufferedDetectionTimeline(options) {
|
|
|
773
775
|
comparableMediaTime >= state.bufferStartTime &&
|
|
774
776
|
comparableMediaTime <= state.bufferEndTime);
|
|
775
777
|
};
|
|
778
|
+
const inFlightCovers = (mediaTime) => {
|
|
779
|
+
if (!inFlight) {
|
|
780
|
+
return true;
|
|
781
|
+
}
|
|
782
|
+
const comparableMediaTime = getComparableMediaTime(mediaTime);
|
|
783
|
+
return (comparableMediaTime >= inFlight.startTime &&
|
|
784
|
+
comparableMediaTime <= inFlight.endTime);
|
|
785
|
+
};
|
|
786
|
+
const supersedeLoadOutside = (mediaTime) => {
|
|
787
|
+
if (!inFlight || inFlightCovers(mediaTime)) {
|
|
788
|
+
return;
|
|
789
|
+
}
|
|
790
|
+
const keepsCurrentBuffer = isBuffered(mediaTime);
|
|
791
|
+
loadId += 1;
|
|
792
|
+
inFlight = undefined;
|
|
793
|
+
if (keepsCurrentBuffer) {
|
|
794
|
+
state = {
|
|
795
|
+
...state,
|
|
796
|
+
errorMessage: null,
|
|
797
|
+
requestedEndTime: state.bufferEndTime,
|
|
798
|
+
requestedStartTime: state.bufferStartTime,
|
|
799
|
+
status: DetectionBufferStatus.Ready,
|
|
800
|
+
};
|
|
801
|
+
notifyBufferChanged();
|
|
802
|
+
}
|
|
803
|
+
};
|
|
776
804
|
const isInsideBufferedRange = (mediaTime) => {
|
|
777
805
|
const comparableMediaTime = getComparableMediaTime(mediaTime);
|
|
778
806
|
return (bufferedVersionRange !== null &&
|
|
@@ -783,6 +811,11 @@ function createBufferedDetectionTimeline(options) {
|
|
|
783
811
|
};
|
|
784
812
|
const refreshBuffer = async (mediaTime, lead = "full") => {
|
|
785
813
|
if (isBuffered(mediaTime)) {
|
|
814
|
+
// A backwards navigation may land in the retained buffer while a rolling
|
|
815
|
+
// prefetch for the old playhead is about to replace it. The navigation
|
|
816
|
+
// is current truth; do not let that older load evict its detections after
|
|
817
|
+
// the frame has been accepted.
|
|
818
|
+
supersedeLoadOutside(mediaTime);
|
|
786
819
|
return;
|
|
787
820
|
}
|
|
788
821
|
if (isInsideBufferedRange(mediaTime) &&
|
|
@@ -833,16 +866,27 @@ function createBufferedDetectionTimeline(options) {
|
|
|
833
866
|
if (destroyed || !isLoadingEnabled()) {
|
|
834
867
|
return;
|
|
835
868
|
}
|
|
869
|
+
adoptFirstTimestamp(prepareOptions?.firstTimestamp);
|
|
870
|
+
const navigationMediaTime = getNavigationMediaTime(mediaTime);
|
|
836
871
|
if (shouldWaitForPlaybackGate(prepareOptions)) {
|
|
837
|
-
await waitForPlaybackGate(
|
|
872
|
+
await waitForPlaybackGate(navigationMediaTime, prepareOptions);
|
|
838
873
|
if (destroyed) {
|
|
839
874
|
return;
|
|
840
875
|
}
|
|
841
876
|
}
|
|
842
|
-
await refreshBuffer(
|
|
843
|
-
anchorWindowToPlayhead(
|
|
877
|
+
await refreshBuffer(navigationMediaTime);
|
|
878
|
+
anchorWindowToPlayhead(navigationMediaTime);
|
|
879
|
+
},
|
|
880
|
+
needsBufferPrepare(mediaTime) {
|
|
881
|
+
const navigationMediaTime = getNavigationMediaTime(mediaTime);
|
|
882
|
+
return (!destroyed &&
|
|
883
|
+
isLoadingEnabled() &&
|
|
884
|
+
(!isInsideBufferedRange(navigationMediaTime) ||
|
|
885
|
+
!inFlightCovers(navigationMediaTime)));
|
|
844
886
|
},
|
|
845
887
|
needsPlaybackGateWait(mediaTime, prepareOptions) {
|
|
888
|
+
adoptFirstTimestamp(prepareOptions?.firstTimestamp);
|
|
889
|
+
const navigationMediaTime = getNavigationMediaTime(mediaTime);
|
|
846
890
|
if (destroyed ||
|
|
847
891
|
!isLoadingEnabled() ||
|
|
848
892
|
!playbackGate?.enabled ||
|
|
@@ -852,27 +896,31 @@ function createBufferedDetectionTimeline(options) {
|
|
|
852
896
|
return false;
|
|
853
897
|
}
|
|
854
898
|
const availableRanges = options.source.getAvailableRanges();
|
|
855
|
-
return !createPlaybackGateCoveragePlan(
|
|
899
|
+
return !createPlaybackGateCoveragePlan(navigationMediaTime, prepareOptions).sourceRanges.every((range) => isRangeCovered(range, availableRanges));
|
|
856
900
|
},
|
|
857
901
|
prefetch(mediaTime) {
|
|
858
902
|
if (destroyed || !isLoadingEnabled()) {
|
|
859
903
|
return;
|
|
860
904
|
}
|
|
861
|
-
|
|
862
|
-
|
|
905
|
+
const navigationMediaTime = getNavigationMediaTime(mediaTime);
|
|
906
|
+
anchorWindowToPlayhead(navigationMediaTime);
|
|
907
|
+
supersedeLoadOutside(navigationMediaTime);
|
|
908
|
+
if (!shouldPrefetch(navigationMediaTime)) {
|
|
863
909
|
return;
|
|
864
910
|
}
|
|
865
|
-
pendingPrefetch = { loadId, mediaTime };
|
|
911
|
+
pendingPrefetch = { loadId, mediaTime: navigationMediaTime };
|
|
866
912
|
pumpPrefetchQueue();
|
|
867
913
|
},
|
|
868
914
|
selectFrame(mediaTime) {
|
|
869
|
-
|
|
915
|
+
const navigationMediaTime = getNavigationMediaTime(mediaTime);
|
|
916
|
+
if (!isInsideBufferedRange(navigationMediaTime)) {
|
|
870
917
|
return undefined;
|
|
871
918
|
}
|
|
872
|
-
return selectDetectionFrame(buffer, getSourceMediaTime(
|
|
919
|
+
return selectDetectionFrame(buffer, getSourceMediaTime(navigationMediaTime), options);
|
|
873
920
|
},
|
|
874
921
|
setTimelineContext(context) {
|
|
875
922
|
timelineContext = context;
|
|
923
|
+
adoptFirstTimestamp(context.firstTimestamp);
|
|
876
924
|
bufferedSourceVersion = null;
|
|
877
925
|
bufferedVersionRange = null;
|
|
878
926
|
},
|
|
@@ -1008,12 +1056,12 @@ function createBufferedDetectionTimeline(options) {
|
|
|
1008
1056
|
}
|
|
1009
1057
|
function createPlaybackGateCoveragePlan(mediaTime, prepareOptions) {
|
|
1010
1058
|
const requiredAheadSeconds = Math.max(0, playbackGate?.requiredAheadSeconds ?? 0);
|
|
1011
|
-
const comparableMediaTime = getComparableMediaTime(mediaTime);
|
|
1059
|
+
const comparableMediaTime = Math.max(timelineFirstTimestamp, getComparableMediaTime(mediaTime));
|
|
1012
1060
|
const endTime = getRequiredCoverageEndTime({
|
|
1013
1061
|
// A looping window counts past the end of media and wraps into the
|
|
1014
1062
|
// replay, so clamping it to duration would ask for less than it needs.
|
|
1015
1063
|
duration: isLoopingTimeline() ? null : prepareOptions?.duration,
|
|
1016
|
-
firstTimestamp:
|
|
1064
|
+
firstTimestamp: timelineFirstTimestamp,
|
|
1017
1065
|
mediaTime: comparableMediaTime,
|
|
1018
1066
|
requiredAheadSeconds,
|
|
1019
1067
|
});
|
|
@@ -1100,21 +1148,23 @@ function createBufferedDetectionTimeline(options) {
|
|
|
1100
1148
|
* a looping timeline. A plan is stated on the first lap and the window on the
|
|
1101
1149
|
* playhead's, so across the loop point the two state the same edge a whole lap
|
|
1102
1150
|
* apart; measured straight, that reads as a window a full lap stale and
|
|
1103
|
-
* rebuilds it on every frame until the plan stops reaching behind
|
|
1151
|
+
* rebuilds it on every frame until the plan stops reaching behind the first
|
|
1152
|
+
* playable timestamp.
|
|
1104
1153
|
*/
|
|
1105
1154
|
function getWindowDrift(planTime, bufferTime) {
|
|
1106
1155
|
const drift = Math.abs(planTime - bufferTime);
|
|
1107
1156
|
if (!isLoopingTimeline() || timelineContext.duration === null) {
|
|
1108
1157
|
return drift;
|
|
1109
1158
|
}
|
|
1110
|
-
const
|
|
1111
|
-
|
|
1159
|
+
const loopSpan = timelineContext.duration - timelineFirstTimestamp;
|
|
1160
|
+
const wrappedDrift = modulo(drift, loopSpan);
|
|
1161
|
+
return Math.min(wrappedDrift, loopSpan - wrappedDrift);
|
|
1112
1162
|
}
|
|
1113
1163
|
function createLoadPlan(requestedStartTime, requestedEndTime) {
|
|
1114
1164
|
const startTime = Math.min(requestedStartTime, requestedEndTime);
|
|
1115
1165
|
const endTime = Math.max(startTime, requestedEndTime);
|
|
1116
1166
|
if (!isLoopingTimeline()) {
|
|
1117
|
-
const clampedStartTime = Math.max(
|
|
1167
|
+
const clampedStartTime = Math.max(timelineFirstTimestamp, startTime);
|
|
1118
1168
|
const clampedEndTime = Math.max(clampedStartTime, endTime);
|
|
1119
1169
|
return {
|
|
1120
1170
|
endTime: clampedEndTime,
|
|
@@ -1128,22 +1178,25 @@ function createBufferedDetectionTimeline(options) {
|
|
|
1128
1178
|
};
|
|
1129
1179
|
}
|
|
1130
1180
|
const duration = timelineContext.duration ?? 0;
|
|
1131
|
-
|
|
1181
|
+
const loopSpan = duration - timelineFirstTimestamp;
|
|
1182
|
+
if (endTime - startTime >= loopSpan) {
|
|
1132
1183
|
return {
|
|
1133
1184
|
endTime: duration,
|
|
1134
|
-
sourceRanges: [
|
|
1135
|
-
|
|
1185
|
+
sourceRanges: [
|
|
1186
|
+
{ endTime: duration, startTime: timelineFirstTimestamp },
|
|
1187
|
+
],
|
|
1188
|
+
startTime: timelineFirstTimestamp,
|
|
1136
1189
|
};
|
|
1137
1190
|
}
|
|
1138
1191
|
// Both ends move by the same whole number of laps, so the window keeps its
|
|
1139
1192
|
// span and its source ranges while its start reads on the media clock: a
|
|
1140
1193
|
// window counted in the laps playback accumulated is one no host can hold
|
|
1141
1194
|
// against a current time.
|
|
1142
|
-
const laps = Math.floor(startTime /
|
|
1195
|
+
const laps = Math.floor((startTime - timelineFirstTimestamp) / loopSpan);
|
|
1143
1196
|
return {
|
|
1144
|
-
endTime: endTime - laps *
|
|
1145
|
-
sourceRanges: getLoopingSourceRanges(startTime, endTime, duration),
|
|
1146
|
-
startTime: startTime - laps *
|
|
1197
|
+
endTime: endTime - laps * loopSpan,
|
|
1198
|
+
sourceRanges: getLoopingSourceRanges(startTime, endTime, duration, timelineFirstTimestamp),
|
|
1199
|
+
startTime: startTime - laps * loopSpan,
|
|
1147
1200
|
};
|
|
1148
1201
|
}
|
|
1149
1202
|
function getBufferedSourceRanges() {
|
|
@@ -1155,7 +1208,7 @@ function createBufferedDetectionTimeline(options) {
|
|
|
1155
1208
|
function isLoopingTimeline() {
|
|
1156
1209
|
return (timelineContext.loop &&
|
|
1157
1210
|
timelineContext.duration !== null &&
|
|
1158
|
-
timelineContext.duration >
|
|
1211
|
+
timelineContext.duration > timelineFirstTimestamp);
|
|
1159
1212
|
}
|
|
1160
1213
|
function getComparableMediaTime(mediaTime) {
|
|
1161
1214
|
if (!isLoopingTimeline() ||
|
|
@@ -1164,23 +1217,42 @@ function createBufferedDetectionTimeline(options) {
|
|
|
1164
1217
|
timelineContext.duration === null) {
|
|
1165
1218
|
return mediaTime;
|
|
1166
1219
|
}
|
|
1167
|
-
const
|
|
1168
|
-
// The representative of mediaTime (mod
|
|
1220
|
+
const loopSpan = timelineContext.duration - timelineFirstTimestamp;
|
|
1221
|
+
// The representative of mediaTime (mod the loop span) anchored at the window
|
|
1169
1222
|
// start. The mapping must depend only on where the window sits, never on
|
|
1170
1223
|
// how many laps playback has accumulated, or membership drifts away from
|
|
1171
1224
|
// what the buffer actually holds. A time less than one lap past the
|
|
1172
1225
|
// anchor never wraps, so ordinary forward playback cannot ratchet.
|
|
1173
1226
|
return (state.bufferStartTime +
|
|
1174
|
-
modulo(mediaTime - state.bufferStartTime,
|
|
1227
|
+
modulo(mediaTime - state.bufferStartTime, loopSpan));
|
|
1175
1228
|
}
|
|
1176
1229
|
function getSourceMediaTime(mediaTime) {
|
|
1177
1230
|
if (!isLoopingTimeline() || timelineContext.duration === null) {
|
|
1178
1231
|
return mediaTime;
|
|
1179
1232
|
}
|
|
1180
|
-
if (mediaTime >=
|
|
1233
|
+
if (mediaTime >= timelineFirstTimestamp &&
|
|
1234
|
+
mediaTime <= timelineContext.duration) {
|
|
1181
1235
|
return mediaTime;
|
|
1182
1236
|
}
|
|
1183
|
-
|
|
1237
|
+
const loopSpan = timelineContext.duration - timelineFirstTimestamp;
|
|
1238
|
+
return (timelineFirstTimestamp +
|
|
1239
|
+
modulo(mediaTime - timelineFirstTimestamp, loopSpan));
|
|
1240
|
+
}
|
|
1241
|
+
function getNavigationMediaTime(mediaTime) {
|
|
1242
|
+
return Math.max(timelineFirstTimestamp, mediaTime);
|
|
1243
|
+
}
|
|
1244
|
+
function adoptFirstTimestamp(firstTimestamp) {
|
|
1245
|
+
if (firstTimestamp === undefined ||
|
|
1246
|
+
!Number.isFinite(firstTimestamp) ||
|
|
1247
|
+
firstTimestamp === timelineFirstTimestamp) {
|
|
1248
|
+
return;
|
|
1249
|
+
}
|
|
1250
|
+
timelineFirstTimestamp = firstTimestamp;
|
|
1251
|
+
loadId += 1;
|
|
1252
|
+
inFlight = undefined;
|
|
1253
|
+
pendingPrefetch = undefined;
|
|
1254
|
+
bufferedSourceVersion = null;
|
|
1255
|
+
bufferedVersionRange = null;
|
|
1184
1256
|
}
|
|
1185
1257
|
}
|
|
1186
1258
|
function createIdleDetectionBufferState() {
|
|
@@ -1211,13 +1283,14 @@ function getRequiredCoverageEndTime(options) {
|
|
|
1211
1283
|
if (options.duration === null || options.duration === undefined) {
|
|
1212
1284
|
return requestedEndTime;
|
|
1213
1285
|
}
|
|
1214
|
-
return Math.min(requestedEndTime, (options.firstTimestamp ?? 0
|
|
1286
|
+
return Math.min(requestedEndTime, Math.max(options.firstTimestamp ?? 0, options.duration));
|
|
1215
1287
|
}
|
|
1216
|
-
function getLoopingSourceRanges(startTime, endTime, duration) {
|
|
1217
|
-
const
|
|
1218
|
-
const
|
|
1219
|
-
const
|
|
1220
|
-
const
|
|
1288
|
+
function getLoopingSourceRanges(startTime, endTime, duration, firstTimestamp = 0) {
|
|
1289
|
+
const loopSpan = duration - firstTimestamp;
|
|
1290
|
+
const normalizedStartTime = firstTimestamp + modulo(startTime - firstTimestamp, loopSpan);
|
|
1291
|
+
const normalizedEndTime = firstTimestamp + modulo(endTime - firstTimestamp, loopSpan);
|
|
1292
|
+
const startCycle = Math.floor((startTime - firstTimestamp) / loopSpan);
|
|
1293
|
+
const endCycle = Math.floor((endTime - firstTimestamp) / loopSpan);
|
|
1221
1294
|
if (startCycle === endCycle) {
|
|
1222
1295
|
return [{ endTime: normalizedEndTime, startTime: normalizedStartTime }];
|
|
1223
1296
|
}
|
|
@@ -1225,8 +1298,8 @@ function getLoopingSourceRanges(startTime, endTime, duration) {
|
|
|
1225
1298
|
if (normalizedStartTime < duration) {
|
|
1226
1299
|
ranges.push({ endTime: duration, startTime: normalizedStartTime });
|
|
1227
1300
|
}
|
|
1228
|
-
if (normalizedEndTime >
|
|
1229
|
-
ranges.push({ endTime: normalizedEndTime, startTime:
|
|
1301
|
+
if (normalizedEndTime > firstTimestamp) {
|
|
1302
|
+
ranges.push({ endTime: normalizedEndTime, startTime: firstTimestamp });
|
|
1230
1303
|
}
|
|
1231
1304
|
return ranges;
|
|
1232
1305
|
}
|
|
@@ -4033,9 +4106,16 @@ function computeMaskBounds(data, width, height) {
|
|
|
4033
4106
|
};
|
|
4034
4107
|
}
|
|
4035
4108
|
function computeDetectionMaskRect(mask) {
|
|
4036
|
-
const
|
|
4037
|
-
|
|
4038
|
-
|
|
4109
|
+
const { bounds } = readCompressedRleMask(mask);
|
|
4110
|
+
if (!bounds) {
|
|
4111
|
+
return undefined;
|
|
4112
|
+
}
|
|
4113
|
+
return {
|
|
4114
|
+
height: bounds.height,
|
|
4115
|
+
width: bounds.width,
|
|
4116
|
+
x: bounds.left + bounds.width / 2,
|
|
4117
|
+
y: bounds.top + bounds.height / 2,
|
|
4118
|
+
};
|
|
4039
4119
|
}
|
|
4040
4120
|
function detectMaskBorders(data, width, height) {
|
|
4041
4121
|
assertMaskDimensions(data, width, height);
|
|
@@ -4097,13 +4177,8 @@ function extractMaskRectRuns(data, width, height) {
|
|
|
4097
4177
|
* the pass are that box.
|
|
4098
4178
|
*/
|
|
4099
4179
|
function extractDetectionMaskRectRuns(mask) {
|
|
4100
|
-
if (mask.encoding !== DetectionMaskEncoding.CompressedRle) {
|
|
4101
|
-
throw new Error(`Unsupported detection mask encoding: ${mask.encoding}`);
|
|
4102
|
-
}
|
|
4103
4180
|
const { height, width } = mask;
|
|
4104
|
-
|
|
4105
|
-
const counts = decodeCompressedRleCounts(mask.counts);
|
|
4106
|
-
const bounds = computeCompressedRleBounds(counts, width, height);
|
|
4181
|
+
const { bounds, counts } = readCompressedRleMask(mask);
|
|
4107
4182
|
if (!bounds) {
|
|
4108
4183
|
return undefined;
|
|
4109
4184
|
}
|
|
@@ -4135,6 +4210,17 @@ function extractDetectionMaskRectRuns(mask) {
|
|
|
4135
4210
|
const rects = mergeRowSpansIntoRects(boundsBuffer, boundsWidth, boundsHeight, left, top);
|
|
4136
4211
|
return rects.length > 0 ? rects : undefined;
|
|
4137
4212
|
}
|
|
4213
|
+
function readCompressedRleMask(mask) {
|
|
4214
|
+
if (mask.encoding !== DetectionMaskEncoding.CompressedRle) {
|
|
4215
|
+
throw new Error(`Unsupported detection mask encoding: ${mask.encoding}`);
|
|
4216
|
+
}
|
|
4217
|
+
assertMaskSize(mask.width, mask.height);
|
|
4218
|
+
const counts = decodeCompressedRleCounts(mask.counts);
|
|
4219
|
+
return {
|
|
4220
|
+
bounds: computeCompressedRleBounds(counts, mask.width, mask.height),
|
|
4221
|
+
counts,
|
|
4222
|
+
};
|
|
4223
|
+
}
|
|
4138
4224
|
/** Counts alternate background, foreground, starting on background. */
|
|
4139
4225
|
function isForegroundRun(index) {
|
|
4140
4226
|
return index % 2 === 1;
|
|
@@ -7433,7 +7519,6 @@ function createIdMaskFrame(instructions, options = {}) {
|
|
|
7433
7519
|
const height = width === maskWidth
|
|
7434
7520
|
? maskHeight
|
|
7435
7521
|
: Math.max(1, Math.round((width * maskHeight) / maskWidth));
|
|
7436
|
-
const strokeScale = width / maskWidth;
|
|
7437
7522
|
const scaledAxes = width === maskWidth
|
|
7438
7523
|
? undefined
|
|
7439
7524
|
: createScaledMaskAxes({ height, maskHeight, maskWidth, width });
|
|
@@ -7444,18 +7529,17 @@ function createIdMaskFrame(instructions, options = {}) {
|
|
|
7444
7529
|
let hasStroke = false;
|
|
7445
7530
|
let maxStrokeWidth = 0;
|
|
7446
7531
|
for (const instruction of instructions) {
|
|
7447
|
-
const detectionMaskId = instruction.detectionIndex
|
|
7448
|
-
if (detectionMaskId
|
|
7449
|
-
detectionMaskId >= MAX_ID_MASK_PALETTE_ENTRIES) {
|
|
7532
|
+
const detectionMaskId = resolveIdMaskPaletteId(instruction.detectionIndex);
|
|
7533
|
+
if (detectionMaskId === undefined) {
|
|
7450
7534
|
return undefined;
|
|
7451
7535
|
}
|
|
7452
|
-
|
|
7536
|
+
writeIdMaskPaletteEntry(fillPalette, detectionMaskId, instruction.color, instruction.alpha);
|
|
7453
7537
|
if (instruction.stroke && instruction.stroke.width > 0) {
|
|
7454
|
-
const strokeWidth =
|
|
7538
|
+
const strokeWidth = resolveIdMaskStrokeTexels(instruction.stroke.width, maskWidth, width);
|
|
7455
7539
|
hasStroke = true;
|
|
7456
7540
|
strokeWidths[detectionMaskId] = strokeWidth;
|
|
7457
7541
|
maxStrokeWidth = Math.max(maxStrokeWidth, strokeWidth);
|
|
7458
|
-
|
|
7542
|
+
writeIdMaskPaletteEntry(strokePalette, detectionMaskId, instruction.stroke.color, instruction.stroke.alpha);
|
|
7459
7543
|
}
|
|
7460
7544
|
if (scaledAxes) {
|
|
7461
7545
|
writeScaledMaskRuns(data, scaledAxes, instruction.mask, detectionMaskId);
|
|
@@ -7470,6 +7554,7 @@ function createIdMaskFrame(instructions, options = {}) {
|
|
|
7470
7554
|
hasStroke,
|
|
7471
7555
|
height,
|
|
7472
7556
|
maxStrokeWidth,
|
|
7557
|
+
sourceWidth: maskWidth,
|
|
7473
7558
|
strokePalette,
|
|
7474
7559
|
strokeWidths,
|
|
7475
7560
|
width,
|
|
@@ -7552,10 +7637,14 @@ function resolveRasterWidth(maskWidth, maxWidth) {
|
|
|
7552
7637
|
* A stroke is measured in texels of the raster it is drawn on, so a coarser
|
|
7553
7638
|
* raster measures it in coarser texels. A stroke of a texel or more keeps at
|
|
7554
7639
|
* least one, the thinnest line the shader can draw; a narrower one keeps its
|
|
7555
|
-
* own width, which the shader draws as an inner boundary at any scale.
|
|
7640
|
+
* own width, which the shader draws as an inner boundary at any scale. The
|
|
7641
|
+
* ceiling is the widest neighbourhood the shaders scan, so a wider stroke would
|
|
7642
|
+
* be drawn at the ceiling anyway and every layer drawing the same annotation
|
|
7643
|
+
* has to arrive at the same width.
|
|
7556
7644
|
*/
|
|
7557
|
-
function
|
|
7558
|
-
|
|
7645
|
+
function resolveIdMaskStrokeTexels(strokeWidth, maskWidth, rasterWidth) {
|
|
7646
|
+
const scale = maskWidth > 0 ? rasterWidth / maskWidth : 1;
|
|
7647
|
+
return Math.min(Math.max(strokeWidth * scale, Math.min(strokeWidth, 1)), MAX_ID_MASK_STROKE_WIDTH);
|
|
7559
7648
|
}
|
|
7560
7649
|
function createScaledMaskAxes(frame) {
|
|
7561
7650
|
return {
|
|
@@ -7572,8 +7661,19 @@ function createMaskAxisMap(sourceLength, targetLength, stride) {
|
|
|
7572
7661
|
}
|
|
7573
7662
|
return map;
|
|
7574
7663
|
}
|
|
7575
|
-
|
|
7576
|
-
|
|
7664
|
+
/**
|
|
7665
|
+
* The palette slot a detection index names, or undefined when the palette has
|
|
7666
|
+
* no slot for it. Slot zero is the background, so the ids start at one and the
|
|
7667
|
+
* last detection the palette can name sits one index below the last slot.
|
|
7668
|
+
*/
|
|
7669
|
+
function resolveIdMaskPaletteId(detectionIndex) {
|
|
7670
|
+
const detectionMaskId = detectionIndex + 1;
|
|
7671
|
+
return detectionMaskId > 0 && detectionMaskId < MAX_ID_MASK_PALETTE_ENTRIES
|
|
7672
|
+
? detectionMaskId
|
|
7673
|
+
: undefined;
|
|
7674
|
+
}
|
|
7675
|
+
function writeIdMaskPaletteEntry(palette, detectionMaskId, color, alpha) {
|
|
7676
|
+
const offset = detectionMaskId * 4;
|
|
7577
7677
|
palette[offset] = ((color >> 16) & 0xff) / 255;
|
|
7578
7678
|
palette[offset + 1] = ((color >> 8) & 0xff) / 255;
|
|
7579
7679
|
palette[offset + 2] = (color & 0xff) / 255;
|
|
@@ -7811,7 +7911,7 @@ var MediaRendererPlaybackState;
|
|
|
7811
7911
|
*/
|
|
7812
7912
|
var MediaErrorKind;
|
|
7813
7913
|
(function (MediaErrorKind) {
|
|
7814
|
-
/** The media could not be opened or read
|
|
7914
|
+
/** The media could not be opened or read, or was refused before any read. */
|
|
7815
7915
|
MediaErrorKind["Unreadable"] = "unreadable";
|
|
7816
7916
|
/** The container or codec is not supported by this platform. */
|
|
7817
7917
|
MediaErrorKind["UnsupportedFormat"] = "unsupportedFormat";
|
|
@@ -7845,8 +7945,8 @@ var MediaSourceStatus;
|
|
|
7845
7945
|
* A source the renderer pulls samples from can be held between any two frames,
|
|
7846
7946
|
* because the renderer decides when each one is drawn. A source that presents
|
|
7847
7947
|
* its own frames owns the playhead, so holding it means stopping the producer
|
|
7848
|
-
* and starting it again,
|
|
7849
|
-
*
|
|
7948
|
+
* and starting it again, and a gate that stops one has to bound its own wait
|
|
7949
|
+
* or a producer nothing answers for never runs again.
|
|
7850
7950
|
*/
|
|
7851
7951
|
var PlaybackGateReach;
|
|
7852
7952
|
(function (PlaybackGateReach) {
|
|
@@ -7857,8 +7957,6 @@ var PlaybackGateReach;
|
|
|
7857
7957
|
* missing, until they arrive or the gate's own wait bound gives up on them.
|
|
7858
7958
|
*/
|
|
7859
7959
|
PlaybackGateReach["EveryFrame"] = "everyFrame";
|
|
7860
|
-
/** Playback waits to begin; frames after that are not held. */
|
|
7861
|
-
PlaybackGateReach["StartOfPlayback"] = "startOfPlayback";
|
|
7862
7960
|
})(PlaybackGateReach || (PlaybackGateReach = {}));
|
|
7863
7961
|
|
|
7864
7962
|
/**
|
|
@@ -7912,7 +8010,23 @@ var MediaSessionActivityKind;
|
|
|
7912
8010
|
MediaSessionActivityKind["Error"] = "error";
|
|
7913
8011
|
MediaSessionActivityKind["MediaNormalizing"] = "mediaNormalizing";
|
|
7914
8012
|
MediaSessionActivityKind["MediaOpening"] = "mediaOpening";
|
|
8013
|
+
/**
|
|
8014
|
+
* The picture is waiting on media the source has not handed over yet, which
|
|
8015
|
+
* is the bytes and their decode rather than anything downstream of them.
|
|
8016
|
+
* `PlaybackBuffering` is what a transport reports once it has already
|
|
8017
|
+
* stopped; this is reported from the read itself, including the reads a seek
|
|
8018
|
+
* makes while the transport still reads as paused.
|
|
8019
|
+
*/
|
|
8020
|
+
MediaSessionActivityKind["MediaSourceReading"] = "mediaSourceReading";
|
|
7915
8021
|
MediaSessionActivityKind["PlaybackBuffering"] = "playbackBuffering";
|
|
8022
|
+
/**
|
|
8023
|
+
* The render-preparation gate held the picture for artifacts that never
|
|
8024
|
+
* arrived and let it go. Nothing is blocked: the frames reaching the screen
|
|
8025
|
+
* are the ones whose artifacts were given up on. What is waited on is
|
|
8026
|
+
* preparation finishing another frame, which is what lets the gate hold the
|
|
8027
|
+
* picture again; `RenderPreparing` covers the holds that are running.
|
|
8028
|
+
*/
|
|
8029
|
+
MediaSessionActivityKind["RenderPreparationAbandoned"] = "renderPreparationAbandoned";
|
|
7916
8030
|
MediaSessionActivityKind["RenderPreparing"] = "renderPreparing";
|
|
7917
8031
|
})(MediaSessionActivityKind || (MediaSessionActivityKind = {}));
|
|
7918
8032
|
/**
|
|
@@ -7925,5 +8039,5 @@ var MediaSessionActivityStatus;
|
|
|
7925
8039
|
MediaSessionActivityStatus["Waiting"] = "waiting";
|
|
7926
8040
|
})(MediaSessionActivityStatus || (MediaSessionActivityStatus = {}));
|
|
7927
8041
|
|
|
7928
|
-
export { AnnotationFrameMutationKind, AnnotationGeometryKind, AnnotationGestureStateKind, AnnotationHandleKind, BaseBoxCornerStyle, BaseBoxStyle, BaseFocusStyle, BaseInteractionStyle, BaseKeypointStyle, BaseLabelStyle, BaseMarkerStyle, BaseMaskStyle, BasePolygonStyle, BasePolylineStyle, BoxShape, StrokeAlignment as BoxStrokeAlignment, DEFAULT_DETECTION_CLASS_STYLES, DEFAULT_DETECTION_COLOR_SEQUENCE, DetectionBufferStatus, DetectionFrameRetentionMode, DetectionFrameSelectionMode, DetectionInteractionState, DetectionMaskEncoding, DetectionMaskPayloadFormat, DetectionPickTarget, FocusTargetMode, KeypointMarkerShape, KeypointVisibility, LabelPlacement, LabelVisibilityMode, MAX_ID_MASK_PALETTE_ENTRIES, MAX_ID_MASK_STROKE_WIDTH, MarkerShape, MarkerSizeSpace, MaskRenderMode, MediaErrorKind, MediaInteractionMode, MediaRendererFit, MediaRendererPlaybackState, MediaSessionActivityKind, MediaSessionActivityStatus, MediaSessionMode, MediaSessionStatus, MediaSourceStatus, PlaybackGateReach, RegionRendererComposeMode, RegionRendererCoverageKind, RegionRendererMediaEffectKind, RegionRendererRegionKind, RegionRendererSizeSpace, RegionRendererSourceKind, SUPERVISION_ROBOFLOW_COLOR, ShapeInstructionKind, StrokeAlignment, TrackingGeometry, annotationRendererKinds, annotationRenderers, applyAnnotationHandleDrag, canReuseMaskStyleArtifacts, centerRectToTopLeftRect, computeDetectionMaskRect, computeMaskBounds, containsPoint, convertDetectionBoxToMask, convertDetectionBoxToPolygon, convertDetectionMaskToBox, convertDetectionMaskToPolygon, convertDetectionPolygonToBox, convertDetectionPolygonToMask, copySortedDetectionFrames, createAnnotationEditingEngine, createArrayDetectionFrameSource, createBufferedDetectionTimeline, createByteTrackTracker, createCBIoUTracker, createColdDetectionFrameSource, createCompositeDetectionFrameSource, createDefaultAnnotationPresentation, createDetectionPickKey, createEditableAnnotationFrameSession, createIdMaskFrame, createIdleDetectionBufferState, createMemoryColdDetectionFrameStore, createOCSortTracker, createProjectedDetectionFrameSource, createSortTracker, createSourceAwarePresentation, createViewportController, createWritableDetectionFrameSource, decodeCompressedRleCounts, decodeCompressedRleMask, decodeDetectionMaskPayload, deleteAnnotationVertex, detectMaskBorders, detectionFrameOverlapsRange, detectionPostProcessors, distanceToSegment, encodeBinaryMask, encodeBinaryMaskWithBounds, encodeCompressedRleCounts, encodeDetectionMaskPayload, extractDetectionMaskRectRuns, extractMaskContour, extractMaskRectRuns, filterDetectionFramesForRange, findClosestAnnotationSegment, followDetectionPickAcrossFrames, getAnnotationHandles, getBufferedDetectionTimelineFrameSnapshot, getDetectionRect, getPointsRect, haveSameDetectionPickIdentities, includeDefined, isDeflatedBase64DetectionMaskPayload, lightenColor, mediaToScreen, mergeDetectionMasks, mergeDetectionPolygonsByClass, normalizeDetectionClassName, offsetDetection, pickAnnotationHandle, pickDetectionAtPoint, pickDetectionByMaskId, pointInPolygon, polygonArea, polygonToRect, projectDetectionFrame, projectDetectionFrameForTracking, projectDetectionFrames, rasterizePolygonToMask, rasterizeRectToMask, rebaseDetectionPickToFrame, rectArea, rectToPolygon, resolveAnnotationRendererPresentation, resolveAnnotationRendererStyleFields, resolveAnnotationStyleState, resolveContrastTextColor, resolveDetectionClassColorStyle, resolveEllipseSegmentCount, resolveMarkerGeometry, resolveMaskStyleOpacity, resolveStyleValue, sampleEllipseArc, screenToMedia, selectDetectionFrame, topLeftRectToCenterRect, validateDetectionFrames };
|
|
8042
|
+
export { AnnotationFrameMutationKind, AnnotationGeometryKind, AnnotationGestureStateKind, AnnotationHandleKind, BaseBoxCornerStyle, BaseBoxStyle, BaseFocusStyle, BaseInteractionStyle, BaseKeypointStyle, BaseLabelStyle, BaseMarkerStyle, BaseMaskStyle, BasePolygonStyle, BasePolylineStyle, BoxShape, StrokeAlignment as BoxStrokeAlignment, DEFAULT_DETECTION_CLASS_STYLES, DEFAULT_DETECTION_COLOR_SEQUENCE, DetectionBufferStatus, DetectionFrameRetentionMode, DetectionFrameSelectionMode, DetectionInteractionState, DetectionMaskEncoding, DetectionMaskPayloadFormat, DetectionPickTarget, FocusTargetMode, KeypointMarkerShape, KeypointVisibility, LabelPlacement, LabelVisibilityMode, MAX_ID_MASK_PALETTE_ENTRIES, MAX_ID_MASK_STROKE_WIDTH, MarkerShape, MarkerSizeSpace, MaskRenderMode, MediaErrorKind, MediaInteractionMode, MediaRendererFit, MediaRendererPlaybackState, MediaSessionActivityKind, MediaSessionActivityStatus, MediaSessionMode, MediaSessionStatus, MediaSourceStatus, PlaybackGateReach, RegionRendererComposeMode, RegionRendererCoverageKind, RegionRendererMediaEffectKind, RegionRendererRegionKind, RegionRendererSizeSpace, RegionRendererSourceKind, SUPERVISION_ROBOFLOW_COLOR, ShapeInstructionKind, StrokeAlignment, TrackingGeometry, annotationRendererKinds, annotationRenderers, applyAnnotationHandleDrag, canReuseMaskStyleArtifacts, centerRectToTopLeftRect, computeDetectionMaskRect, computeMaskBounds, containsPoint, convertDetectionBoxToMask, convertDetectionBoxToPolygon, convertDetectionMaskToBox, convertDetectionMaskToPolygon, convertDetectionPolygonToBox, convertDetectionPolygonToMask, copySortedDetectionFrames, createAnnotationEditingEngine, createArrayDetectionFrameSource, createBufferedDetectionTimeline, createByteTrackTracker, createCBIoUTracker, createColdDetectionFrameSource, createCompositeDetectionFrameSource, createDefaultAnnotationPresentation, createDetectionPickKey, createEditableAnnotationFrameSession, createIdMaskFrame, createIdleDetectionBufferState, createMemoryColdDetectionFrameStore, createOCSortTracker, createProjectedDetectionFrameSource, createSortTracker, createSourceAwarePresentation, createViewportController, createWritableDetectionFrameSource, decodeCompressedRleCounts, decodeCompressedRleMask, decodeDetectionMaskPayload, deleteAnnotationVertex, detectMaskBorders, detectionFrameOverlapsRange, detectionPostProcessors, distanceToSegment, encodeBinaryMask, encodeBinaryMaskWithBounds, encodeCompressedRleCounts, encodeDetectionMaskPayload, extractDetectionMaskRectRuns, extractMaskContour, extractMaskRectRuns, filterDetectionFramesForRange, findClosestAnnotationSegment, followDetectionPickAcrossFrames, getAnnotationHandles, getBufferedDetectionTimelineFrameSnapshot, getDetectionRect, getPointsRect, haveSameDetectionPickIdentities, includeDefined, isDeflatedBase64DetectionMaskPayload, lightenColor, mediaToScreen, mergeDetectionMasks, mergeDetectionPolygonsByClass, normalizeDetectionClassName, offsetDetection, pickAnnotationHandle, pickDetectionAtPoint, pickDetectionByMaskId, pointInPolygon, polygonArea, polygonToRect, projectDetectionFrame, projectDetectionFrameForTracking, projectDetectionFrames, rasterizePolygonToMask, rasterizeRectToMask, rebaseDetectionPickToFrame, rectArea, rectToPolygon, resolveAnnotationRendererPresentation, resolveAnnotationRendererStyleFields, resolveAnnotationStyleState, resolveContrastTextColor, resolveDetectionClassColorStyle, resolveEllipseSegmentCount, resolveIdMaskPaletteId, resolveIdMaskStrokeTexels, resolveMarkerGeometry, resolveMaskStyleOpacity, resolveStyleValue, sampleEllipseArc, screenToMedia, selectDetectionFrame, topLeftRectToCenterRect, validateDetectionFrames, writeIdMaskPaletteEntry };
|
|
7929
8043
|
//# sourceMappingURL=index.js.map
|