blob: c7033d86afee930b254e0d0dbe2dcd6296bd9908 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
/*
This file is part of jellything (https://codeberg.org/metamuffin/jellything)
which is licensed under the GNU Affero General Public License (version 3); see /COPYING.
Copyright (C) 2023 metamuffin <metamuffin.org>
*/
use jellybase::{cache::async_cache_file, AssetLocationExt};
use jellycommon::AssetLocation;
pub async fn transcode(
asset: AssetLocation,
quality: f32,
speed: u8,
width: usize,
) -> anyhow::Result<AssetLocation> {
let original_path = asset.path();
let asset = asset.clone();
Ok(async_cache_file(
&[
"snip-tc",
original_path.as_os_str().to_str().unwrap(),
&format!("{width} {quality} {speed}"),
],
move |output| async move {
Ok(())
},
)
.await?)
}
|