Add TrackDescriptor concept

This commit is contained in:
Vanilagy
2026-04-08 12:21:08 +02:00
parent b532714926
commit bee1518100
21 changed files with 1280 additions and 887 deletions
-20
View File
@@ -157,10 +157,6 @@ export class EncodedPacketSink {
throw new InputDisposedError();
}
if (!this._track.isHydrated) {
await this._track.hydrate();
}
return maybeFixPacketType(this._track, this._track._backing.getFirstPacket(options), options);
}
@@ -197,10 +193,6 @@ export class EncodedPacketSink {
throw new InputDisposedError();
}
if (!this._track.isHydrated) {
await this._track.hydrate();
}
return maybeFixPacketType(this._track, this._track._backing.getPacket(timestamp, options), options);
}
@@ -218,10 +210,6 @@ export class EncodedPacketSink {
throw new InputDisposedError();
}
if (!this._track.isHydrated) {
await this._track.hydrate();
}
return maybeFixPacketType(this._track, this._track._backing.getNextPacket(packet, options), options);
}
@@ -244,10 +232,6 @@ export class EncodedPacketSink {
throw new InputDisposedError();
}
if (!this._track.isHydrated) {
await this._track.hydrate();
}
if (!options.verifyKeyPackets) {
return this._track._backing.getKeyPacket(timestamp, options);
}
@@ -283,10 +267,6 @@ export class EncodedPacketSink {
throw new InputDisposedError();
}
if (!this._track.isHydrated) {
await this._track.hydrate();
}
if (!options.verifyKeyPackets) {
return this._track._backing.getNextKeyPacket(packet, options);
}