@camera.ui/camera-ui-homekit 0.0.28 → 0.0.29

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.
Files changed (59) hide show
  1. package/bundle.zip +0 -0
  2. package/package.json +17 -34
  3. package/CHANGELOG.md +0 -8
  4. package/CONTRIBUTING.md +0 -1
  5. package/LICENSE.md +0 -22
  6. package/README.md +0 -1
  7. package/dist/camera/accessory.d.ts +0 -28
  8. package/dist/camera/accessory.js +0 -380
  9. package/dist/camera/accessory.js.map +0 -1
  10. package/dist/camera/recordingDelegate.d.ts +0 -27
  11. package/dist/camera/recordingDelegate.js +0 -264
  12. package/dist/camera/recordingDelegate.js.map +0 -1
  13. package/dist/camera/services.d.ts +0 -28
  14. package/dist/camera/services.js +0 -202
  15. package/dist/camera/services.js.map +0 -1
  16. package/dist/camera/sessionWrapper.d.ts +0 -40
  17. package/dist/camera/sessionWrapper.js +0 -517
  18. package/dist/camera/sessionWrapper.js.map +0 -1
  19. package/dist/camera/streamingDelegate.d.ts +0 -14
  20. package/dist/camera/streamingDelegate.js +0 -100
  21. package/dist/camera/streamingDelegate.js.map +0 -1
  22. package/dist/camera/streamingServer.d.ts +0 -26
  23. package/dist/camera/streamingServer.js +0 -145
  24. package/dist/camera/streamingServer.js.map +0 -1
  25. package/dist/constants.d.ts +0 -1
  26. package/dist/constants.js +0 -7
  27. package/dist/constants.js.map +0 -1
  28. package/dist/crypto.d.ts +0 -1
  29. package/dist/crypto.js +0 -34
  30. package/dist/crypto.js.map +0 -1
  31. package/dist/index.d.ts +0 -16
  32. package/dist/index.js +0 -53
  33. package/dist/index.js.map +0 -1
  34. package/dist/types.d.ts +0 -16
  35. package/dist/types.js +0 -2
  36. package/dist/types.js.map +0 -1
  37. package/dist/utils/mac.d.ts +0 -4
  38. package/dist/utils/mac.js +0 -19
  39. package/dist/utils/mac.js.map +0 -1
  40. package/dist/utils/opus-repacketizer.d.ts +0 -7
  41. package/dist/utils/opus-repacketizer.js +0 -163
  42. package/dist/utils/opus-repacketizer.js.map +0 -1
  43. package/dist/utils/processor.d.ts +0 -85
  44. package/dist/utils/processor.js +0 -475
  45. package/dist/utils/processor.js.map +0 -1
  46. package/dist/utils/return-audio-transcoder.d.ts +0 -39
  47. package/dist/utils/return-audio-transcoder.js +0 -82
  48. package/dist/utils/return-audio-transcoder.js.map +0 -1
  49. package/dist/utils/srtp.d.ts +0 -8
  50. package/dist/utils/srtp.js +0 -22
  51. package/dist/utils/srtp.js.map +0 -1
  52. package/dist/utils/utils.d.ts +0 -10
  53. package/dist/utils/utils.js +0 -38
  54. package/dist/utils/utils.js.map +0 -1
  55. package/media/cameraOffline.png +0 -0
  56. package/media/maxStreams.png +0 -0
  57. package/media/noSnapshot.png +0 -0
  58. package/media/privacyMode.png +0 -0
  59. package/scripts/install-optional-deps.js +0 -17
