fix logo path on windows system, #291
This commit is contained in:
parent
ddb47e5166
commit
3328aaac6a
1
.gitignore
vendored
1
.gitignore
vendored
@ -14,6 +14,7 @@
|
||||
*.log
|
||||
/logs/
|
||||
|
||||
*.exe
|
||||
*.zip
|
||||
*tar.gz
|
||||
*.deb
|
||||
|
8
Cargo.lock
generated
8
Cargo.lock
generated
@ -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",
|
||||
|
@ -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>"]
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user