@apocaliss92/nodelink-js 0.1.17 → 0.1.20
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/README.md +41 -68
- package/dist/{DiagnosticsTools-6WEMO4L4.js → DiagnosticsTools-NUMCYEKQ.js} +2 -2
- package/dist/{chunk-ULSFEQSE.js → chunk-EHWVA3SG.js} +164 -17
- package/dist/chunk-EHWVA3SG.js.map +1 -0
- package/dist/{chunk-ZE7D7LI4.js → chunk-YPU7RAEY.js} +18 -12
- package/dist/{chunk-ZE7D7LI4.js.map → chunk-YPU7RAEY.js.map} +1 -1
- package/dist/cli/rtsp-server.cjs +177 -24
- package/dist/cli/rtsp-server.cjs.map +1 -1
- package/dist/cli/rtsp-server.js +2 -2
- package/dist/index.cjs +216 -32
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +52 -6
- package/dist/index.d.ts +52 -6
- package/dist/index.js +41 -10
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-ULSFEQSE.js.map +0 -1
- /package/dist/{DiagnosticsTools-6WEMO4L4.js.map → DiagnosticsTools-NUMCYEKQ.js.map} +0 -0
|
@@ -3392,6 +3392,22 @@ function detectVideoCodecFromNal(data) {
|
|
|
3392
3392
|
if (nalStart < 0 || nalStart >= data.length) return null;
|
|
3393
3393
|
const nalByte = data[nalStart];
|
|
3394
3394
|
if (nalByte === void 0) return null;
|
|
3395
|
+
const forbiddenBit264 = nalByte >> 7 & 1;
|
|
3396
|
+
const h264Type = nalByte & 31;
|
|
3397
|
+
if (forbiddenBit264 === 0 && h264Type > 0 && h264Type <= 12) {
|
|
3398
|
+
if (h264Type === 7 || h264Type === 8) {
|
|
3399
|
+
return "H264";
|
|
3400
|
+
}
|
|
3401
|
+
if (h264Type === 5) {
|
|
3402
|
+
return "H264";
|
|
3403
|
+
}
|
|
3404
|
+
if (h264Type === 1) {
|
|
3405
|
+
const nalRefIdc = nalByte >> 5 & 3;
|
|
3406
|
+
if (nalRefIdc >= 1) {
|
|
3407
|
+
return "H264";
|
|
3408
|
+
}
|
|
3409
|
+
}
|
|
3410
|
+
}
|
|
3395
3411
|
if (nalStart + 1 < data.length) {
|
|
3396
3412
|
const nalByte2 = data[nalStart + 1];
|
|
3397
3413
|
if (nalByte2 !== void 0) {
|
|
@@ -3405,22 +3421,12 @@ function detectVideoCodecFromNal(data) {
|
|
|
3405
3421
|
if (hevcType === 19 || hevcType === 20 || hevcType === 21) {
|
|
3406
3422
|
return "H265";
|
|
3407
3423
|
}
|
|
3408
|
-
if (hevcType <=
|
|
3424
|
+
if (hevcType <= 1 && nalByte <= 3) {
|
|
3409
3425
|
return "H265";
|
|
3410
3426
|
}
|
|
3411
3427
|
}
|
|
3412
3428
|
}
|
|
3413
3429
|
}
|
|
3414
|
-
const forbiddenBit264 = nalByte >> 7 & 1;
|
|
3415
|
-
const h264Type = nalByte & 31;
|
|
3416
|
-
if (forbiddenBit264 === 0 && h264Type > 0 && h264Type <= 12) {
|
|
3417
|
-
if (h264Type === 7 || h264Type === 8) {
|
|
3418
|
-
return "H264";
|
|
3419
|
-
}
|
|
3420
|
-
if (h264Type === 5 || h264Type === 1) {
|
|
3421
|
-
return "H264";
|
|
3422
|
-
}
|
|
3423
|
-
}
|
|
3424
3430
|
return null;
|
|
3425
3431
|
}
|
|
3426
3432
|
var BcMediaAnnexBDecoder = class {
|
|
@@ -7328,4 +7334,4 @@ export {
|
|
|
7328
7334
|
parseRecordingFileName,
|
|
7329
7335
|
ReolinkCgiApi
|
|
7330
7336
|
};
|
|
7331
|
-
//# sourceMappingURL=chunk-
|
|
7337
|
+
//# sourceMappingURL=chunk-YPU7RAEY.js.map
|