Add track name support

This commit is contained in:
Vanilagy
2025-08-23 15:33:44 +02:00
parent 0e03779169
commit bb1b20afa7
17 changed files with 196 additions and 16 deletions
+6
View File
@@ -30,6 +30,7 @@ export type PacketStats = {
export interface InputTrackBacking {
getId(): number;
getCodec(): MediaCodec | null;
getName(): string | null;
getLanguageCode(): string;
getTimeResolution(): number;
getFirstTimestamp(): Promise<number>;
@@ -89,6 +90,11 @@ export abstract class InputTrack {
return this._backing.getLanguageCode();
}
/** A user-defined name for this track. */
get name() {
return this._backing.getName();
}
/**
* A positive number x such that all timestamps and durations of all packets of this track are
* integer multiples of 1/x.