From eb47c311351f9a573373d13b00ee9177f43505af Mon Sep 17 00:00:00 2001 From: jb-alvarado Date: Sun, 7 Aug 2022 18:00:20 +0200 Subject: [PATCH] prepare for version 0.14.0 - use chrono 0.4.20 - remove exit from kill_all function - add exit statement to rpc error catcher - typo in readme - add infos about image and audio source --- Cargo.lock | 8 +++++--- README.md | 16 ++++++++++++---- docs/README.md | 1 + docs/install.md | 2 -- ffplayout-api/Cargo.toml | 4 ++-- ffplayout-engine/src/rpc/mod.rs | 4 +++- lib/Cargo.toml | 2 +- lib/src/utils/controller.rs | 4 +--- 8 files changed, 25 insertions(+), 16 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b0b9a12e..d2fcc143 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -629,13 +629,15 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.20-rc.1" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "856628f00a013eb30ae7b136b20fba37f7a39f8026d6f735dfac07c6fce1b8cf" +checksum = "6127248204b9aba09a362f6c930ef6a78f2c1b2215f8a7b398c06e1083f17af0" dependencies = [ + "js-sys", "num-integer", "num-traits", "time 0.1.44", + "wasm-bindgen", "winapi 0.3.9", ] @@ -1032,7 +1034,7 @@ dependencies = [ [[package]] name = "ffplayout-api" -version = "0.5.1" +version = "0.5.2" dependencies = [ "actix-files", "actix-multipart", diff --git a/README.md b/README.md index 90dc8620..bc0df124 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ ## **ffplayout-engine (ffplayout)** -[ffplayout](/ffplayout-engine/README.md) is 24/7 broadcasting solution. It can playout a folder with containing video clips, or play for every day a *JSON* playlist, while keeping the current playlist editable. +[ffplayout](/ffplayout-engine/README.md) is a 24/7 broadcasting solution. It can playout a folder with containing video clips, or play for every day a *JSON* playlist, while keeping the current playlist editable. The ffplayout apps are mostly made to run on Linux as system services. But in general they should run on all platforms which are supported by Rust. @@ -45,6 +45,8 @@ Check the [releases](https://github.com/ffplayout/ffplayout/releases/latest) for - **null** (for debugging) - JSON RPC server, for getting infos about current playing and controlling - [live ingest](/docs/live_ingest.md) +- image source (will loop until out duration is reached) +- extra audio source (experimental) (has priority over audio from video source) For preview stream, read: [/docs/preview_stream.md](/docs/preview_stream.md) @@ -79,13 +81,19 @@ Check [install](docs/install.md) for details about how to install ffplayout. "in": 0, "out": 149, "duration": 149, - "source": "/Media/clip2.mp4" + "source": "/Media/clip2.mp4", + "category": "advertisement" }, { "in": 0, "out": 114.72, "duration": 114.72, - "source": "/Media/clip3.mp4", - "category": "advertisement" + "source": "/Media/image1.jpg", + }, { + "in": 0, + "out": 230.30, + "duration": 230.30, + "source": "/Media/image2.jpg", + "audio": "/Media/audio1.mp3" }, { "in": 0, "out": 2531.36, diff --git a/docs/README.md b/docs/README.md index 6c2fcf5a..cb0af15a 100644 --- a/docs/README.md +++ b/docs/README.md @@ -30,4 +30,5 @@ Setup and use a preview stream. Use of remote sources, like https://example.org/video.mp4 ### **[ffplayout API](/docs/api.md)** + Control the engine, playlist and config with a ~REST API diff --git a/docs/install.md b/docs/install.md index ffc31b2e..5297cdc9 100644 --- a/docs/install.md +++ b/docs/install.md @@ -31,5 +31,3 @@ If you want to configure ffplayout over terminal, you can edit **/etc/ffplayout/ - give ownership from `/etc/ffplayout` and `/var/log/ffplayout` to **ffpu** - copy **assets/ffplayout.service** to `/etc/systemd/system` - activate service and run it: `systemctl enable --now ffplayout` - -You can also install the [released](https://github.com/ffplayout/ffplayout/releases/latest) ***.deb** or ***.rpm** package. diff --git a/ffplayout-api/Cargo.toml b/ffplayout-api/Cargo.toml index bf9ac520..5f4128cc 100644 --- a/ffplayout-api/Cargo.toml +++ b/ffplayout-api/Cargo.toml @@ -4,7 +4,7 @@ description = "Rest API for ffplayout" license = "GPL-3.0" authors = ["Jonathan Baecker jonbae77@gmail.com"] readme = "README.md" -version = "0.5.1" +version = "0.5.2" edition = "2021" [dependencies] @@ -15,7 +15,7 @@ actix-web = "4" actix-web-grants = "3" actix-web-httpauth = "0.6" argon2 = "0.4" -chrono = "0.4.20-rc.1" +chrono = "0.4.20" clap = { version = "3.2", features = ["derive"] } derive_more = "0.99" faccess = "0.2" diff --git a/ffplayout-engine/src/rpc/mod.rs b/ffplayout-engine/src/rpc/mod.rs index b8dd3014..89becdac 100644 --- a/ffplayout-engine/src/rpc/mod.rs +++ b/ffplayout-engine/src/rpc/mod.rs @@ -1,5 +1,5 @@ use futures::executor; -use std::sync::atomic::Ordering; +use std::{process::exit, sync::atomic::Ordering}; mod zmq_cmd; @@ -277,6 +277,8 @@ pub fn json_rpc_server( Err(e) => { error!("Unable to start RPC server: {e}"); proc_control.kill_all(); + + exit(1); } }; } diff --git a/lib/Cargo.toml b/lib/Cargo.toml index 4c5a3fb4..8bb44a3c 100644 --- a/lib/Cargo.toml +++ b/lib/Cargo.toml @@ -8,7 +8,7 @@ version = "0.14.0" edition = "2021" [dependencies] -chrono = "0.4.20-rc.1" +chrono = "0.4.20" crossbeam-channel = "0.5" ffprobe = "0.3" file-rotate = "0.7.0-rc.0" diff --git a/lib/src/utils/controller.rs b/lib/src/utils/controller.rs index 916c6e6a..4da12c10 100644 --- a/lib/src/utils/controller.rs +++ b/lib/src/utils/controller.rs @@ -1,6 +1,6 @@ use std::{ fmt, - process::{exit, Child}, + process::Child, sync::{ atomic::{AtomicBool, AtomicUsize, Ordering}, Arc, Mutex, @@ -148,8 +148,6 @@ impl ProcessControl { } } } - - exit(1); } }