refactor: remove dead code (#3337)

This commit is contained in:
Hampus authored and GitHub committed 2026-10-09 01:41:26 +02:00
1 parent a19002652b
commit 93d1f8af46
1527 files changed
+21170 -73846

No files matched your search

@@ -1,66 +0,0 @@
[
{
"name": "valid zero-copy native capture start",
"command": {
"type": "nativeCapture.start",
"operationId": 1,
"options": {
"captureId": "capture-1",
"source": {
"id": "display-1",
"kind": "screen",
"title": "Display 1",
"width": 1920,
"height": 1080,
"displayId": "display-1"
},
"width": 1920,
"height": 1080,
"frameRate": 60,
"includeCursor": true,
"includeAudio": false,
"zeroCopyRequired": true
}
},
"expectedOk": true
},
{
"name": "reject native capture start without zero-copy requirement",
"command": {
"type": "nativeCapture.start",
"operationId": 2,
"options": {
"captureId": "capture-2",
"source": {
"id": "window-1",
"kind": "window",
"title": "Window 1",
"windowId": "window-1"
},
"width": 1280,
"height": 720,
"frameRate": 60,
"includeCursor": true,
"includeAudio": false,
"zeroCopyRequired": false
}
},
"expectedOk": false,
"expectedError": "zeroCopyRequired"
},
{
"name": "reject native frame sink without zero-copy requirement",
"command": {
"type": "nativeFrameSink.attach",
"operationId": 3,
"options": {
"sinkId": "sink-1",
"captureId": "capture-1",
"trackSid": "TR_screen",
"zeroCopyRequired": false
}
},
"expectedOk": false,
"expectedError": "zeroCopyRequired"
}
]
@@ -49,11 +49,6 @@ export class FuzzPrng {
return this.seedValue;
}
get bytesRemaining(): number {
assert.ok(this.cursor <= this.capacity, 'cursor must not exceed capacity');
return this.capacity - this.cursor;
}
get bytesConsumed(): number {
assert.ok(this.cursor >= 0, 'cursor must be non-negative');
return this.cursor;
@@ -35,8 +35,8 @@ export type VoiceEngineV2RemoteTrackQuality = 'low' | 'medium' | 'high';
export type VoiceEngineV2VideoCodec = '' | 'vp8' | 'vp9' | 'h264' | 'h265' | 'av1';
export type VoiceEngineV2ScreenPacing = 'sender' | 'source';
export type VoiceEngineV2CameraBackgroundMode = 'none' | 'non' | 'blur' | 'custom';
export type VoiceEngineV2CameraBackgroundCustomMediaKind = 'static' | 'animated' | 'video';
type VoiceEngineV2CameraBackgroundMode = 'none' | 'non' | 'blur' | 'custom';
type VoiceEngineV2CameraBackgroundCustomMediaKind = 'static' | 'animated' | 'video';
export type VoiceEngineV2ResourceKey =
| 'implementation'
@@ -38,9 +38,7 @@ import {
} from '@fluxer/voice_engine_v2/src/runtime/frameCoalescing';
import {
createVoiceEngineV2SystemClockPort,
createVoiceEngineV2SystemRandomPort,
type VoiceEngineV2ClockPort,
type VoiceEngineV2RandomPort,
} from '@fluxer/voice_engine_v2/src/runtime/platformPort';
export type {
@@ -79,7 +77,6 @@ export type VoiceEngineV2RuntimeClock = VoiceEngineV2ClockPort;
export interface VoiceEngineV2RuntimeOptions {
capabilities?: VoiceEngineV2Capabilities;
clock?: VoiceEngineV2ClockPort;
random?: VoiceEngineV2RandomPort;
eventLogCap?: number;
eventLogSpillSink: VoiceEngineV2EventLogSpillSink;
queuedCommandsCap?: number;
@@ -102,7 +99,6 @@ export class VoiceEngineV2Runtime {
private readonly diagnosticListeners = new Set<VoiceEngineV2RuntimeDiagnosticListener>();
private readonly unsubscribeImplementationEvents: () => void;
private readonly clock: VoiceEngineV2ClockPort;
private readonly random: VoiceEngineV2RandomPort;
private readonly eventLogRing: VoiceEngineV2EventLogRing;
private readonly eventLogSpillSink: VoiceEngineV2EventLogSpillSink;
private readonly queuedCommandsById = new Map<number, VoiceEngineV2Command>();
@@ -125,7 +121,6 @@ export class VoiceEngineV2Runtime {
options: VoiceEngineV2RuntimeOptions,
) {
this.clock = options.clock ?? createVoiceEngineV2SystemClockPort();
this.random = options.random ?? createVoiceEngineV2SystemRandomPort();
const cap = options.eventLogCap ?? VOICE_ENGINE_V2_EVENT_LOG_CAP;
assert.ok(Number.isInteger(cap), 'eventLogCap must be an integer');
assert.ok(cap >= 1, 'eventLogCap must be >= 1');
@@ -186,22 +181,6 @@ export class VoiceEngineV2Runtime {
return this.queuedCommandsById.size;
}
get platformRandom(): VoiceEngineV2RandomPort {
return this.random;
}
get platformClock(): VoiceEngineV2ClockPort {
return this.clock;
}
get queuedCommandsCapacity(): number {
return this.queuedCommandsCap;
}
get resourceQueuesCapacity(): number {
return this.resourceQueuesCap;
}
get queueFullDropTotal(): number {
return this.queueFullDropCount;
}
@@ -163,14 +163,6 @@ export class VoiceEngineV2SimulatorDriver implements VoiceEngineV2Driver {
this.inventory = options.inventory;
}
get capturesActive(): ReadonlyArray<string> {
return [...this.activeCaptures];
}
get frameSinksActive(): ReadonlyArray<string> {
return [...this.activeFrameSinks];
}
subscribe(listener: VoiceEngineV2ExternalEventListener): () => void {
assert.ok(typeof listener === 'function', 'subscribe expects a listener function');
this.listeners.add(listener);
@@ -15,7 +15,7 @@ export interface VoiceEngineV2AcceptanceVerdict {
readonly reasons: ReadonlyArray<string>;
}
export type VoiceEngineV2AcceptanceCriteria = (result: VoiceEngineV2SimulatorResult) => VoiceEngineV2AcceptanceVerdict;
type VoiceEngineV2AcceptanceCriteria = (result: VoiceEngineV2SimulatorResult) => VoiceEngineV2AcceptanceVerdict;
export interface VoiceEngineV2SimulationScenario {
readonly name: string;
@@ -4,7 +4,6 @@ import type {
VoiceEngineV2Driver,
VoiceEngineV2ExternalEventListener,
} from '@fluxer/voice_engine_v2/src/implementations/VoiceEngineV2ImplementationBase';
import type {VoiceEngineV2Event} from '@fluxer/voice_engine_v2/src/protocol/events';
import type {
VoiceEngineV2CameraEncodingOptions,
VoiceEngineV2CameraOptions,
@@ -200,12 +199,6 @@ export class FakeVoiceEngineV2Driver implements VoiceEngineV2Driver {
};
}
emitExternalEvent(event: VoiceEngineV2Event): void {
for (const listener of this.listeners) {
listener(event);
}
}
private record(call: FakeVoiceEngineV2DriverCall): void {
this.calls.push(call);
const failure = this.failures[call.type];