Adding support for file title without renaming file, updating docker files.
This commit is contained in:
parent
751b4362e6
commit
61fab0fcef
@ -14,7 +14,7 @@ RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == \
|
||||
|
||||
FROM base
|
||||
|
||||
ARG FFPLAYOUT_VERSION=0.21.0
|
||||
ARG FFPLAYOUT_VERSION=0.21.3
|
||||
COPY README.md *.rpm /tmp/
|
||||
|
||||
RUN dnf update -y && \
|
||||
|
@ -132,7 +132,7 @@ RUN \
|
||||
|
||||
FROM base
|
||||
|
||||
ARG FFPLAYOUT_VERSION=0.21.0
|
||||
ARG FFPLAYOUT_VERSION=0.21.3
|
||||
|
||||
ENV LD_LIBRARY_PATH=/usr/local/lib64:/usr/local/lib
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
FROM nvidia/cuda:12.0.1-cudnn8-runtime-centos7
|
||||
|
||||
ENV FFPLAYOUT_VERSION=0.21.3
|
||||
ENV NVIDIA_VISIBLE_DEVICES all
|
||||
ENV NVIDIA_DRIVER_CAPABILITIES compute,video,utility
|
||||
|
||||
@ -95,11 +96,11 @@ RUN echo "PermitRootLogin yes" >> /etc/ssh/sshd_config
|
||||
|
||||
RUN yum update -y \
|
||||
&& yum install -y dejavu-sans-fonts sudo wget \
|
||||
&& wget -q -O /tmp/ffplayout-0.21.0-1.x86_64.rpm "https://github.com/ffplayout/ffplayout/releases/download/v0.20.2/ffplayout-0.21.0-1.x86_64.rpm" \
|
||||
&& yum install -y /tmp/ffplayout-0.21.0-1.x86_64.rpm \
|
||||
&& wget -q -O /tmp/ffplayout-${FFPLAYOUT_VERSION}-1.x86_64.rpm "https://github.com/ffplayout/ffplayout/releases/download/v${FFPLAYOUT_VERSION}/ffplayout-${FFPLAYOUT_VERSION}-1.x86_64.rpm" \
|
||||
&& yum install -y /tmp/ffplayout-${FFPLAYOUT_VERSION}-1.x86_64.rpm \
|
||||
&& yum clean all \
|
||||
&& echo 'Docker!' | passwd --stdin root \
|
||||
&& rm /tmp/ffplayout-0.21.0-1.x86_64.rpm \
|
||||
&& rm /tmp/ffplayout-${FFPLAYOUT_VERSION}-1.x86_64.rpm \
|
||||
&& mkdir -p /home/ffpu && chown -R ffpu: /home/ffpu \
|
||||
&& systemctl enable ffplayout \
|
||||
&& systemctl enable ffpapi
|
||||
|
@ -132,6 +132,7 @@ fn time_before() -> NaiveDateTime {
|
||||
struct ProgramItem {
|
||||
source: String,
|
||||
start: String,
|
||||
title: Option<String>,
|
||||
r#in: f64,
|
||||
out: f64,
|
||||
duration: f64,
|
||||
@ -1189,6 +1190,7 @@ async fn get_program(
|
||||
let p_item = ProgramItem {
|
||||
source,
|
||||
start: start.format("%Y-%m-%d %H:%M:%S%.3f%:z").to_string(),
|
||||
title: item.title,
|
||||
r#in: item.seek,
|
||||
out: item.out,
|
||||
duration: item.duration,
|
||||
|
@ -239,6 +239,7 @@ pub fn prepare_output_cmd(
|
||||
/// map media struct to json object
|
||||
pub fn get_media_map(media: Media) -> Value {
|
||||
json!({
|
||||
"title": media.title,
|
||||
"seek": media.seek,
|
||||
"out": media.out,
|
||||
"duration": media.duration,
|
||||
|
@ -39,6 +39,7 @@ impl JsonPlaylist {
|
||||
pub fn new(date: String, start: f64) -> Self {
|
||||
let mut media = Media::new(0, "", false);
|
||||
media.begin = Some(start);
|
||||
media.title = None;
|
||||
media.duration = DUMMY_LEN;
|
||||
media.out = DUMMY_LEN;
|
||||
Self {
|
||||
|
@ -65,6 +65,8 @@ pub struct Media {
|
||||
|
||||
#[serde(skip_serializing, skip_deserializing)]
|
||||
pub index: Option<usize>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub title: Option<String>,
|
||||
#[serde(rename = "in")]
|
||||
pub seek: f64,
|
||||
pub out: f64,
|
||||
@ -138,6 +140,7 @@ impl Media {
|
||||
Self {
|
||||
begin: None,
|
||||
index: Some(index),
|
||||
title: None,
|
||||
seek: 0.0,
|
||||
out: duration,
|
||||
duration,
|
||||
@ -218,7 +221,8 @@ impl Media {
|
||||
|
||||
impl PartialEq for Media {
|
||||
fn eq(&self, other: &Self) -> bool {
|
||||
self.seek == other.seek
|
||||
self.title == other.title
|
||||
&& self.seek == other.seek
|
||||
&& self.out == other.out
|
||||
&& self.duration == other.duration
|
||||
&& self.source == other.source
|
||||
|
Loading…
Reference in New Issue
Block a user