diff options
| author | metamuffin <metamuffin@disroot.org> | 2025-09-12 13:54:04 +0200 |
|---|---|---|
| committer | metamuffin <metamuffin@disroot.org> | 2025-09-12 13:54:04 +0200 |
| commit | e99bde7a00a161ff5dd91eaf1ce546a9d98cef05 (patch) | |
| tree | 454c2de6fae85720064b35593158e612b2d9fefb /transcoder | |
| parent | 356b3b8eebf22083c7d9655bb43e141dd0df732c (diff) | |
| download | jellything-e99bde7a00a161ff5dd91eaf1ce546a9d98cef05.tar jellything-e99bde7a00a161ff5dd91eaf1ce546a9d98cef05.tar.bz2 jellything-e99bde7a00a161ff5dd91eaf1ce546a9d98cef05.tar.zst | |
move stream types to own crate; removes a common dep
Diffstat (limited to 'transcoder')
| -rw-r--r-- | transcoder/Cargo.toml | 2 | ||||
| -rw-r--r-- | transcoder/src/fragment.rs | 2 | ||||
| -rw-r--r-- | transcoder/src/subtitles.rs | 9 |
3 files changed, 10 insertions, 3 deletions
diff --git a/transcoder/Cargo.toml b/transcoder/Cargo.toml index f35b101..06dc1aa 100644 --- a/transcoder/Cargo.toml +++ b/transcoder/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" [dependencies] jellyremuxer = { path = "../remuxer" } jellycache = { path = "../cache" } -jellycommon = { path = "../common" } +jellystream-types = { path = "../stream/types" } log = { workspace = true } # TODO: change this back to crates.io when pr is merged image = "0.25.5" diff --git a/transcoder/src/fragment.rs b/transcoder/src/fragment.rs index dbb8f6d..a71094d 100644 --- a/transcoder/src/fragment.rs +++ b/transcoder/src/fragment.rs @@ -6,8 +6,8 @@ use crate::{Config, CONF, LOCAL_VIDEO_TRANSCODING_TASKS}; use anyhow::Result; use jellycache::{async_cache_file, CachePath}; -use jellycommon::stream::{StreamFormatInfo, TrackKind}; use jellyremuxer::metadata::MatroskaTrackEntry; +use jellystream_types::{StreamFormatInfo, TrackKind}; use log::info; use std::fmt::Write; use std::process::Stdio; diff --git a/transcoder/src/subtitles.rs b/transcoder/src/subtitles.rs index d7e7b29..1325b62 100644 --- a/transcoder/src/subtitles.rs +++ b/transcoder/src/subtitles.rs @@ -4,9 +4,16 @@ Copyright (C) 2025 metamuffin <metamuffin.org> */ use anyhow::{anyhow, bail, Context}; -use jellycommon::jhls::SubtitleCue; +use serde::{Deserialize, Serialize}; use std::fmt::Write; +#[derive(Debug, Serialize, Deserialize)] +pub struct SubtitleCue { + pub start: f64, + pub end: f64, + pub content: String, +} + pub fn parse_subtitles( codec: &str, codec_private: Option<Vec<u8>>, |