Merge pull request #285 from jb-alvarado/master
fix skip clip, when is to short
This commit is contained in:
commit
37653553d6
8
Cargo.lock
generated
8
Cargo.lock
generated
@ -1003,7 +1003,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ffplayout"
|
||||
version = "0.17.0-beta5"
|
||||
version = "0.17.0-beta6"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
"clap",
|
||||
@ -1023,7 +1023,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ffplayout-api"
|
||||
version = "0.17.0-beta5"
|
||||
version = "0.17.0-beta6"
|
||||
dependencies = [
|
||||
"actix-files",
|
||||
"actix-multipart",
|
||||
@ -1056,7 +1056,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ffplayout-lib"
|
||||
version = "0.17.0-beta5"
|
||||
version = "0.17.0-beta6"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
"crossbeam-channel",
|
||||
@ -2909,7 +2909,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tests"
|
||||
version = "0.17.0-beta5"
|
||||
version = "0.17.0-beta6"
|
||||
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-beta5"
|
||||
version = "0.17.0-beta6"
|
||||
license = "GPL-3.0"
|
||||
repository = "https://github.com/ffplayout/ffplayout"
|
||||
authors = ["Jonathan Baecker <jonbae77@gmail.com>"]
|
||||
|
@ -442,8 +442,8 @@ fn timed_source(
|
||||
|| !config.playlist.length.contains(':')
|
||||
{
|
||||
// when we are in the 24 hour range, get the clip
|
||||
new_node = gen_source(config, node, &playout_stat.chain);
|
||||
new_node.process = Some(true);
|
||||
new_node = gen_source(config, node, &playout_stat.chain);
|
||||
} else if total_delta <= 0.0 {
|
||||
info!("Begin is over play time, skip: {}", node.source);
|
||||
} else if total_delta < node.duration - node.seek || last {
|
||||
@ -476,13 +476,10 @@ pub fn gen_source(
|
||||
node.cmd = Some(seek_and_length(&node));
|
||||
}
|
||||
} else {
|
||||
let probe = MediaProbe::new(&config.storage.filler_clip);
|
||||
error!("Source not found: <b><magenta>\"{}\"</></b>", node.source);
|
||||
warn!("Generate filler with <yellow>{duration:.2}</> seconds length!");
|
||||
|
||||
if node.source.is_empty() {
|
||||
warn!("Generate filler with <yellow>{duration:.2}</> seconds length!");
|
||||
} else {
|
||||
error!("Source not found: <b><magenta>{}</></b>", node.source);
|
||||
}
|
||||
let probe = MediaProbe::new(&config.storage.filler_clip);
|
||||
|
||||
if config
|
||||
.storage
|
||||
|
@ -24,13 +24,24 @@ pub fn output(config: &PlayoutConfig, log_format: &str) -> process::Child {
|
||||
];
|
||||
|
||||
if let Some(mut cmd) = config.out.output_cmd.clone() {
|
||||
if !cmd
|
||||
.iter()
|
||||
.any(|i| ["-c:v", "-vcodec", "-c:a", "-acodec"].contains(&i.as_str()))
|
||||
{
|
||||
if !cmd.iter().any(|i| {
|
||||
[
|
||||
"-c:v",
|
||||
"-c:v:0",
|
||||
"-b:v",
|
||||
"-b:v:0",
|
||||
"-vcodec",
|
||||
"-c:a",
|
||||
"-acodec",
|
||||
"-crf",
|
||||
"-map",
|
||||
"-filter_complex",
|
||||
]
|
||||
.contains(&i.as_str())
|
||||
}) {
|
||||
enc_cmd.append(&mut cmd);
|
||||
} else {
|
||||
warn!("Desktop output supports custom parameters, but given ones a not supported by ffplay!");
|
||||
warn!("Given output parameter a skipped, they are not supported by ffplay!");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -159,7 +159,7 @@ pub fn player(
|
||||
|
||||
for rx in ingest_receiver.as_ref().unwrap().try_iter() {
|
||||
if let Err(e) = enc_writer.write(&rx.1[..rx.0]) {
|
||||
error!("Encoder write error: {:?}", e);
|
||||
error!("Error from Ingest: {:?}", e);
|
||||
|
||||
break 'source_iter;
|
||||
};
|
||||
@ -187,7 +187,7 @@ pub fn player(
|
||||
|
||||
if dec_bytes_len > 0 {
|
||||
if let Err(e) = enc_writer.write(&buffer[..dec_bytes_len]) {
|
||||
error!("Encoder write error: {e:?}");
|
||||
error!("Encoder write error: {}", e.kind());
|
||||
|
||||
break 'source_iter;
|
||||
};
|
||||
|
@ -14,8 +14,9 @@ use simplelog::*;
|
||||
use crate::utils::Media;
|
||||
|
||||
/// Defined process units.
|
||||
#[derive(Clone, Debug, Copy, Eq, Serialize, Deserialize, PartialEq)]
|
||||
#[derive(Clone, Debug, Default, Copy, Eq, Serialize, Deserialize, PartialEq)]
|
||||
pub enum ProcessUnit {
|
||||
#[default]
|
||||
Decoder,
|
||||
Encoder,
|
||||
Ingest,
|
||||
@ -31,12 +32,6 @@ impl fmt::Display for ProcessUnit {
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for ProcessUnit {
|
||||
fn default() -> Self {
|
||||
ProcessUnit::Decoder
|
||||
}
|
||||
}
|
||||
|
||||
use ProcessUnit::*;
|
||||
|
||||
/// Process Controller
|
||||
|
Loading…
x
Reference in New Issue
Block a user