@@ -1,163 +0,0 @@
1
- // OpusRepacketizer is borrowed from scrypted
2
- // Original source: https://github.com/koush/scrypted/blob/3150a3033515a3886af1e6b35a0ba7432b63e02b/plugins/homekit/src/types/camera/opus-repacketizer.ts
3
- // https://datatracker.ietf.org/doc/html/rfc6716
4
- // INPUT (for single frame sample, see RFC for other 4 code values)
5
- // 0 1 2 3
6
- // 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
7
- // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
8
- // | config |s|0|0| |
9
- // +-+-+-+-+-+-+-+-+ |
10
- // | Compressed frame 1 (N-1 bytes)... :
11
- // : |
12
- // | |
13
- // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
14
- // OUTPUT
15
- // 0 1 2 3
16
- // 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
17
- // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
18
- // | config |s|1|1|1|p| M | Padding length (Optional) :
19
- // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
20
- // : N1 (1-2 bytes): N2 (1-2 bytes): ... : N[M-1] |
21
- // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
22
- // | |
23
- // : Compressed frame 1 (N1 bytes)... :
24
- // | |
25
- // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
26
- // | |
27
- // : Compressed frame 2 (N2 bytes)... :
28
- // | |
29
- // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
30
- // | |
31
- // : ... :
32
- // | |
33
- // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
34
- // | |
35
- // : Compressed frame M... :
36
- // | |
37
- // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
38
- // : Opus Padding (Optional)... |
39
- // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
40
- // Figure 6: A CBR Code 3 Packet
41
- // In the VBR case, the (optional) padding length is followed by M-1
42
- // frame lengths (indicated by "N1" to "N[M-1]" in Figure 7), each
43
- // encoded in a one- or two-byte sequence as described above. The
44
- // packet MUST contain enough data for the M-1 lengths after removing
45
- // the (optional) padding, and the sum of these lengths MUST be no
46
- // larger than the number of bytes remaining in the packet after
47
- // decoding them [R7]. The compressed data for all M frames follows,
48
- // each frame consisting of the indicated number of bytes, with the
49
- // final frame consuming any remaining bytes before the final padding,
50
- // as illustrated in Figure 6. The number of header bytes (TOC byte,
51
- // frame count byte, padding length bytes, and frame length bytes), plus
52
- // the signaled length of the first M-1 frames themselves, plus the
53
- // signaled length of the padding MUST be no larger than N, the total
54
- // size of the packet.
55
- export class OpusRepacketizer {
56
- framesPerPacket;
57
- depacketized = [];
58
- constructor(framesPerPacket) {
59
- this.framesPerPacket = framesPerPacket;
60
- }
61
- // repacketize a packet with a single frame into a packet with multiple frames.
62
- repacketize(packet) {
63
- const code = packet.payload[0] & 0b00000011;
64
- let offset;
65
- // see Frame Length Coding in RFC
66
- const decodeFrameLength = () => {
67
- let frameLength = packet.payload.readUInt8(offset);
68
- if (frameLength >= 252) {
69
- offset++;
70
- frameLength += packet.payload.readUInt8(offset) * 4;
71
- }
72
- return frameLength;
73
- };
74
- // code 0: cbr, 1 packet
75
- // code 1: cbr, 2 packets
76
- // code 2: vbr, 2 packets
77
- // code 3: cbr/vbr signaled, variable packets
78
- if (code === 0) {
79
- if (this.framesPerPacket === 1 && !this.depacketized.length)
80
- return packet;
81
- // depacketize by stripping off the config byte
82
- this.depacketized.push(packet.payload.subarray(1));
83
- }
84
- else if (code === 1) {
85
- if (this.framesPerPacket === 2 && !this.depacketized.length)
86
- return packet;
87
- // depacketize by dividing the remaining payload into two equal sized frames
88
- const remaining = packet.payload.length - 1;
89
- if (remaining % 2) {
90
- throw new Error('expected equal sized opus packets (code 1)');
91
- }
92
- const frameLength = remaining / 2;
93
- this.depacketized.push(packet.payload.subarray(1, 1 + frameLength));
94
- this.depacketized.push(packet.payload.subarray(1 + frameLength));
95
- }
96
- else if (code === 2) {
97
- if (this.framesPerPacket === 2 && !this.depacketized.length)
98
- return packet;
99
- offset = 1;
100
- // depacketize by dividing the remaining payload into two inequal sized frames
101
- const frameLength = decodeFrameLength();
102
- this.depacketized.push(packet.payload.subarray(offset, offset + frameLength));
103
- this.depacketized.push(packet.payload.subarray(offset + frameLength));
104
- }
105
- else if (code === 3) {
106
- // code 3 packet will have a frame count and padding indicator, and whether the packets
107
- // are equal size or not.
108
- const frameCountByte = packet.payload[1], packetFrameCount = frameCountByte & 0b00111111, vbr = frameCountByte & 0b10000000;
109
- if (this.framesPerPacket === packetFrameCount && !this.depacketized.length) {
110
- return packet;
111
- }
112
- const paddingIndicator = frameCountByte & 0b01000000;
113
- offset = 2;
114
- let padding = 0;
115
- if (paddingIndicator) {
116
- padding = packet.payload.readUInt8(offset);
117
- offset++;
118
- if (padding === 255) {
119
- padding = 254 + packet.payload.readUInt8(offset);
120
- offset++;
121
- }
122
- }
123
- if (!vbr) {
124
- const remaining = packet.payload.length - offset - padding;
125
- if (remaining % packetFrameCount) {
126
- throw new Error('expected equal sized opus packets (code 3)');
127
- }
128
- const frameLength = remaining / packetFrameCount;
129
- for (let i = 0; i < packetFrameCount; i++) {
130
- const start = offset + i * frameLength, end = start + frameLength;
131
- this.depacketized.push(packet.payload.subarray(start, end));
132
- }
133
- }
134
- else {
135
- const frameLengths = [];
136
- for (let i = 0; i < packetFrameCount; i++) {
137
- const frameLength = decodeFrameLength();
138
- frameLengths.push(frameLength);
139
- }
140
- for (let i = 0; i < packetFrameCount; i++) {
141
- const frameLength = frameLengths[i], start = offset;
142
- offset += frameLength;
143
- this.depacketized.push(packet.payload.subarray(start, offset));
144
- }
145
- }
146
- }
147
- if (this.depacketized.length < this.framesPerPacket)
148
- return;
149
- const depacketized = this.depacketized.slice(0, this.framesPerPacket);
150
- this.depacketized = this.depacketized.slice(this.framesPerPacket);
151
- // reuse the config and stereo indicator, but change the code to 3.
152
- let toc = packet.payload[0];
153
- toc |= 0b00000011;
154
- // vbr | padding indicator | packet count
155
- const frameCountByte = 0b10000000 | this.framesPerPacket, newHeader = [toc, frameCountByte];
156
- // M-1 length bytes
157
- newHeader.push(...depacketized.slice(0, -1).map((data) => data.length));
158
- const headerBuffer = Buffer.from(newHeader), payload = Buffer.concat([headerBuffer, ...depacketized]);
159
- packet.payload = payload;
160
- return packet;
161
- }
162
- }
163
- //# sourceMappingURL=opus-repacketizer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"opus-repacketizer.js","sourceRoot":"","sources":["../../src/utils/opus-repacketizer.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,yJAAyJ;AAIzJ,gDAAgD;AAEhD,mEAAmE;AAEnE,gEAAgE;AAChE,kEAAkE;AAClE,oEAAoE;AACpE,oEAAoE;AACpE,oEAAoE;AACpE,oEAAoE;AACpE,oEAAoE;AACpE,oEAAoE;AACpE,oEAAoE;AAEpE,SAAS;AAET,gEAAgE;AAChE,kEAAkE;AAClE,oEAAoE;AACpE,oEAAoE;AACpE,oEAAoE;AACpE,oEAAoE;AACpE,oEAAoE;AACpE,oEAAoE;AACpE,oEAAoE;AACpE,oEAAoE;AACpE,oEAAoE;AACpE,oEAAoE;AACpE,oEAAoE;AACpE,oEAAoE;AACpE,oEAAoE;AACpE,oEAAoE;AACpE,oEAAoE;AACpE,oEAAoE;AACpE,oEAAoE;AACpE,oEAAoE;AACpE,oEAAoE;AACpE,oEAAoE;AACpE,oEAAoE;AACpE,oEAAoE;AACpE,oEAAoE;AAEpE,iDAAiD;AAEjD,oEAAoE;AACpE,kEAAkE;AAClE,kEAAkE;AAClE,qEAAqE;AACrE,kEAAkE;AAClE,gEAAgE;AAChE,qEAAqE;AACrE,mEAAmE;AACnE,sEAAsE;AACtE,qEAAqE;AACrE,wEAAwE;AACxE,mEAAmE;AACnE,qEAAqE;AACrE,sBAAsB;AAEtB,MAAM,OAAO,gBAAgB;IAGR;IAFX,YAAY,GAAa,EAAE,CAAC;IAEpC,YAAmB,eAAuB;QAAvB,oBAAe,GAAf,eAAe,CAAQ;IAAG,CAAC;IAE9C,+EAA+E;IACxE,WAAW,CAAC,MAAiB;QAClC,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC;QAC5C,IAAI,MAAc,CAAC;QAEnB,iCAAiC;QACjC,MAAM,iBAAiB,GAAG,GAAG,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Q,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;gBACjE,CAAC;YACH,CAAC;QACH,CAAC;QAED,IAAI,IAAI,CAAC,YAAY,CAAC,MAAM,GAAG,IAAI,CAAC,eAAe;YAAE,OAAO;QAE5D,MAAM,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;QACtE,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QAElE,mEAAmE;QACnE,IAAI,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QAC5B,GAAG,IAAI,UAAU,CAAC;QAClB,yCAAyC;QACzC,MAAM,cAAc,GAAG,UAAU,GAAG,IAAI,CAAC,eAAe,EACtD,SAAS,GAAa,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC;QAE9C,mBAAmB;QACnB,SAAS,CAAC,IAAI,CAAC,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;QAExE,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,EACzC,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,YAAY,EAAE,GAAG,YAAY,CAAC,CAAC,CAAC;QAE3D,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC;QACzB,OAAO,MAAM,CAAC;IAChB,CAAC;CACF"}
@@ -1,85 +0,0 @@
1
- import { RtpPacket } from 'werift';
2
- import type { RtpSplitter } from '@camera.ui/common';
3
- import type { LoggerService, WeriftSession } from '@camera.ui/types';
4
- import type { CameraAccessory } from '../camera/accessory.js';
5
- import type { SrtpOptions } from './srtp.js';
6
- export declare function getSessionConfig(srtpOptions: SrtpOptions): {
7
- keys: {
8
- localMasterKey: Buffer;
9
- localMasterSalt: Buffer;
10
- remoteMasterKey: Buffer;
11
- remoteMasterSalt: Buffer;
12
- };
13
- profile: number;
14
- };
15
- export declare class AudioProcessor {
16
- private cameraAccessory;
17
- private audioSsrc;
18
- private audioSrtp;
19
- private audioSplitter;
20
- private targetAddress;
21
- private targetPort;
22
- private payloadType;
23
- private sampleRate;
24
- private packetTime;
25
- private isOpus;
26
- private cameraLogger;
27
- private audioSrtpSession;
28
- private opusRepacketizer;
29
- private audioIntervalScale;
30
- private firstTimestamp;
31
- private audioPacketCount;
32
- constructor(cameraAccessory: CameraAccessory, audioSsrc: number, audioSrtp: SrtpOptions, audioSplitter: RtpSplitter, targetAddress: string, targetPort: number, payloadType: number, sampleRate: number, packetTime: number, isOpus: boolean, cameraLogger: LoggerService);
33
- processPacket(data: Buffer): null | undefined;
34
- private sendPacket;
35
- }
36
- export declare class VideoProcessor {
37
- private cameraAccessory;
38
- private streamSession;
39
- private videoSsrc;
40
- private videoSrtp;
41
- private videoSplitter;
42
- private targetAddress;
43
- private targetPort;
44
- private mtu;
45
- private payloadType;
46
- private cameraLogger;
47
- private videoSrtpSession;
48
- private sequenceNumber;
49
- private sps;
50
- private pps;
51
- private incompleteFrame;
52
- private incompleteFrameTimestamp;
53
- private lastSequenceNumber;
54
- private sendQueue;
55
- private isSending;
56
- private isStopped;
57
- constructor(cameraAccessory: CameraAccessory, streamSession: WeriftSession, videoSsrc: number, videoSrtp: SrtpOptions, videoSplitter: RtpSplitter, targetAddress: string, targetPort: number, mtu: number, payloadType: number, cameraLogger: LoggerService);
58
- processPacket(rtp: RtpPacket): void;
59
- private processFuAPacket;
60
- private createStapAPacket;
61
- private processSTAP;
62
- private processMTAP;
63
- private processSimpleNALU;
64
- private processCompleteFrame;
65
- private fragmentAndSendNALU;
66
- private queueRTPPacket;
67
- private processQueue;
68
- private isIDRFrame;
69
- private readExponentialGolombCode;
70
- private stop;
71
- }
72
- export declare class FFmpegProcessor {
73
- private cameraAccessory;
74
- private streamSession;
75
- private ffmpegSplitter;
76
- private videoSplitter;
77
- private cameraLogger;
78
- private sendQueue;
79
- private isProcessing;
80
- private isStopped;
81
- constructor(cameraAccessory: CameraAccessory, streamSession: WeriftSession, ffmpegSplitter: RtpSplitter, videoSplitter: RtpSplitter, cameraLogger: LoggerService);
82
- processPacket(packet: Buffer): void;
83
- private processQueue;
84
- private stop;
85
- }