mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-10-03 13:53:53 +02:00
Add TrackDescriptor concept
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user