fix logo path on windows system, #291

This commit is contained in:
jb-alvarado 2023-03-24 10:28:39 +01:00
parent ddb47e5166
commit 3328aaac6a
4 changed files with 12 additions and 6 deletions

1
.gitignore vendored
View File

@ -14,6 +14,7 @@
*.log
/logs/
*.exe
*.zip
*tar.gz
*.deb

8
Cargo.lock generated
View File

@ -1003,7 +1003,7 @@ dependencies = [
[[package]]
name = "ffplayout"
version = "0.17.0-beta6"
version = "0.17.0-beta7"
dependencies = [
"chrono",
"clap",
@ -1023,7 +1023,7 @@ dependencies = [
[[package]]
name = "ffplayout-api"
version = "0.17.0-beta6"
version = "0.17.0-beta7"
dependencies = [
"actix-files",
"actix-multipart",
@ -1056,7 +1056,7 @@ dependencies = [
[[package]]
name = "ffplayout-lib"
version = "0.17.0-beta6"
version = "0.17.0-beta7"
dependencies = [
"chrono",
"crossbeam-channel",
@ -2929,7 +2929,7 @@ dependencies = [
[[package]]
name = "tests"
version = "0.17.0-beta6"
version = "0.17.0-beta7"
dependencies = [
"chrono",
"crossbeam-channel",

View File

@ -3,7 +3,7 @@ members = ["ffplayout-api", "ffplayout-engine", "lib", "tests"]
default-members = ["ffplayout-api", "ffplayout-engine", "tests"]
[workspace.package]
version = "0.17.0-beta6"
version = "0.17.0-beta7"
license = "GPL-3.0"
repository = "https://github.com/ffplayout/ffplayout"
authors = ["Jonathan Baecker <jonbae77@gmail.com>"]

View File

@ -292,6 +292,11 @@ fn overlay(node: &mut Media, chain: &mut Filters, config: &PlayoutConfig) {
{
let mut scale = String::new();
let re = Regex::new(r"[)(\d\w-]+:[)(\d\w-]+").unwrap();
let mut logo = config.processing.logo.clone();
if cfg!(windows) {
logo = logo.replace('\\', "/").replace(':', "\\\\:");
}
if re.is_match(&config.processing.logo_scale) {
scale = format!(",scale={}", config.processing.logo_scale);
@ -299,7 +304,7 @@ fn overlay(node: &mut Media, chain: &mut Filters, config: &PlayoutConfig) {
let mut logo_chain = format!(
"null[v];movie={}:loop=0,setpts=N/(FRAME_RATE*TB),format=rgba,colorchannelmixer=aa={}{scale}[l];[v][l]{}:shortest=1",
config.processing.logo, config.processing.logo_opacity, config.processing.logo_filter
logo, config.processing.logo_opacity, config.processing.logo_filter
);
if node.last_ad.unwrap_or(false) {