remove incorrect workarounds for undetected cameras
This commit is contained in:
-10
@@ -1,10 +0,0 @@
|
||||
# This is a simple name mapping for cameras, in the form
|
||||
#
|
||||
# CAMERA_ID=descriptive name
|
||||
#
|
||||
# Blank lines and lines starting with "#" are ignored.
|
||||
#
|
||||
# Any updates to this file require restarting the HTTP server.
|
||||
# This file is meant to be updated manually, it is NOT updated dynamically.
|
||||
|
||||
FTYC811847AGFDZ=Office camera
|
||||
+2
-4
@@ -17,10 +17,9 @@ yargs(hideBin(process.argv))
|
||||
(yargs) => {
|
||||
return yargs
|
||||
.option("ansi", { default: false })
|
||||
.option("slow_startup", { default: false })
|
||||
.option("audio", { describe: "Also stream audio from camera", default: true })
|
||||
.option("color", { describe: "Use color in logs", default: undefined })
|
||||
.boolean(["ansi", "audio", "slow_startup", "color"])
|
||||
.boolean(["ansi", "audio", "color"])
|
||||
.option("log_level", { describe: "Set log level", default: "info" })
|
||||
.option("discovery_ip", { describe: "Camera discovery IP address", default: "192.168.1.255" })
|
||||
.option("attempt_to_fix_packet_loss", { default: false })
|
||||
@@ -43,9 +42,8 @@ yargs(hideBin(process.argv))
|
||||
(yargs) => {
|
||||
return yargs
|
||||
.option("ansi", { default: false })
|
||||
.option("slow_startup", { default: false })
|
||||
.option("color", { describe: "Use color in logs", default: undefined })
|
||||
.boolean(["ansi", "slow_startup", "color"])
|
||||
.boolean(["ansi", "color"])
|
||||
.option("log_level", { describe: "Set log level", default: "info" })
|
||||
.option("discovery_ip", { describe: "Camera discovery IP address", default: "192.168.1.255" })
|
||||
.option("attempt_to_fix_packet_loss", { default: false })
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
export type opt = {
|
||||
ansi: boolean;
|
||||
discovery_ip: string;
|
||||
slow_startup: boolean;
|
||||
attempt_to_fix_packet_loss: boolean;
|
||||
};
|
||||
|
||||
+3
-15
@@ -60,23 +60,11 @@ export const makeSession = (
|
||||
sock.on("message", (msg, rinfo) => handleIncoming(session, handlers, msg, rinfo));
|
||||
|
||||
sock.on("listening", () => {
|
||||
const startup = () => {
|
||||
const buf = makeP2pRdy(dev);
|
||||
session.send(buf);
|
||||
// The YsxLite sends a P2PAlive message immediately after P2PRdy
|
||||
const alive_buf = create_P2pAlive();
|
||||
session.send(alive_buf);
|
||||
session.started = true;
|
||||
};
|
||||
if (options.slow_startup) {
|
||||
logger.info("Delaying session startup");
|
||||
setTimeout(startup, 6500);
|
||||
} else {
|
||||
startup();
|
||||
}
|
||||
const buf = makeP2pRdy(dev);
|
||||
session.send(buf);
|
||||
session.started = true;
|
||||
});
|
||||
|
||||
const SEND_PORT = 32108;
|
||||
sock.bind();
|
||||
const sessTimer = setInterval(() => {
|
||||
const delta = Date.now() - session.lastReceivedPacket;
|
||||
|
||||
Reference in New Issue
Block a user