@meframe/core 0.7.2 → 0.8.1-preview-frame-gap.0
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/CHANGELOG.md +16 -0
- package/dist/cache/index.d.ts +0 -3
- package/dist/cache/index.d.ts.map +1 -1
- package/dist/cache/resource/AudioSampleCache.d.ts +3 -3
- package/dist/cache/resource/AudioSampleCache.d.ts.map +1 -1
- package/dist/cache/resource/AudioSampleCache.js +4 -3
- package/dist/cache/resource/AudioSampleCache.js.map +1 -1
- package/dist/cache/resource/MP4IndexCache.d.ts.map +1 -1
- package/dist/cache/resource/MP4IndexCache.js +23 -13
- package/dist/cache/resource/MP4IndexCache.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/orchestrator/AudioWindowPreparer.d.ts +4 -0
- package/dist/orchestrator/AudioWindowPreparer.d.ts.map +1 -1
- package/dist/orchestrator/AudioWindowPreparer.js +253 -13
- package/dist/orchestrator/AudioWindowPreparer.js.map +1 -1
- package/dist/orchestrator/Orchestrator.d.ts.map +1 -1
- package/dist/orchestrator/Orchestrator.js +20 -9
- package/dist/orchestrator/Orchestrator.js.map +1 -1
- package/dist/orchestrator/VideoWindowDecodeSession.d.ts.map +1 -1
- package/dist/orchestrator/VideoWindowDecodeSession.js +59 -47
- package/dist/orchestrator/VideoWindowDecodeSession.js.map +1 -1
- package/dist/orchestrator/aac-window-timeline.d.ts +7 -1
- package/dist/orchestrator/aac-window-timeline.d.ts.map +1 -1
- package/dist/orchestrator/aac-window-timeline.js +22 -22
- package/dist/orchestrator/aac-window-timeline.js.map +1 -1
- package/dist/stages/decode/preview-audio-decoder.d.ts +57 -0
- package/dist/stages/decode/preview-audio-decoder.d.ts.map +1 -0
- package/dist/stages/decode/preview-audio-decoder.js +281 -0
- package/dist/stages/decode/preview-audio-decoder.js.map +1 -0
- package/dist/stages/demux/MP3FrameParser.d.ts +2 -2
- package/dist/stages/demux/MP3FrameParser.d.ts.map +1 -1
- package/dist/stages/demux/MP3FrameParser.js +12 -11
- package/dist/stages/demux/MP3FrameParser.js.map +1 -1
- package/dist/stages/demux/MP4IndexParser.d.ts +2 -2
- package/dist/stages/demux/MP4IndexParser.d.ts.map +1 -1
- package/dist/stages/demux/MP4IndexParser.js +42 -34
- package/dist/stages/demux/MP4IndexParser.js.map +1 -1
- package/dist/stages/demux/MP4IndexWorkerClient.d.ts +15 -0
- package/dist/stages/demux/MP4IndexWorkerClient.d.ts.map +1 -0
- package/dist/stages/demux/MP4IndexWorkerClient.js +257 -0
- package/dist/stages/demux/MP4IndexWorkerClient.js.map +1 -0
- package/dist/stages/demux/SampleTable.d.ts +85 -0
- package/dist/stages/demux/SampleTable.d.ts.map +1 -0
- package/dist/stages/demux/SampleTable.js +273 -0
- package/dist/stages/demux/SampleTable.js.map +1 -0
- package/dist/stages/demux/mp4-index-protocol.d.ts +141 -0
- package/dist/stages/demux/mp4-index-protocol.d.ts.map +1 -0
- package/dist/stages/demux/mp4-index-protocol.js +108 -0
- package/dist/stages/demux/mp4-index-protocol.js.map +1 -0
- package/dist/stages/demux/types.d.ts +3 -2
- package/dist/stages/demux/types.d.ts.map +1 -1
- package/dist/stages/load/ResourceLoader.d.ts +1 -0
- package/dist/stages/load/ResourceLoader.d.ts.map +1 -1
- package/dist/stages/load/ResourceLoader.js +6 -5
- package/dist/stages/load/ResourceLoader.js.map +1 -1
- package/dist/stages/load/types.d.ts +2 -0
- package/dist/stages/load/types.d.ts.map +1 -1
- package/dist/worker/WorkerPool.d.ts +4 -0
- package/dist/worker/WorkerPool.d.ts.map +1 -1
- package/dist/worker/WorkerPool.js +10 -2
- package/dist/worker/WorkerPool.js.map +1 -1
- package/dist/worker/types.d.ts +1 -1
- package/dist/worker/types.d.ts.map +1 -1
- package/dist/worker/types.js.map +1 -1
- package/dist/worker/worker-event-whitelist.d.ts.map +1 -1
- package/dist/workers/stages/demux/mp4-index.worker.CFcc5GBh.js +8460 -0
- package/dist/workers/stages/demux/mp4-index.worker.CFcc5GBh.js.map +1 -0
- package/dist/workers/stages/export/export.worker.BG8HA7dY.js.map +1 -1
- package/dist/workers/worker-manifest.json +1 -0
- package/package.json +1 -1
- package/dist/cache/l2/IndexedDBStore.d.ts +0 -73
- package/dist/cache/l2/IndexedDBStore.d.ts.map +0 -1
- package/dist/cache/l2/L2Cache.d.ts +0 -79
- package/dist/cache/l2/L2Cache.d.ts.map +0 -1
- package/dist/cache/l2/L2OPFSStore.d.ts +0 -37
- package/dist/cache/l2/L2OPFSStore.d.ts.map +0 -1
- package/dist/cache/l2/OPFSStore.d.ts +0 -45
- package/dist/cache/l2/OPFSStore.d.ts.map +0 -1
- package/dist/cache/storage/indexeddb/ChunkRecordStore.d.ts +0 -75
- package/dist/cache/storage/indexeddb/ChunkRecordStore.d.ts.map +0 -1
package/package.json
CHANGED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { ChunkBatch } from './OPFSStore';
|
|
2
|
-
|
|
3
|
-
export interface ChunkRecord {
|
|
4
|
-
projectId: string;
|
|
5
|
-
clipId: string;
|
|
6
|
-
track: 'video' | 'audio';
|
|
7
|
-
fileName: string;
|
|
8
|
-
batches: ChunkBatch[];
|
|
9
|
-
lastAccess: number;
|
|
10
|
-
totalBytes: number;
|
|
11
|
-
isComplete: boolean;
|
|
12
|
-
expectedDurationUs?: number;
|
|
13
|
-
metadata?: {
|
|
14
|
-
codec?: string;
|
|
15
|
-
description?: Uint8Array;
|
|
16
|
-
codedWidth?: number;
|
|
17
|
-
codedHeight?: number;
|
|
18
|
-
displayAspectWidth?: number;
|
|
19
|
-
displayAspectHeight?: number;
|
|
20
|
-
colorSpace?: VideoColorSpaceInit;
|
|
21
|
-
hardwareAcceleration?: HardwareAcceleration;
|
|
22
|
-
optimizeForLatency?: boolean;
|
|
23
|
-
sampleRate?: number;
|
|
24
|
-
numberOfChannels?: number;
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* @deprecated Legacy IndexedDB store for L2 chunks; Window Cache does not persist chunk metadata here.
|
|
29
|
-
*/
|
|
30
|
-
export declare class IndexedDBStore {
|
|
31
|
-
private db;
|
|
32
|
-
private initPromise;
|
|
33
|
-
init(): Promise<void>;
|
|
34
|
-
private initStorage;
|
|
35
|
-
/**
|
|
36
|
-
* Get a chunk record
|
|
37
|
-
*/
|
|
38
|
-
getRecord(projectId: string, clipId: string, track: string): Promise<ChunkRecord | null>;
|
|
39
|
-
/**
|
|
40
|
-
* Put/update a chunk record
|
|
41
|
-
*/
|
|
42
|
-
putRecord(record: ChunkRecord): Promise<void>;
|
|
43
|
-
/**
|
|
44
|
-
* Delete a chunk record
|
|
45
|
-
*/
|
|
46
|
-
deleteRecord(projectId: string, clipId: string, track: string): Promise<void>;
|
|
47
|
-
/**
|
|
48
|
-
* Update last access time for a record
|
|
49
|
-
*/
|
|
50
|
-
updateLastAccess(projectId: string, clipId: string, track: string): Promise<void>;
|
|
51
|
-
/**
|
|
52
|
-
* Collect all records for a specific clip
|
|
53
|
-
*/
|
|
54
|
-
collectRecordsByClipId(projectId: string, clipId: string): Promise<ChunkRecord[]>;
|
|
55
|
-
/**
|
|
56
|
-
* Get all records for a specific project
|
|
57
|
-
*/
|
|
58
|
-
getRecordsByProjectId(projectId: string): Promise<ChunkRecord[]>;
|
|
59
|
-
/**
|
|
60
|
-
* Get all records sorted by lastAccess (for quota enforcement)
|
|
61
|
-
*/
|
|
62
|
-
getAllRecordsSortedByAccess(): Promise<ChunkRecord[]>;
|
|
63
|
-
/**
|
|
64
|
-
* Get all records (for project statistics)
|
|
65
|
-
*/
|
|
66
|
-
getAllRecords(): Promise<ChunkRecord[]>;
|
|
67
|
-
/**
|
|
68
|
-
* Clear all data from chunks and meta stores
|
|
69
|
-
*/
|
|
70
|
-
clear(): Promise<void>;
|
|
71
|
-
private promisifyRequest;
|
|
72
|
-
}
|
|
73
|
-
//# sour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AM,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;IAU9F;;OAEG;IACG,SAAS,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAcnD;;OAEG;IACG,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQnF;;OAEG;IACG,gBAAgB,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAavF;;OAEG;IACG,sBAAsB,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;IA4BvF;;OAEG;IACG,qBAAqB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;IAatE;;OAEG;IACG,2BAA2B,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC;IAyB3D;;OAEG;IACG,aAAa,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC;IAwB7C;;OAEG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAQ5B,OAAO,CAAC,gBAAgB;CAMzB"}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { TimeUs } from '../../model/types';
|
|
2
|
-
import { MeframeOpfsGateway } from '../storage/opfs/gateway';
|
|
3
|
-
|
|
4
|
-
interface L2Config {
|
|
5
|
-
maxSizeMB: number;
|
|
6
|
-
projectId: string;
|
|
7
|
-
opfsGateway?: MeframeOpfsGateway;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* @deprecated Legacy L2 cache coordinator superseded by Window Cache (`VideoL1Cache` + `ResourceCache`).
|
|
11
|
-
*/
|
|
12
|
-
export declare class L2Cache {
|
|
13
|
-
private readonly opfsStore;
|
|
14
|
-
private readonly dbStore;
|
|
15
|
-
readonly maxSize: number;
|
|
16
|
-
readonly projectId: string;
|
|
17
|
-
private initPromise;
|
|
18
|
-
constructor(config: L2Config);
|
|
19
|
-
init(): Promise<void>;
|
|
20
|
-
get(timeUs: TimeUs, clipId: string): Promise<EncodedVideoChunk | EncodedAudioChunk | null>;
|
|
21
|
-
put(clipId: string, chunks: Array<EncodedVideoChunk | EncodedAudioChunk>, track: 'video' | 'audio', options?: {
|
|
22
|
-
isComplete?: boolean;
|
|
23
|
-
expectedDurationUs?: number;
|
|
24
|
-
metadata?: any;
|
|
25
|
-
}): Promise<void>;
|
|
26
|
-
invalidateRange(startUs: TimeUs, endUs: TimeUs, clipId?: string): Promise<void>;
|
|
27
|
-
/**
|
|
28
|
-
* Check if clip has cached data in L2
|
|
29
|
-
*/
|
|
30
|
-
hasClip(clipId: string, track: 'video' | 'audio'): Promise<boolean>;
|
|
31
|
-
/**
|
|
32
|
-
* Check if clip has complete cached data in L2
|
|
33
|
-
*/
|
|
34
|
-
hasCompleteClip(clipId: string, track: 'video' | 'audio'): Promise<boolean>;
|
|
35
|
-
/**
|
|
36
|
-
* Mark clip as complete in L2 cache
|
|
37
|
-
*/
|
|
38
|
-
markComplete(clipId: string, track: 'video' | 'audio'): Promise<void>;
|
|
39
|
-
invalidateClip(clipId: string): Promise<void>;
|
|
40
|
-
/**
|
|
41
|
-
* Create a readable stream of encoded chunks for export
|
|
42
|
-
* Reads chunks in timestamp order from OPFS
|
|
43
|
-
*/
|
|
44
|
-
createReadStream(clipId: string, track: 'video' | 'audio'): Promise<ReadableStream<EncodedVideoChunk | EncodedAudioChunk> | null>;
|
|
45
|
-
clear(): Promise<void>;
|
|
46
|
-
private createChunk;
|
|
47
|
-
private deleteEntry;
|
|
48
|
-
private enforceQuota;
|
|
49
|
-
getMetadata(): {
|
|
50
|
-
maxSizeMB: number;
|
|
51
|
-
usedSizeMB: number;
|
|
52
|
-
entries: number;
|
|
53
|
-
hitRate: number;
|
|
54
|
-
};
|
|
55
|
-
hasAvailableQuota(sizeMB: number): Promise<boolean>;
|
|
56
|
-
/**
|
|
57
|
-
* Get chunk metadata (decoderConfig) for a specific clip
|
|
58
|
-
*/
|
|
59
|
-
getClipMetadata(clipId: string, track: 'video' | 'audio'): Promise<any | null>;
|
|
60
|
-
/**
|
|
61
|
-
* List all cached projects
|
|
62
|
-
*/
|
|
63
|
-
listProjects(): Promise<Array<{
|
|
64
|
-
projectId: string;
|
|
65
|
-
totalBytes: number;
|
|
66
|
-
clipCount: number;
|
|
67
|
-
lastAccess: number;
|
|
68
|
-
}>>;
|
|
69
|
-
/**
|
|
70
|
-
* Clear all cache data for a specific project
|
|
71
|
-
*/
|
|
72
|
-
clearProject(targetProjectId: string): Promise<void>;
|
|
73
|
-
/**
|
|
74
|
-
* Get cache size for a specific project
|
|
75
|
-
*/
|
|
76
|
-
getProjectSize(projectId: string): Promise<number>;
|
|
77
|
-
}
|
|
78
|
-
export {};
|
|
79
|
-
//# sourceMappingURL=L2Cache.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"L2Cache.d.ts","sourceRoot":"","sources":["../../../src/cache/l2/L2Cache.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAIhD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAElE,UAAU,QAAQ;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,kBAAkB,CAAC;CAClC;AAED;;GAEG;AACH,qBAAa,OAAO;IAClB,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAc;IACxC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAmB;IAC3C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,OAAO,CAAC,WAAW,CAA8B;gBAErC,MAAM,EAAE,QAAQ;IAO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W;YAwBL,WAAW;YAeX,YAAY;IAuC1B,WAAW,IAAI;QACb,SAAS,EAAE,MAAM,CAAC;QAClB,UAAU,EAAE,MAAM,CAAC;QACnB,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;KACjB;IAWK,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAWzD;;OAEG;IACG,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC,GAAG,GAAG,IAAI,CAAC;IAOpF;;OAEG;IACG,YAAY,IAAI,OAAO,CAC3B,KAAK,CAAC;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC,CACxF;IA8BD;;OAEG;IACG,YAAY,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAe1D;;OAEG;IACG,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAMzD"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { MeframeOpfsGateway } from '../storage/opfs/gateway';
|
|
2
|
-
import { ChunkBatch } from '../storage/opfs/types';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* @deprecated Legacy L2 OPFS wrapper; Window Cache reads directly from ResourceCache + MeframeOpfsGateway.
|
|
6
|
-
*/
|
|
7
|
-
export declare class L2OPFSStore {
|
|
8
|
-
private opfsManager;
|
|
9
|
-
constructor(opfsGateway?: MeframeOpfsGateway);
|
|
10
|
-
init(): Promise<void>;
|
|
11
|
-
/**
|
|
12
|
-
* Read chunk data from OPFS file
|
|
13
|
-
*/
|
|
14
|
-
read(fileName: string, batch: ChunkBatch, projectId: string): Promise<ArrayBuffer | null>;
|
|
15
|
-
/**
|
|
16
|
-
* Append chunks to OPFS file (or create new file)
|
|
17
|
-
*/
|
|
18
|
-
append(fileName: string, chunks: Array<EncodedVideoChunk | EncodedAudioChunk>, existingBatches: ChunkBatch[] | undefined, projectId: string): Promise<ChunkBatch[]>;
|
|
19
|
-
/**
|
|
20
|
-
* Delete a file from OPFS
|
|
21
|
-
*/
|
|
22
|
-
deleteFile(fileName: string, projectId: string): Promise<void>;
|
|
23
|
-
/**
|
|
24
|
-
* Delete entire project directory
|
|
25
|
-
*/
|
|
26
|
-
deleteProjectDirectory(projectId: string): Promise<void>;
|
|
27
|
-
/**
|
|
28
|
-
* Check if a file exists in OPFS
|
|
29
|
-
*/
|
|
30
|
-
fileExists(fileName: string, projectId: string): Promise<boolean>;
|
|
31
|
-
/**
|
|
32
|
-
* Clear all OPFS data for current project
|
|
33
|
-
*/
|
|
34
|
-
clear(projectId: string): Promise<void>;
|
|
35
|
-
private chunkToArrayBuffer;
|
|
36
|
-
}
|
|
37
|
-
//# sourceMappingURL=L2OPFSStore.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"L2OPFSStore.d.ts","sourceRoot":"","sources":["../../../src/cache/l2/L2OPFSStore.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAExD;;GAEG;AACH,qBAAa,WAAW;IACtB,OAAO,CAAC,WAAW,CAAc;gBAErB,WAAW,CAAC,EAAE,kBAAkB;IAItC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAI3B;;OAEG;IACG,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;IAe/F;;OAEG;IACG,MAAM,CACV,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,KAAK,CAAC,iBAAiB,GAAG,iBAAiB,CAAC,EACpD,eAAe,EAAE,UAAU,EAAE,GAAG,SAAS,EACzC,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,UAAU,EAAE,CAAC;IAkCxB;;OAEG;IACG,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIpE;;OAEG;IACG,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI9D;;OAEG;IACG,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAIvE;;OAEG;IACG,KAAK,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;YAI/B,kBAAkB;CAOjC"}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { TimeUs } from '../../model/types';
|
|
2
|
-
|
|
3
|
-
export interface ChunkBatch {
|
|
4
|
-
startUs: TimeUs;
|
|
5
|
-
durationUs: TimeUs;
|
|
6
|
-
byteOffset: number;
|
|
7
|
-
byteLength: number;
|
|
8
|
-
type: 'key' | 'delta';
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* @deprecated Legacy OPFS store superseded by host `MeframeOpfsGateway` and `OPFSManager`.
|
|
12
|
-
*/
|
|
13
|
-
export declare class OPFSStore {
|
|
14
|
-
private opfsRoot;
|
|
15
|
-
private initPromise;
|
|
16
|
-
init(): Promise<void>;
|
|
17
|
-
private initStorage;
|
|
18
|
-
/**
|
|
19
|
-
* Read chunk data from OPFS file
|
|
20
|
-
*/
|
|
21
|
-
read(fileName: string, batch: ChunkBatch, projectId: string): Promise<ArrayBuffer | null>;
|
|
22
|
-
/**
|
|
23
|
-
* Append chunks to OPFS file (or create new file)
|
|
24
|
-
* Supports incremental writing for streaming scenarios
|
|
25
|
-
*/
|
|
26
|
-
append(fileName: string, chunks: Array<EncodedVideoChunk | EncodedAudioChunk>, existingBatches: ChunkBatch[] | undefined, projectId: string): Promise<ChunkBatch[]>;
|
|
27
|
-
/**
|
|
28
|
-
* Delete a file from OPFS
|
|
29
|
-
*/
|
|
30
|
-
deleteFile(fileName: string, projectId: string): Promise<void>;
|
|
31
|
-
/**
|
|
32
|
-
* Delete entire project directory
|
|
33
|
-
*/
|
|
34
|
-
deleteProjectDirectory(projectId: string): Promise<void>;
|
|
35
|
-
/**
|
|
36
|
-
* Check if a file exists in OPFS
|
|
37
|
-
*/
|
|
38
|
-
fileExists(fileName: string, projectId: string): Promise<boolean>;
|
|
39
|
-
/**
|
|
40
|
-
* Clear all OPFS data for current project
|
|
41
|
-
*/
|
|
42
|
-
clear(projectId: string): Promise<void>;
|
|
43
|
-
private chunkToArrayBuffer;
|
|
44
|
-
}
|
|
45
|
-
//# sourceMappingURL=OPFSStore.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OPFSStore.d.ts","sourceRoot":"","sources":["../../../src/cache/l2/OPFSStore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEhD,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,KAAK,GAAG,OAAO,CAAC;CACvB;AAED;;GAEG;AACH,qBAAa,SAAS;IACpB,OAAO,CAAC,QAAQ,CAA0C;IAC1D,OAAO,CAAC,WAAW,CAA8B;IAE3C,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;YAOb,WAAW;IAIzB;;OAEG;IACG,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;IAmB/F;;;OAGG;IACG,MAAM,CACV,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,KAAK,CAAC,iBAAiB,GAAG,iBAAiB,CAAC,EACpD,eAAe,EAAE,UAAU,EAAE,GAAG,SAAS,EACzC,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,UAAU,EAAE,CAAC;IAwCxB;;OAEG;IACG,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAepE;;OAEG;IACG,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAe9D;;OAEG;IACG,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAiBvE;;OAEG;IACG,KAAK,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;YAI/B,kBAAkB;CAOjC"}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { ChunkBatch } from '../opfs/types';
|
|
2
|
-
|
|
3
|
-
export type { ChunkBatch };
|
|
4
|
-
export interface ChunkRecord {
|
|
5
|
-
projectId: string;
|
|
6
|
-
clipId: string;
|
|
7
|
-
track: 'video' | 'audio';
|
|
8
|
-
fileName: string;
|
|
9
|
-
batches: ChunkBatch[];
|
|
10
|
-
lastAccess: number;
|
|
11
|
-
totalBytes: number;
|
|
12
|
-
isComplete: boolean;
|
|
13
|
-
expectedDurationUs?: number;
|
|
14
|
-
metadata?: {
|
|
15
|
-
codec?: string;
|
|
16
|
-
description?: Uint8Array;
|
|
17
|
-
codedWidth?: number;
|
|
18
|
-
codedHeight?: number;
|
|
19
|
-
displayAspectWidth?: number;
|
|
20
|
-
displayAspectHeight?: number;
|
|
21
|
-
colorSpace?: VideoColorSpaceInit;
|
|
22
|
-
hardwareAcceleration?: HardwareAcceleration;
|
|
23
|
-
optimizeForLatency?: boolean;
|
|
24
|
-
sampleRate?: number;
|
|
25
|
-
numberOfChannels?: number;
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* IndexedDB storage for L2 cache metadata
|
|
30
|
-
* Handles all database operations for chunk records
|
|
31
|
-
*/
|
|
32
|
-
export declare class ChunkRecordStore {
|
|
33
|
-
private db;
|
|
34
|
-
private initPromise;
|
|
35
|
-
init(): Promise<void>;
|
|
36
|
-
private initStorage;
|
|
37
|
-
/**
|
|
38
|
-
* Get a chunk record
|
|
39
|
-
*/
|
|
40
|
-
getRecord(projectId: string, clipId: string, track: string): Promise<ChunkRecord | null>;
|
|
41
|
-
/**
|
|
42
|
-
* Put/update a chunk record
|
|
43
|
-
*/
|
|
44
|
-
putRecord(record: ChunkRecord): Promise<void>;
|
|
45
|
-
/**
|
|
46
|
-
* Delete a chunk record
|
|
47
|
-
*/
|
|
48
|
-
deleteRecord(projectId: string, clipId: string, track: string): Promise<void>;
|
|
49
|
-
/**
|
|
50
|
-
* Update last access time for a record
|
|
51
|
-
*/
|
|
52
|
-
updateLastAccess(projectId: string, clipId: string, track: string): Promise<void>;
|
|
53
|
-
/**
|
|
54
|
-
* Collect all records for a specific clip
|
|
55
|
-
*/
|
|
56
|
-
collectRecordsByClipId(projectId: string, clipId: string): Promise<ChunkRecord[]>;
|
|
57
|
-
/**
|
|
58
|
-
* Get all records for a specific project
|
|
59
|
-
*/
|
|
60
|
-
getRecordsByProjectId(projectId: string): Promise<ChunkRecord[]>;
|
|
61
|
-
/**
|
|
62
|
-
* Get all records sorted by lastAccess (for quota enforcement)
|
|
63
|
-
*/
|
|
64
|
-
getAllRecordsSortedByAccess(): Promise<ChunkRecord[]>;
|
|
65
|
-
/**
|
|
66
|
-
* Get all records (for project statistics)
|
|
67
|
-
*/
|
|
68
|
-
getAllRecords(): Promise<ChunkRecord[]>;
|
|
69
|
-
/**
|
|
70
|
-
* Clear all data from chunks and meta stores
|
|
71
|
-
*/
|
|
72
|
-
clear(): Promise<void>;
|
|
73
|
-
private promisifyRequest;
|
|
74
|
-
}
|
|
75
|
-
//# sourceMappingURL=ChunkRecordStore.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ChunkRecordStore.d.ts","sourceRoot":"","sources":["../../../../src/cache/storage/indexeddb/ChunkRecordStore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,YAAY,EAAE,UAAU,EAAE,CAAC;AAE3B,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,UAAU,EAAE,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,EAAE;QACT,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE,UAAU,CAAC;QACzB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,kBAAkB,CAAC,EAAE,MAAM,CAAC;QAC5B,mBAAmB,CAAC,EAAE,MAAM,CAAC;QAC7B,UAAU,CAAC,EAAE,mBAAmB,CAAC;QACjC,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;QAC5C,kBAAkB,CAAC,EAAE,OAAO,CAAC;QAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;KAC3B,CAAC;CACH;AAED;;;GAGG;AACH,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,EAAE,CAA4B;IACtC,OAAO,CAAC,WAAW,CAA8B;IAE3C,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;YAOb,WAAW;IAqC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