Rewrite reader logic, add separate reader for caching MP4 chunks, add more advanced drain iterators

This commit is contained in:
Vanilagy
2024-12-08 20:04:47 +01:00
parent ecfd193ae0
commit 5978110de9
12 changed files with 691 additions and 355 deletions
+5 -2
View File
@@ -10,10 +10,12 @@ export type InputOptions = {
};
export class Input {
/** @internal */
_source: Source;
/** @internal */
_formats: InputFormat[];
/** @internal */
_reader: Reader;
_mainReader: Reader;
/** @internal */
_demuxerPromise: Promise<Demuxer> | null = null;
/** @internal */
@@ -21,7 +23,8 @@ export class Input {
constructor(options: InputOptions) {
this._formats = options.formats;
this._reader = new Reader(options.source);
this._source = options.source;
this._mainReader = new Reader(options.source);
}
/** @internal */