@remotion/media-parser 4.0.332 → 4.0.334
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/containers/iso-base-media/base-media-box.d.ts +2 -1
- package/dist/containers/iso-base-media/get-video-codec-from-iso-track.d.ts +1 -1
- package/dist/containers/iso-base-media/get-video-codec-from-iso-track.js +3 -0
- package/dist/containers/iso-base-media/mdat/calculate-jump-marks.js +19 -26
- package/dist/containers/iso-base-media/mdat/mdat.js +39 -47
- package/dist/containers/iso-base-media/process-box.js +21 -14
- package/dist/containers/iso-base-media/stsd/samples.js +2 -0
- package/dist/containers/iso-base-media/stsd/vpcc.d.ts +19 -0
- package/dist/containers/iso-base-media/stsd/vpcc.js +42 -0
- package/dist/containers/mp3/parse-packet-header.js +1 -4
- package/dist/containers/wav/parse-wav.js +1 -1
- package/dist/esm/index.mjs +221 -212
- package/dist/esm/worker-server-entry.mjs +220 -211
- package/dist/esm/worker-web-entry.mjs +220 -211
- package/dist/get-sample-aspect-ratio.d.ts +2 -0
- package/dist/get-sample-aspect-ratio.js +13 -1
- package/dist/get-video-codec.js +6 -2
- package/dist/index.d.ts +11 -4
- package/dist/parse-loop.js +1 -0
- package/dist/perform-seek.d.ts +3 -1
- package/dist/perform-seek.js +4 -1
- package/dist/state/iso-base-media/cached-sample-positions.d.ts +17 -25
- package/dist/state/iso-base-media/cached-sample-positions.js +83 -24
- package/dist/state/iso-base-media/iso-state.d.ts +11 -4
- package/dist/state/parser-state.d.ts +11 -4
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/work-on-seek-request.js +2 -0
- package/package.json +3 -3
|
@@ -4,6 +4,7 @@ import type { ColorParameterBox } from './containers/iso-base-media/stsd/colr';
|
|
|
4
4
|
import type { HvccBox } from './containers/iso-base-media/stsd/hvcc';
|
|
5
5
|
import type { PaspBox } from './containers/iso-base-media/stsd/pasp';
|
|
6
6
|
import type { VideoSample } from './containers/iso-base-media/stsd/samples';
|
|
7
|
+
import type { VpccBox } from './containers/iso-base-media/stsd/vpcc';
|
|
7
8
|
import type { TkhdBox } from './containers/iso-base-media/tkhd';
|
|
8
9
|
import type { TrakBox } from './containers/iso-base-media/trak/trak';
|
|
9
10
|
import type { MediaParserDimensions } from './get-dimensions';
|
|
@@ -13,6 +14,7 @@ type AspectRatio = {
|
|
|
13
14
|
};
|
|
14
15
|
export declare const getStsdVideoConfig: (trakBox: TrakBox) => VideoSample | null;
|
|
15
16
|
export declare const getAvccBox: (trakBox: TrakBox) => AvccBox | null;
|
|
17
|
+
export declare const getVpccBox: (trakBox: TrakBox) => VpccBox | null;
|
|
16
18
|
export declare const getAv1CBox: (trakBox: TrakBox) => Av1CBox | null;
|
|
17
19
|
export declare const getPaspBox: (trakBox: TrakBox) => PaspBox | null;
|
|
18
20
|
export declare const getHvccBox: (trakBox: TrakBox) => HvccBox | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getDisplayAspectRatio = exports.applyAspectRatios = exports.applyTkhdBox = exports.getColrBox = exports.getSampleAspectRatio = exports.getHvccBox = exports.getPaspBox = exports.getAv1CBox = exports.getAvccBox = exports.getStsdVideoConfig = void 0;
|
|
3
|
+
exports.getDisplayAspectRatio = exports.applyAspectRatios = exports.applyTkhdBox = exports.getColrBox = exports.getSampleAspectRatio = exports.getHvccBox = exports.getPaspBox = exports.getAv1CBox = exports.getVpccBox = exports.getAvccBox = exports.getStsdVideoConfig = void 0;
|
|
4
4
|
const traversal_1 = require("./containers/iso-base-media/traversal");
|
|
5
5
|
const getStsdVideoConfig = (trakBox) => {
|
|
6
6
|
const stsdBox = (0, traversal_1.getStsdBox)(trakBox);
|
|
@@ -26,6 +26,18 @@ const getAvccBox = (trakBox) => {
|
|
|
26
26
|
return avccBox;
|
|
27
27
|
};
|
|
28
28
|
exports.getAvccBox = getAvccBox;
|
|
29
|
+
const getVpccBox = (trakBox) => {
|
|
30
|
+
const videoConfig = (0, exports.getStsdVideoConfig)(trakBox);
|
|
31
|
+
if (!videoConfig) {
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
const vpccBox = videoConfig.descriptors.find((c) => c.type === 'vpcc-box');
|
|
35
|
+
if (!vpccBox || vpccBox.type !== 'vpcc-box') {
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
38
|
+
return vpccBox;
|
|
39
|
+
};
|
|
40
|
+
exports.getVpccBox = getVpccBox;
|
|
29
41
|
const getAv1CBox = (trakBox) => {
|
|
30
42
|
const videoConfig = (0, exports.getStsdVideoConfig)(trakBox);
|
|
31
43
|
if (!videoConfig) {
|
package/dist/get-video-codec.js
CHANGED
|
@@ -60,21 +60,25 @@ exports.getIsoBmColrConfig = getIsoBmColrConfig;
|
|
|
60
60
|
const getVideoCodecString = (trakBox) => {
|
|
61
61
|
const videoSample = (0, get_sample_aspect_ratio_1.getStsdVideoConfig)(trakBox);
|
|
62
62
|
const avccBox = (0, get_sample_aspect_ratio_1.getAvccBox)(trakBox);
|
|
63
|
-
const hvccBox = (0, get_sample_aspect_ratio_1.getHvccBox)(trakBox);
|
|
64
|
-
const av1cBox = (0, get_sample_aspect_ratio_1.getAv1CBox)(trakBox);
|
|
65
63
|
if (!videoSample) {
|
|
66
64
|
return null;
|
|
67
65
|
}
|
|
68
66
|
if (avccBox) {
|
|
69
67
|
return `${videoSample.format}.${avccBox.configurationString}`;
|
|
70
68
|
}
|
|
69
|
+
const hvccBox = (0, get_sample_aspect_ratio_1.getHvccBox)(trakBox);
|
|
71
70
|
if (hvccBox) {
|
|
72
71
|
return `${videoSample.format}.${hvccBox.configurationString}`;
|
|
73
72
|
}
|
|
73
|
+
const av1cBox = (0, get_sample_aspect_ratio_1.getAv1CBox)(trakBox);
|
|
74
74
|
if (av1cBox) {
|
|
75
75
|
const colrAtom = (0, get_sample_aspect_ratio_1.getColrBox)(videoSample);
|
|
76
76
|
return (0, av1_codec_private_1.parseAv1PrivateData)(av1cBox.privateData, colrAtom);
|
|
77
77
|
}
|
|
78
|
+
const vpccBox = (0, get_sample_aspect_ratio_1.getVpccBox)(trakBox);
|
|
79
|
+
if (vpccBox) {
|
|
80
|
+
return `${videoSample.format}.${vpccBox.codecString}`;
|
|
81
|
+
}
|
|
78
82
|
return videoSample.format;
|
|
79
83
|
};
|
|
80
84
|
exports.getVideoCodecString = getVideoCodecString;
|
package/dist/index.d.ts
CHANGED
|
@@ -901,10 +901,17 @@ export declare const MediaParserInternals: {
|
|
|
901
901
|
};
|
|
902
902
|
iso: {
|
|
903
903
|
flatSamples: {
|
|
904
|
-
getSamples: (mdatStart: number) =>
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
904
|
+
getSamples: (mdatStart: number) => {
|
|
905
|
+
trackId: number;
|
|
906
|
+
samplePositions: SamplePosition[];
|
|
907
|
+
}[] | null;
|
|
908
|
+
setSamples: (mdatStart: number, samples: {
|
|
909
|
+
trackId: number;
|
|
910
|
+
samplePositions: SamplePosition[];
|
|
911
|
+
}[]) => void;
|
|
912
|
+
setCurrentSampleIndex: (mdatStart: number, trackId: number, index: number) => void;
|
|
913
|
+
getCurrentSampleIndices: (mdatStart: number) => Record<number, number>;
|
|
914
|
+
updateAfterSeek: (seekedByte: number) => void;
|
|
908
915
|
};
|
|
909
916
|
moov: {
|
|
910
917
|
setMoovBox: (moov: {
|
package/dist/parse-loop.js
CHANGED
package/dist/perform-seek.d.ts
CHANGED
|
@@ -6,9 +6,10 @@ import type { MediaParserLogLevel } from './log';
|
|
|
6
6
|
import type { ParseMediaMode, ParseMediaSrc } from './options';
|
|
7
7
|
import type { MediaParserReaderInterface } from './readers/reader';
|
|
8
8
|
import type { CurrentReader } from './state/current-reader';
|
|
9
|
+
import type { IsoBaseMediaState } from './state/iso-base-media/iso-state';
|
|
9
10
|
import type { SeekInfiniteLoop } from './state/seek-infinite-loop';
|
|
10
11
|
import type { MediaSectionState } from './state/video-section';
|
|
11
|
-
export declare const performSeek: ({ seekTo, userInitiated, controller, mediaSection, iterator, seekInfiniteLoop, logLevel, mode, contentLength, currentReader, readerInterface, src, discardReadBytes, fields, prefetchCache, }: {
|
|
12
|
+
export declare const performSeek: ({ seekTo, userInitiated, controller, mediaSection, iterator, seekInfiniteLoop, logLevel, mode, contentLength, currentReader, readerInterface, src, discardReadBytes, fields, prefetchCache, isoState, }: {
|
|
12
13
|
seekTo: number;
|
|
13
14
|
userInitiated: boolean;
|
|
14
15
|
controller: MediaParserController;
|
|
@@ -24,4 +25,5 @@ export declare const performSeek: ({ seekTo, userInitiated, controller, mediaSec
|
|
|
24
25
|
src: ParseMediaSrc;
|
|
25
26
|
discardReadBytes: (force: boolean) => Promise<void>;
|
|
26
27
|
prefetchCache: PrefetchCache;
|
|
28
|
+
isoState: IsoBaseMediaState;
|
|
27
29
|
}) => Promise<void>;
|
package/dist/perform-seek.js
CHANGED
|
@@ -5,7 +5,7 @@ const log_1 = require("./log");
|
|
|
5
5
|
const seek_backwards_1 = require("./seek-backwards");
|
|
6
6
|
const seek_forwards_1 = require("./seek-forwards");
|
|
7
7
|
const video_section_1 = require("./state/video-section");
|
|
8
|
-
const performSeek = async ({ seekTo, userInitiated, controller, mediaSection, iterator, seekInfiniteLoop, logLevel, mode, contentLength, currentReader, readerInterface, src, discardReadBytes, fields, prefetchCache, }) => {
|
|
8
|
+
const performSeek = async ({ seekTo, userInitiated, controller, mediaSection, iterator, seekInfiniteLoop, logLevel, mode, contentLength, currentReader, readerInterface, src, discardReadBytes, fields, prefetchCache, isoState, }) => {
|
|
9
9
|
const byteInMediaSection = (0, video_section_1.isByteInMediaSection)({
|
|
10
10
|
position: seekTo,
|
|
11
11
|
mediaSections: mediaSection.getMediaSections(),
|
|
@@ -69,6 +69,9 @@ const performSeek = async ({ seekTo, userInitiated, controller, mediaSection, it
|
|
|
69
69
|
prefetchCache,
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
|
+
if (userInitiated) {
|
|
73
|
+
isoState.flatSamples.updateAfterSeek(seekTo);
|
|
74
|
+
}
|
|
72
75
|
await controller._internals.checkForAbortAndPause();
|
|
73
76
|
};
|
|
74
77
|
exports.performSeek = performSeek;
|
|
@@ -1,33 +1,25 @@
|
|
|
1
|
-
import type { JumpMark } from '../../containers/iso-base-media/mdat/calculate-jump-marks';
|
|
2
1
|
import type { SamplePosition } from '../../get-sample-positions';
|
|
3
|
-
import type { MediaParserAudioTrack, MediaParserOtherTrack, MediaParserVideoTrack } from '../../get-tracks';
|
|
4
2
|
import type { ParserState } from '../parser-state';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
};
|
|
9
|
-
export type MinimalFlatSampleForTesting = {
|
|
10
|
-
track: {
|
|
11
|
-
trackId: number;
|
|
12
|
-
originalTimescale: number;
|
|
13
|
-
type: 'audio' | 'video' | 'other';
|
|
14
|
-
};
|
|
15
|
-
samplePosition: {
|
|
16
|
-
decodingTimestamp: number;
|
|
17
|
-
offset: number;
|
|
18
|
-
};
|
|
3
|
+
type TrackIdAndSamplePositions = {
|
|
4
|
+
trackId: number;
|
|
5
|
+
samplePositions: SamplePosition[];
|
|
19
6
|
};
|
|
20
|
-
export declare const
|
|
7
|
+
export declare const calculateSamplePositions: ({ state, mediaSectionStart, trackIds, }: {
|
|
21
8
|
state: ParserState;
|
|
22
9
|
mediaSectionStart: number;
|
|
23
|
-
}) => {
|
|
24
|
-
flatSamples: Map<number, FlatSample>;
|
|
25
|
-
offsets: number[];
|
|
26
10
|
trackIds: number[];
|
|
27
|
-
};
|
|
11
|
+
}) => TrackIdAndSamplePositions[];
|
|
28
12
|
export declare const cachedSamplePositionsState: () => {
|
|
29
|
-
getSamples: (mdatStart: number) =>
|
|
30
|
-
setSamples: (mdatStart: number, samples:
|
|
31
|
-
|
|
32
|
-
|
|
13
|
+
getSamples: (mdatStart: number) => TrackIdAndSamplePositions[] | null;
|
|
14
|
+
setSamples: (mdatStart: number, samples: TrackIdAndSamplePositions[]) => void;
|
|
15
|
+
setCurrentSampleIndex: (mdatStart: number, trackId: number, index: number) => void;
|
|
16
|
+
getCurrentSampleIndices: (mdatStart: number) => Record<number, number>;
|
|
17
|
+
updateAfterSeek: (seekedByte: number) => void;
|
|
18
|
+
};
|
|
19
|
+
type Lowest = {
|
|
20
|
+
samplePosition: SamplePosition;
|
|
21
|
+
trackId: number;
|
|
22
|
+
index: number;
|
|
33
23
|
};
|
|
24
|
+
export declare const getSampleWithLowestDts: (samplePositions: TrackIdAndSamplePositions[], currentSampleIndexMap: Record<number, number>) => Lowest[];
|
|
25
|
+
export {};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.cachedSamplePositionsState = exports.
|
|
3
|
+
exports.getSampleWithLowestDts = exports.cachedSamplePositionsState = exports.calculateSamplePositions = void 0;
|
|
4
4
|
const are_samples_complete_1 = require("../../containers/iso-base-media/are-samples-complete");
|
|
5
5
|
const get_sample_positions_from_track_1 = require("../../containers/iso-base-media/get-sample-positions-from-track");
|
|
6
6
|
const traversal_1 = require("../../containers/iso-base-media/traversal");
|
|
7
7
|
const get_tracks_1 = require("../../get-tracks");
|
|
8
|
+
const log_1 = require("../../log");
|
|
8
9
|
const precomputed_tfra_1 = require("./precomputed-tfra");
|
|
9
|
-
const
|
|
10
|
+
const calculateSamplePositions = ({ state, mediaSectionStart, trackIds, }) => {
|
|
10
11
|
var _a, _b;
|
|
11
12
|
const tracks = (0, get_tracks_1.getTracks)(state, true);
|
|
12
13
|
const moofBoxes = (0, traversal_1.getMoofBoxes)(state.structure.getIsoStructure().boxes);
|
|
@@ -28,11 +29,13 @@ const calculateFlatSamples = ({ state, mediaSectionStart, }) => {
|
|
|
28
29
|
if (!moov) {
|
|
29
30
|
throw new Error('No moov box found');
|
|
30
31
|
}
|
|
31
|
-
const
|
|
32
|
-
const trackIds = [];
|
|
33
|
-
const map = new Map();
|
|
32
|
+
const trackIdAndSamplePositions = [];
|
|
34
33
|
for (const track of tracks) {
|
|
35
34
|
const trakBox = (0, traversal_1.getTrakBoxByTrackId)(moov, track.trackId);
|
|
35
|
+
if (!trackIds.includes(track.trackId)) {
|
|
36
|
+
log_1.Log.verbose(state.logLevel, 'Skipping calculating sample positions for track', track.trackId);
|
|
37
|
+
continue;
|
|
38
|
+
}
|
|
36
39
|
if (!trakBox) {
|
|
37
40
|
throw new Error('No trak box found');
|
|
38
41
|
}
|
|
@@ -42,37 +45,93 @@ const calculateFlatSamples = ({ state, mediaSectionStart, }) => {
|
|
|
42
45
|
moofComplete,
|
|
43
46
|
trexBoxes: (0, traversal_1.getTrexBoxes)(moov),
|
|
44
47
|
});
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
trackIdAndSamplePositions.push({
|
|
49
|
+
trackId: track.trackId,
|
|
50
|
+
samplePositions,
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
return trackIdAndSamplePositions;
|
|
54
|
+
};
|
|
55
|
+
exports.calculateSamplePositions = calculateSamplePositions;
|
|
56
|
+
const updateSampleIndicesAfterSeek = ({ samplePositionsForMdatStart, seekedByte, }) => {
|
|
57
|
+
const currentSampleIndices = {};
|
|
58
|
+
const keys = Object.keys(samplePositionsForMdatStart).map(Number).sort();
|
|
59
|
+
const mdat = keys.find((key) => seekedByte >= key);
|
|
60
|
+
if (!mdat) {
|
|
61
|
+
return currentSampleIndices;
|
|
62
|
+
}
|
|
63
|
+
const samplePositions = samplePositionsForMdatStart[mdat];
|
|
64
|
+
if (!samplePositions) {
|
|
65
|
+
return currentSampleIndices;
|
|
66
|
+
}
|
|
67
|
+
for (const track of samplePositions) {
|
|
68
|
+
const currentSampleIndex = track.samplePositions.findIndex((sample) => sample.offset >= seekedByte);
|
|
69
|
+
if (!currentSampleIndices[mdat]) {
|
|
70
|
+
currentSampleIndices[mdat] = {};
|
|
71
|
+
}
|
|
72
|
+
if (!currentSampleIndices[mdat][track.trackId]) {
|
|
73
|
+
currentSampleIndices[mdat][track.trackId] = 0;
|
|
74
|
+
}
|
|
75
|
+
if (currentSampleIndex === -1) {
|
|
76
|
+
currentSampleIndices[mdat][track.trackId] = track.samplePositions.length;
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
currentSampleIndices[mdat][track.trackId] = currentSampleIndex;
|
|
52
80
|
}
|
|
53
81
|
}
|
|
54
|
-
|
|
55
|
-
return { flatSamples: map, offsets, trackIds };
|
|
82
|
+
return currentSampleIndices;
|
|
56
83
|
};
|
|
57
|
-
exports.calculateFlatSamples = calculateFlatSamples;
|
|
58
84
|
const cachedSamplePositionsState = () => {
|
|
59
|
-
// offset ->
|
|
60
|
-
const
|
|
61
|
-
|
|
85
|
+
// offset -> sample positions
|
|
86
|
+
const samplePositionsForMdatStart = {};
|
|
87
|
+
let currentSampleIndex = {};
|
|
62
88
|
return {
|
|
63
89
|
getSamples: (mdatStart) => {
|
|
64
90
|
var _a;
|
|
65
|
-
return (_a =
|
|
91
|
+
return (_a = samplePositionsForMdatStart[mdatStart]) !== null && _a !== void 0 ? _a : null;
|
|
66
92
|
},
|
|
67
93
|
setSamples: (mdatStart, samples) => {
|
|
68
|
-
|
|
94
|
+
samplePositionsForMdatStart[mdatStart] = samples;
|
|
95
|
+
},
|
|
96
|
+
setCurrentSampleIndex: (mdatStart, trackId, index) => {
|
|
97
|
+
if (!currentSampleIndex[mdatStart]) {
|
|
98
|
+
currentSampleIndex[mdatStart] = {};
|
|
99
|
+
}
|
|
100
|
+
if (!currentSampleIndex[mdatStart][trackId]) {
|
|
101
|
+
currentSampleIndex[mdatStart][trackId] = 0;
|
|
102
|
+
}
|
|
103
|
+
currentSampleIndex[mdatStart][trackId] = index;
|
|
69
104
|
},
|
|
70
|
-
|
|
71
|
-
|
|
105
|
+
getCurrentSampleIndices: (mdatStart) => {
|
|
106
|
+
var _a;
|
|
107
|
+
return (_a = currentSampleIndex[mdatStart]) !== null && _a !== void 0 ? _a : {};
|
|
72
108
|
},
|
|
73
|
-
|
|
74
|
-
|
|
109
|
+
updateAfterSeek: (seekedByte) => {
|
|
110
|
+
currentSampleIndex = updateSampleIndicesAfterSeek({
|
|
111
|
+
samplePositionsForMdatStart,
|
|
112
|
+
seekedByte,
|
|
113
|
+
});
|
|
75
114
|
},
|
|
76
115
|
};
|
|
77
116
|
};
|
|
78
117
|
exports.cachedSamplePositionsState = cachedSamplePositionsState;
|
|
118
|
+
const getSampleWithLowestDts = (samplePositions, currentSampleIndexMap) => {
|
|
119
|
+
var _a;
|
|
120
|
+
const lowestDts = [];
|
|
121
|
+
for (const track of samplePositions) {
|
|
122
|
+
const currentSampleIndex = (_a = currentSampleIndexMap[track.trackId]) !== null && _a !== void 0 ? _a : 0;
|
|
123
|
+
const currentSample = track.samplePositions[currentSampleIndex];
|
|
124
|
+
if (currentSample &&
|
|
125
|
+
(lowestDts.length === 0 ||
|
|
126
|
+
currentSample.decodingTimestamp <=
|
|
127
|
+
lowestDts[0].samplePosition.decodingTimestamp)) {
|
|
128
|
+
lowestDts.push({
|
|
129
|
+
samplePosition: currentSample,
|
|
130
|
+
trackId: track.trackId,
|
|
131
|
+
index: currentSampleIndex,
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
return lowestDts;
|
|
136
|
+
};
|
|
137
|
+
exports.getSampleWithLowestDts = getSampleWithLowestDts;
|
|
@@ -12,10 +12,17 @@ export declare const isoBaseMediaState: ({ contentLength, controller, readerInte
|
|
|
12
12
|
prefetchCache: PrefetchCache;
|
|
13
13
|
}) => {
|
|
14
14
|
flatSamples: {
|
|
15
|
-
getSamples: (mdatStart: number) =>
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
getSamples: (mdatStart: number) => {
|
|
16
|
+
trackId: number;
|
|
17
|
+
samplePositions: import("../../get-sample-positions").SamplePosition[];
|
|
18
|
+
}[] | null;
|
|
19
|
+
setSamples: (mdatStart: number, samples: {
|
|
20
|
+
trackId: number;
|
|
21
|
+
samplePositions: import("../../get-sample-positions").SamplePosition[];
|
|
22
|
+
}[]) => void;
|
|
23
|
+
setCurrentSampleIndex: (mdatStart: number, trackId: number, index: number) => void;
|
|
24
|
+
getCurrentSampleIndices: (mdatStart: number) => Record<number, number>;
|
|
25
|
+
updateAfterSeek: (seekedByte: number) => void;
|
|
19
26
|
};
|
|
20
27
|
moov: {
|
|
21
28
|
setMoovBox: (moov: {
|
|
@@ -164,10 +164,17 @@ export declare const makeParserState: ({ hasAudioTrackHandlers, hasVideoTrackHan
|
|
|
164
164
|
};
|
|
165
165
|
iso: {
|
|
166
166
|
flatSamples: {
|
|
167
|
-
getSamples: (mdatStart: number) =>
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
167
|
+
getSamples: (mdatStart: number) => {
|
|
168
|
+
trackId: number;
|
|
169
|
+
samplePositions: import("../get-sample-positions").SamplePosition[];
|
|
170
|
+
}[] | null;
|
|
171
|
+
setSamples: (mdatStart: number, samples: {
|
|
172
|
+
trackId: number;
|
|
173
|
+
samplePositions: import("../get-sample-positions").SamplePosition[];
|
|
174
|
+
}[]) => void;
|
|
175
|
+
setCurrentSampleIndex: (mdatStart: number, trackId: number, index: number) => void;
|
|
176
|
+
getCurrentSampleIndices: (mdatStart: number) => Record<number, number>;
|
|
177
|
+
updateAfterSeek: (seekedByte: number) => void;
|
|
171
178
|
};
|
|
172
179
|
moov: {
|
|
173
180
|
setMoovBox: (moov: {
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "4.0.
|
|
1
|
+
export declare const VERSION = "4.0.334";
|
package/dist/version.js
CHANGED
|
@@ -134,6 +134,7 @@ const workOnSeekRequest = async (options) => {
|
|
|
134
134
|
discardReadBytes,
|
|
135
135
|
fields,
|
|
136
136
|
prefetchCache,
|
|
137
|
+
isoState,
|
|
137
138
|
});
|
|
138
139
|
return;
|
|
139
140
|
}
|
|
@@ -154,6 +155,7 @@ const workOnSeekRequest = async (options) => {
|
|
|
154
155
|
discardReadBytes,
|
|
155
156
|
fields,
|
|
156
157
|
prefetchCache,
|
|
158
|
+
isoState,
|
|
157
159
|
});
|
|
158
160
|
const { hasChanged } = controller._internals.seekSignal.clearSeekIfStillSame(seek);
|
|
159
161
|
if (hasChanged) {
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"url": "https://github.com/remotion-dev/remotion/tree/main/packages/media-parser"
|
|
4
4
|
},
|
|
5
5
|
"name": "@remotion/media-parser",
|
|
6
|
-
"version": "4.0.
|
|
6
|
+
"version": "4.0.334",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
8
|
"sideEffects": false,
|
|
9
9
|
"devDependencies": {
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
"eslint": "9.19.0",
|
|
12
12
|
"mediabunny": "1.3.0",
|
|
13
13
|
"@types/bun": "1.2.8",
|
|
14
|
-
"@remotion/example-videos": "4.0.
|
|
15
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
14
|
+
"@remotion/example-videos": "4.0.334",
|
|
15
|
+
"@remotion/eslint-config-internal": "4.0.334"
|
|
16
16
|
},
|
|
17
17
|
"publishConfig": {
|
|
18
18
|
"access": "public"
|