mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-09-27 19:03:46 +02:00
Remove InputTrack.groupId, hide pairing mask, change HLS track merging behavior
This commit is contained in:
+5
-12
@@ -41,7 +41,6 @@ export interface InputTrackBacking {
|
||||
getTimeResolution(): number;
|
||||
getTimestampsAreRelativeToUnixEpoch(): boolean;
|
||||
getDisposition(): TrackDisposition;
|
||||
getGroupId(): number;
|
||||
getPairingMask(): bigint;
|
||||
getBitrate(): number | null;
|
||||
getAverageBitrate(): number | null;
|
||||
@@ -118,14 +117,6 @@ export abstract class InputTrack {
|
||||
return this._backing.getNumber();
|
||||
}
|
||||
|
||||
get groupId() {
|
||||
return this._backing.getGroupId();
|
||||
}
|
||||
|
||||
get pairingMask() {
|
||||
return this._backing.getPairingMask();
|
||||
}
|
||||
|
||||
/**
|
||||
* The identifier of the codec used internally by the container. It is not homogenized by Mediabunny
|
||||
* and depends entirely on the container format.
|
||||
@@ -310,9 +301,11 @@ export abstract class InputTrack {
|
||||
return true;
|
||||
}
|
||||
|
||||
return this.input === otherTrack.input
|
||||
&& this.groupId !== otherTrack.groupId // This also prevents the track from being paired with itself
|
||||
&& (this.pairingMask & otherTrack.pairingMask) !== 0n;
|
||||
if (this.input !== otherTrack.input || this === otherTrack) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return (this._backing.getPairingMask() & otherTrack._backing.getPairingMask()) !== 0n;
|
||||
}
|
||||
|
||||
async getPairableTracks(query?: TrackQuery<InputTrack>) {
|
||||
|
||||
Reference in New Issue
Block a user