Add example configurations in the doc
This commit is contained in:
1 parent
10eecf416c
commit
90e21e9916
2 files changed
+42
No files matched your search
@@ -10,6 +10,24 @@ use log::*;
|
||||
/// neolink mqtt --config=config.toml
|
||||
/// ```
|
||||
///
|
||||
/// # Example Config
|
||||
///
|
||||
/// ```toml
|
||||
// [[cameras]]
|
||||
// name = "Cammy"
|
||||
// username = "****"
|
||||
// password = "****"
|
||||
// address = "****:9000"
|
||||
// [cameras.mqtt]
|
||||
// server = "127.0.0.1"
|
||||
// port = 1883
|
||||
// credentials = ["username", "password"]
|
||||
// ```
|
||||
//
|
||||
// `server` is the mqtt server that messages will be sent to
|
||||
// `port` is the server's mqtt port
|
||||
// `credentials` are the username and password required to identify with the mqtt server
|
||||
//
|
||||
use std::sync::Arc;
|
||||
|
||||
mod app;
|
||||
|
||||
@@ -28,6 +28,30 @@
|
||||
/// neolink rtsp --config=config.toml
|
||||
/// ```
|
||||
///
|
||||
/// # Example Config
|
||||
///
|
||||
/// ```toml
|
||||
// [[cameras]]
|
||||
// name = "Cammy"
|
||||
// username = "****"
|
||||
// password = "****"
|
||||
// address = "****:9000"
|
||||
// [cameras.pause]
|
||||
// on_motion = false
|
||||
// on_client = false
|
||||
// mode = "none"
|
||||
// timeout = 1.0
|
||||
// ```
|
||||
//
|
||||
// - When `on_motion` is true the camera will pause streaming when motion is stopped and resume it when motion is started
|
||||
// - When `on_client` is true the camera will pause while there is no client connected.
|
||||
// - `timeout` handels how long to wait after motion stops before pausing the stream
|
||||
// - `mode` has the following values:
|
||||
// - `"black"`: Switches to a black screen. Requires more cpu as the stream is fully reencoded
|
||||
// - `"still"`: Switches to a still image. Requires more cpu as the stream is fully reencoded
|
||||
// - `"test"`: Switches to the gstreamer test image. Requires more cpu as the stream is fully reencoded
|
||||
// - `"none"`: Resends the last iframe the camera. This does not reencode at all. **Most use cases should use this one as it has the least effort on the cpu and gives what you would expect**
|
||||
//
|
||||
use anyhow::{anyhow, Context, Result};
|
||||
use crossbeam::utils::Backoff;
|
||||
use log::*;
|
||||
|
||||
Reference in new issue
Block a user