werift 0.25.1 → 0.25.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.mjs +4101 -1781
- package/lib/nonstandard/index.mjs +3582 -1221
- package/lib/polyfill/dom.mjs +16711 -17852
- package/lib/polyfill/index.mjs +16711 -17852
- package/lib/rtp/src/codec/av1.d.ts +61 -1
- package/lib/rtp/src/codec/av1.js +332 -33
- package/lib/rtp/src/codec/av1.js.map +1 -1
- package/lib/rtp/src/codec/base.d.ts +49 -1
- package/lib/rtp/src/codec/base.js +81 -1
- package/lib/rtp/src/codec/base.js.map +1 -1
- package/lib/rtp/src/codec/g711.d.ts +37 -0
- package/lib/rtp/src/codec/g711.js +109 -0
- package/lib/rtp/src/codec/g711.js.map +1 -0
- package/lib/rtp/src/codec/g722.d.ts +31 -0
- package/lib/rtp/src/codec/g722.js +82 -0
- package/lib/rtp/src/codec/g722.js.map +1 -0
- package/lib/rtp/src/codec/h264.d.ts +81 -7
- package/lib/rtp/src/codec/h264.js +382 -21
- package/lib/rtp/src/codec/h264.js.map +1 -1
- package/lib/rtp/src/codec/h265.d.ts +101 -0
- package/lib/rtp/src/codec/h265.js +615 -0
- package/lib/rtp/src/codec/h265.js.map +1 -0
- package/lib/rtp/src/codec/index.d.ts +6 -1
- package/lib/rtp/src/codec/index.js +25 -0
- package/lib/rtp/src/codec/index.js.map +1 -1
- package/lib/rtp/src/codec/mp4a.d.ts +88 -0
- package/lib/rtp/src/codec/mp4a.js +386 -0
- package/lib/rtp/src/codec/mp4a.js.map +1 -0
- package/lib/rtp/src/codec/opus.d.ts +14 -2
- package/lib/rtp/src/codec/opus.js +32 -2
- package/lib/rtp/src/codec/opus.js.map +1 -1
- package/lib/rtp/src/codec/telephoneEvent.d.ts +102 -0
- package/lib/rtp/src/codec/telephoneEvent.js +176 -0
- package/lib/rtp/src/codec/telephoneEvent.js.map +1 -0
- package/lib/rtp/src/codec/vp8.d.ts +26 -1
- package/lib/rtp/src/codec/vp8.js +76 -2
- package/lib/rtp/src/codec/vp8.js.map +1 -1
- package/lib/rtp/src/codec/vp9.d.ts +25 -1
- package/lib/rtp/src/codec/vp9.js +64 -2
- package/lib/rtp/src/codec/vp9.js.map +1 -1
- package/lib/rtp/src/const.d.ts +1 -0
- package/lib/rtp/src/const.js +5 -0
- package/lib/rtp/src/const.js.map +1 -0
- package/lib/rtp/src/extra/container/mp4/container.js +4 -1
- package/lib/rtp/src/extra/container/mp4/container.js.map +1 -1
- package/lib/rtp/src/extra/container/mp4/h264.d.ts +26 -0
- package/lib/rtp/src/extra/container/mp4/h264.js +54 -0
- package/lib/rtp/src/extra/container/mp4/h264.js.map +1 -1
- package/lib/rtp/src/extra/processor/mp4.d.ts +16 -0
- package/lib/rtp/src/extra/processor/mp4.js +54 -20
- package/lib/rtp/src/extra/processor/mp4.js.map +1 -1
- package/lib/rtp/src/index.d.ts +1 -0
- package/lib/rtp/src/index.js +1 -0
- package/lib/rtp/src/index.js.map +1 -1
- package/lib/rtp/src/rtp/mediaClock.d.ts +283 -0
- package/lib/rtp/src/rtp/mediaClock.js +655 -0
- package/lib/rtp/src/rtp/mediaClock.js.map +1 -0
- package/lib/rtp/src/util.d.ts +59 -6
- package/lib/rtp/src/util.js +88 -10
- package/lib/rtp/src/util.js.map +1 -1
- package/lib/webrtc/src/media/codec.d.ts +18 -0
- package/lib/webrtc/src/media/codec.js +43 -2
- package/lib/webrtc/src/media/codec.js.map +1 -1
- package/lib/webrtc/src/media/codecCompatibility.d.ts +5 -0
- package/lib/webrtc/src/media/codecCompatibility.js +15 -4
- package/lib/webrtc/src/media/codecCompatibility.js.map +1 -1
- package/lib/webrtc/src/nonstandard/dummyMedia.js +20 -6
- package/lib/webrtc/src/nonstandard/dummyMedia.js.map +1 -1
- package/lib/webrtc/src/nonstandard/userMedia/packetizer.d.ts +2 -2
- package/lib/webrtc/src/nonstandard/userMedia/packetizer.js +61 -306
- package/lib/webrtc/src/nonstandard/userMedia/packetizer.js.map +1 -1
- package/lib/webrtc/src/nonstandard/userMedia.d.ts +2 -0
- package/lib/webrtc/src/nonstandard/userMedia.js +41 -7
- package/lib/webrtc/src/nonstandard/userMedia.js.map +1 -1
- package/lib/webrtc/src/peerConnection.js +3 -1
- package/lib/webrtc/src/peerConnection.js.map +1 -1
- package/lib/webrtc/src/sdpManager.js +3 -2
- package/lib/webrtc/src/sdpManager.js.map +1 -1
- package/lib/webrtc/src/transceiverManager.js +2 -1
- package/lib/webrtc/src/transceiverManager.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import type { RtpHeader, RtpPacket } from "../rtp/rtp";
|
|
2
|
+
import type { DePacketizerBase } from "./base";
|
|
3
|
+
import { type NalInputFormat, PacketizerBase, type PacketizerBaseOptions } from "./base";
|
|
4
|
+
/** RFC 7798 §4.4.2 Aggregation Packet type. */
|
|
5
|
+
export declare const H265_PAYLOAD_TYPE_AP = 48;
|
|
6
|
+
/** RFC 7798 §4.4.3 Fragmentation Unit type. */
|
|
7
|
+
export declare const H265_PAYLOAD_TYPE_FU = 49;
|
|
8
|
+
/** PACI payload structure (RFC 7798 §4.4.4); not supported by the depacketizer. */
|
|
9
|
+
export declare const H265_PAYLOAD_TYPE_PACI = 50;
|
|
10
|
+
/** IRAP picture NAL unit types (HEVC); used for isKeyframe. */
|
|
11
|
+
export declare const H265_IRAP_NAL_TYPES: {
|
|
12
|
+
readonly BLA_W_LP: 16;
|
|
13
|
+
readonly BLA_W_RADL: 17;
|
|
14
|
+
readonly BLA_N_LP: 18;
|
|
15
|
+
readonly IDR_W_RADL: 19;
|
|
16
|
+
readonly IDR_N_LP: 20;
|
|
17
|
+
readonly CRA_NUT: 21;
|
|
18
|
+
};
|
|
19
|
+
export declare const H265_NAL_TYPE: {
|
|
20
|
+
readonly AP: 48;
|
|
21
|
+
readonly FU: 49;
|
|
22
|
+
readonly BLA_W_LP: 16;
|
|
23
|
+
readonly BLA_W_RADL: 17;
|
|
24
|
+
readonly BLA_N_LP: 18;
|
|
25
|
+
readonly IDR_W_RADL: 19;
|
|
26
|
+
readonly IDR_N_LP: 20;
|
|
27
|
+
readonly CRA_NUT: 21;
|
|
28
|
+
readonly VPS: 32;
|
|
29
|
+
readonly SPS: 33;
|
|
30
|
+
readonly PPS: 34;
|
|
31
|
+
readonly AUD: 35;
|
|
32
|
+
};
|
|
33
|
+
export type H265PayloadHeader = {
|
|
34
|
+
f: number;
|
|
35
|
+
type: number;
|
|
36
|
+
layerId: number;
|
|
37
|
+
tid: number;
|
|
38
|
+
};
|
|
39
|
+
export declare function parseH265PayloadHeader(buf: Buffer): H265PayloadHeader;
|
|
40
|
+
export declare function writeH265PayloadHeader(h: H265PayloadHeader): Buffer;
|
|
41
|
+
export type H265DepacketizerOptions = {
|
|
42
|
+
/**
|
|
43
|
+
* When true, skip conditional DONL (2 bytes) after PayloadHdr for single NAL
|
|
44
|
+
* and after FU header when S=1 (RFC 7798 DONL presence via sprop-max-don-diff > 0).
|
|
45
|
+
* Default false (non-interleaved).
|
|
46
|
+
*/
|
|
47
|
+
hasDonl?: boolean;
|
|
48
|
+
};
|
|
49
|
+
export declare class H265RtpPayload implements DePacketizerBase {
|
|
50
|
+
f: number;
|
|
51
|
+
type: number;
|
|
52
|
+
layerId: number;
|
|
53
|
+
tid: number;
|
|
54
|
+
/** FU start bit (S). */
|
|
55
|
+
s: number;
|
|
56
|
+
/** FU end bit (E). */
|
|
57
|
+
e: number;
|
|
58
|
+
/** FU FuType (original NAL type). */
|
|
59
|
+
fuType: number;
|
|
60
|
+
/** True when an AP contained at least one IRAP NAL (types 16–21). */
|
|
61
|
+
private apContainsIrap;
|
|
62
|
+
payload: Buffer;
|
|
63
|
+
fragment?: Buffer;
|
|
64
|
+
static deSerialize(buf: Buffer, fragment?: Buffer, options?: H265DepacketizerOptions): H265RtpPayload;
|
|
65
|
+
static isDetectedFinalPacketInSequence(header: RtpHeader): boolean;
|
|
66
|
+
get isKeyframe(): boolean;
|
|
67
|
+
get isPartitionHead(): boolean;
|
|
68
|
+
}
|
|
69
|
+
export declare class H265AnnexBParser {
|
|
70
|
+
private data;
|
|
71
|
+
private currentStartcodeOffset;
|
|
72
|
+
private eof;
|
|
73
|
+
constructor(data: Buffer);
|
|
74
|
+
private findNextStartCodeOffset;
|
|
75
|
+
/** Returns next NAL unit without start code, or null at EOF. */
|
|
76
|
+
readNextNalu(): Buffer | null;
|
|
77
|
+
readAll(): Buffer[];
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Split H.265 sample into NAL units.
|
|
81
|
+
* Accepts Annex-B (start codes) or length-prefixed (HVCC) with `naluLengthSize`.
|
|
82
|
+
*/
|
|
83
|
+
export declare function splitH265NalUnits(sample: Buffer, naluLengthSize?: number, inputFormat?: NalInputFormat): Buffer[];
|
|
84
|
+
export type H265PacketizerOptions = PacketizerBaseOptions & {
|
|
85
|
+
/** Length field size for HVCC input (default 4). Ignored for Annex-B. */
|
|
86
|
+
naluLengthSize?: number;
|
|
87
|
+
/** Sample layout (default "auto"); see {@link NalInputFormat}. */
|
|
88
|
+
inputFormat?: NalInputFormat;
|
|
89
|
+
/**
|
|
90
|
+
* Parameter sets (VPS/SPS/PPS as raw NAL units without start codes).
|
|
91
|
+
* Prepended via AP on keyframe when not already present in the sample.
|
|
92
|
+
*/
|
|
93
|
+
parameterSets?: Buffer[];
|
|
94
|
+
};
|
|
95
|
+
export declare class H265Packetizer extends PacketizerBase {
|
|
96
|
+
private readonly naluLengthSize;
|
|
97
|
+
private readonly inputFormat;
|
|
98
|
+
private readonly parameterSets;
|
|
99
|
+
constructor(options?: H265PacketizerOptions);
|
|
100
|
+
packetize(data: Buffer, rtpTimestamp: number): RtpPacket[];
|
|
101
|
+
}
|